diff options
Diffstat (limited to 'flash/uart_boot')
-rw-r--r-- | flash/uart_boot/Makefile | 16 | ||||
-rw-r--r-- | flash/uart_boot/client.c | 11 | ||||
-rw-r--r-- | flash/uart_boot/client.h | 3 | ||||
-rw-r--r-- | flash/uart_boot/flash.c | 3 | ||||
-rw-r--r-- | flash/uart_boot/flash.h | 3 | ||||
-rw-r--r-- | flash/uart_boot/minimon.h | 1 | ||||
-rw-r--r-- | flash/uart_boot/scalar_types.h | 3 | ||||
-rw-r--r-- | flash/uart_boot/uart.h | 3 | ||||
-rw-r--r-- | flash/uart_boot/uart_win.c | 1 |
9 files changed, 33 insertions, 11 deletions
diff --git a/flash/uart_boot/Makefile b/flash/uart_boot/Makefile new file mode 100644 index 0000000000..f8f94870b6 --- /dev/null +++ b/flash/uart_boot/Makefile @@ -0,0 +1,16 @@ +# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ +# $Id$ +# +# This Makefile currently works for cygwin only! + + +CFLAGS := -O -W -Wall -mno-cygwin + +uart_boot: uart_boot.c client.c flash.c uart_win.c + $(CC) $(CFLAGS) $+ -o $@ + diff --git a/flash/uart_boot/client.c b/flash/uart_boot/client.c index a98edc60cb..71749a2c55 100644 --- a/flash/uart_boot/client.c +++ b/flash/uart_boot/client.c @@ -15,7 +15,7 @@ int ConfigFirstlevelPlayer (tUartHandle serial_handle) if(!UartConfig(serial_handle, 4800, eMARKPARITY, eTWOSTOPBITS, 8)) { UINT32 dwErr = GET_LAST_ERR(); - printf("Error %d setting up COM params for baudrate byte\n", dwErr); + printf("Error %lu setting up COM params for baudrate byte\n", dwErr); exit(1); } @@ -24,7 +24,7 @@ int ConfigFirstlevelPlayer (tUartHandle serial_handle) if (result_nbr != 2) { UINT32 dwErr = GET_LAST_ERR(); - printf("Error %d setting up COM params for baudrate byte\n", dwErr); + printf("Error %lu setting up COM params for baudrate byte\n", dwErr); } SLEEP(100); // wait for the chars to be sent, is there a better way? @@ -48,7 +48,7 @@ int ConfigFirstlevelRecorder (tUartHandle serial_handle) if(!UartConfig(serial_handle, 4800, eNOPARITY, eTWOSTOPBITS, 8)) { UINT32 dwErr = GET_LAST_ERR(); - printf("Error %d setting up COM params for baudrate byte\n", dwErr); + printf("Error %lu setting up COM params for baudrate byte\n", dwErr); exit(1); } @@ -66,7 +66,7 @@ int ConfigFirstlevelRecorder (tUartHandle serial_handle) if(!UartConfig(serial_handle, 38400, eNOPARITY, eONESTOPBIT, 8)) { UINT32 dwErr = GET_LAST_ERR(); - printf("Error %d setting up COM params for 1st level loader\n", dwErr); + printf("Error %lu setting up COM params for 1st level loader\n", dwErr); exit(1); } @@ -78,7 +78,6 @@ int ConfigFirstlevelRecorder (tUartHandle serial_handle) int DownloadByte(tUartHandle serial_handle, unsigned char byte, bool bAck) { unsigned char received; - bool bRecorder = true; // false for player while (1) { @@ -230,7 +229,7 @@ int DownloadArchosMonitor(tUartHandle serial_handle, char* szFilename) if(!UartConfig(serial_handle, 115200, eNOPARITY, eONESTOPBIT, 8)) { UINT32 dwErr = GET_LAST_ERR(); - printf("Error %d setting up COM params for baudrate %d\n", dwErr, 115200); + printf("Error %lu setting up COM params for baudrate %d\n", dwErr, 115200); exit(1); } diff --git a/flash/uart_boot/client.h b/flash/uart_boot/client.h index d2ef29aa2e..a5df8c35d6 100644 --- a/flash/uart_boot/client.h +++ b/flash/uart_boot/client.h @@ -18,4 +18,5 @@ int SetTargetBaudrate(tUartHandle serial_handle, long lClock, long lBaudrate); int Execute(tUartHandle serial_handle, UINT32 addr, bool bReturns); -#endif
\ No newline at end of file +#endif + diff --git a/flash/uart_boot/flash.c b/flash/uart_boot/flash.c index f27bb7ec0a..854de20454 100644 --- a/flash/uart_boot/flash.c +++ b/flash/uart_boot/flash.c @@ -74,4 +74,5 @@ int ProgramBytes(tUartHandle serial_handle, UINT32 address, UINT8* pData, UINT32 // UART protocol is slow enough such that I don't have to wait 20us here } return 0; -}
\ No newline at end of file +} + diff --git a/flash/uart_boot/flash.h b/flash/uart_boot/flash.h index 70c620108d..9c69ad46a5 100644 --- a/flash/uart_boot/flash.h +++ b/flash/uart_boot/flash.h @@ -6,4 +6,5 @@ int EraseSector(tUartHandle serial_handle, UINT32 address); int EraseChip(tUartHandle serial_handle, UINT32 base); int ProgramBytes(tUartHandle serial_handle, UINT32 address, UINT8* pData, UINT32 size); -#endif
\ No newline at end of file +#endif + diff --git a/flash/uart_boot/minimon.h b/flash/uart_boot/minimon.h index 51406d4b12..69a03b1f4d 100644 --- a/flash/uart_boot/minimon.h +++ b/flash/uart_boot/minimon.h @@ -21,3 +21,4 @@ #endif // _MINIMON_H + diff --git a/flash/uart_boot/scalar_types.h b/flash/uart_boot/scalar_types.h index 88d82c4ec1..f3ac1d86eb 100644 --- a/flash/uart_boot/scalar_types.h +++ b/flash/uart_boot/scalar_types.h @@ -41,4 +41,5 @@ -#endif
\ No newline at end of file +#endif + diff --git a/flash/uart_boot/uart.h b/flash/uart_boot/uart.h index 46b082c497..a0c10d1a0f 100644 --- a/flash/uart_boot/uart.h +++ b/flash/uart_boot/uart.h @@ -53,4 +53,5 @@ void UartClose(tUartHandle handle); -#endif // _UART_H
\ No newline at end of file +#endif // _UART_H + diff --git a/flash/uart_boot/uart_win.c b/flash/uart_boot/uart_win.c index 243017ac88..6e82e9580c 100644 --- a/flash/uart_boot/uart_win.c +++ b/flash/uart_boot/uart_win.c @@ -136,3 +136,4 @@ void UartClose(tUartHandle handle) return; } + |