summaryrefslogtreecommitdiffstats
path: root/flash
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-11-19 22:44:45 +0000
committerJens Arnold <amiconn@rockbox.org>2004-11-19 22:44:45 +0000
commitc519e6365e50645510d3394b2bcc67a501748b8c (patch)
tree9be4cad39947134d58315d16ce993f154b12b342 /flash
parent30237007f1cccdc12e6012a01a87ed83b6024fff (diff)
downloadrockbox-c519e6365e50645510d3394b2bcc67a501748b8c.tar.gz
rockbox-c519e6365e50645510d3394b2bcc67a501748b8c.tar.bz2
rockbox-c519e6365e50645510d3394b2bcc67a501748b8c.zip
Makefile and adjustments for compiling uart_boot under cygwin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5439 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'flash')
-rw-r--r--flash/uart_boot/Makefile16
-rw-r--r--flash/uart_boot/client.c11
-rw-r--r--flash/uart_boot/client.h3
-rw-r--r--flash/uart_boot/flash.c3
-rw-r--r--flash/uart_boot/flash.h3
-rw-r--r--flash/uart_boot/minimon.h1
-rw-r--r--flash/uart_boot/scalar_types.h3
-rw-r--r--flash/uart_boot/uart.h3
-rw-r--r--flash/uart_boot/uart_win.c1
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;
}
+