forked from len0rd/rockbox
Makefile and adjustments for compiling uart_boot under cygwin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5439 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
30237007f1
commit
c519e6365e
9 changed files with 33 additions and 11 deletions
16
flash/uart_boot/Makefile
Normal file
16
flash/uart_boot/Makefile
Normal file
|
@ -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 $@
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,4 +18,5 @@ int SetTargetBaudrate(tUartHandle serial_handle, long lClock, long lBaudrate);
|
|||
int Execute(tUartHandle serial_handle, UINT32 addr, bool bReturns);
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
#endif
|
||||
|
||||
|
|
|
@ -21,3 +21,4 @@
|
|||
|
||||
|
||||
#endif // _MINIMON_H
|
||||
|
||||
|
|
|
@ -41,4 +41,5 @@
|
|||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -53,4 +53,5 @@ void UartClose(tUartHandle handle);
|
|||
|
||||
|
||||
|
||||
#endif // _UART_H
|
||||
#endif // _UART_H
|
||||
|
||||
|
|
|
@ -136,3 +136,4 @@ void UartClose(tUartHandle handle)
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue