diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 16:22:22 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 16:22:22 -0600 |
commit | 70b6bb22af51defd713adfd452309f32f0e523aa (patch) | |
tree | b483c578cf6ae76888b89188bedb03f539ab4cd3 /nuttx/configs/mcu123-lpc214x | |
parent | 3cf6b4d6577c2f467dbb25dd0da8cdc6ad32a7b4 (diff) | |
download | px4-nuttx-70b6bb22af51defd713adfd452309f32f0e523aa.tar.gz px4-nuttx-70b6bb22af51defd713adfd452309f32f0e523aa.tar.bz2 px4-nuttx-70b6bb22af51defd713adfd452309f32f0e523aa.zip |
More trailing whilespace removal
Diffstat (limited to 'nuttx/configs/mcu123-lpc214x')
-rw-r--r-- | nuttx/configs/mcu123-lpc214x/README.txt | 12 | ||||
-rw-r--r-- | nuttx/configs/mcu123-lpc214x/lpc21isp-1.60.diff | 134 | ||||
-rw-r--r-- | nuttx/configs/mcu123-lpc214x/src/Makefile | 2 |
3 files changed, 74 insertions, 74 deletions
diff --git a/nuttx/configs/mcu123-lpc214x/README.txt b/nuttx/configs/mcu123-lpc214x/README.txt index 86873a6a1..8ce4534ab 100644 --- a/nuttx/configs/mcu123-lpc214x/README.txt +++ b/nuttx/configs/mcu123-lpc214x/README.txt @@ -34,7 +34,7 @@ GNU Toolchain Options 1. The NuttX buildroot Toolchain (see below). 2. The CodeSourcery GNU toolchain, 3. The devkitARM GNU toolchain, or - + All testing has been conducted using the NuttX buildroot toolchain. To use the CodeSourcery or devkitARM GNU toolchain, you simply need to build the system as follows: @@ -163,7 +163,7 @@ Here are the detailed steps I use: 3. Start lpc21isp.sh -4. Reset the board to +4. Reset the board to FlashMagic (Windows/MAC) ------------------------ @@ -190,7 +190,7 @@ You download FlashMagic for Windows or MAC here: http://www.flashmagictool.com 5. Start and reset the board to entry ISP mode. Or hold the INT1 button down after reset after you press start. -NOTE: FlashMagic will complain if the data section overlaps +NOTE: FlashMagic will complain if the data section overlaps 0x4000000-0x400001ff. OpenOCD @@ -201,14 +201,14 @@ Cygwin, I can do the following: 1. Create a .cfg file: - $ cat /cygdrive/c/gccfd/openocd/lib/openocd/interface/arm-usb-ocd.cfg /cygdrive/c/gccfd/openocd/lib/openocd/target/lpc2148.cfg > lpc2148.cfg + $ cat /cygdrive/c/gccfd/openocd/lib/openocd/interface/arm-usb-ocd.cfg /cygdrive/c/gccfd/openocd/lib/openocd/target/lpc2148.cfg > lpc2148.cfg 2. Start OpenOCD: /cygdrive/c/gccfd/openocd/bin/openocd-ftd2xx.exe -f lpc2148.cfg -s . & 3. Start arm-*-gdb (whichever GDB your toolchain uses). - + ARM/LPC214X-specific Configuration Options ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -300,7 +300,7 @@ ARM/LPC214X-specific Configuration Options LPC214X USB Configuration CONFIG_LPC214X_USBDEV_FRAME_INTERRUPT - Handle USB Start-Of-Frame events. + Handle USB Start-Of-Frame events. Enable reading SOF from interrupt handler vs. simply reading on demand. Probably a bad idea... Unless there is some issue with sampling the SOF from hardware asynchronously. diff --git a/nuttx/configs/mcu123-lpc214x/lpc21isp-1.60.diff b/nuttx/configs/mcu123-lpc214x/lpc21isp-1.60.diff index 277b21921..9d329c6d2 100644 --- a/nuttx/configs/mcu123-lpc214x/lpc21isp-1.60.diff +++ b/nuttx/configs/mcu123-lpc214x/lpc21isp-1.60.diff @@ -2,82 +2,82 @@ diff -rub lpc21isp-1.60/lpc21isp.c lpc21isp-Linux//lpc21isp.c --- lpc21isp-1.60/lpc21isp.c 2008-07-21 15:17:06.000000000 -0600 +++ lpc21isp-Linux//lpc21isp.c 2008-09-16 09:21:20.000000000 -0600 @@ -22,6 +22,7 @@ - #include "adprog.h"
- #include "lpcprog.h"
- #include "lpcterm.h"
-+#include "errno.h"
-
- /*
- Change-History:
+ #include "adprog.h" + #include "lpcprog.h" + #include "lpcterm.h" ++#include "errno.h" + + /* + Change-History: @@ -319,10 +320,7 @@ -
- if (IspEnvironment->fdCom < 0)
- {
-- int* p_err = __error();
-- int err;
-- if (p_err) { err = *p_err; }
-- DebugPrintf(1, "Can't open COM-Port %s ! (Error: %dd (0x%X))\n", IspEnvironment->serial_port, err, err);
-+ DebugPrintf(1, "Can't open COM-Port %s ! (Error: %dd (0x%X))\n", IspEnvironment->serial_port, errno, errno);
- exit(2);
- }
-
+ + if (IspEnvironment->fdCom < 0) + { +- int* p_err = __error(); +- int err; +- if (p_err) { err = *p_err; } +- DebugPrintf(1, "Can't open COM-Port %s ! (Error: %dd (0x%X))\n", IspEnvironment->serial_port, err, err); ++ DebugPrintf(1, "Can't open COM-Port %s ! (Error: %dd (0x%X))\n", IspEnvironment->serial_port, errno, errno); + exit(2); + } + diff -rub lpc21isp-1.60/lpc21isp.h lpc21isp-Linux//lpc21isp.h --- lpc21isp-1.60/lpc21isp.h 2008-05-10 17:35:00.000000000 -0600 +++ lpc21isp-Linux//lpc21isp.h 2008-09-16 09:18:42.000000000 -0600 @@ -165,6 +165,7 @@ - #endif
-
- unsigned serial_timeout_count; /**< Local used to track timeouts on serial port read. */
-+ unsigned char DoNotStart; /* Do not start Code if this is set*/
-
- } ISP_ENVIRONMENT;
-
+ #endif + + unsigned serial_timeout_count; /**< Local used to track timeouts on serial port read. */ ++ unsigned char DoNotStart; /* Do not start Code if this is set*/ + + } ISP_ENVIRONMENT; + @@ -173,7 +174,6 @@ - #define DebugPrintf(in, ...)
-
- #else
--extern int debug_level;
-
- #if defined INTEGRATED_IN_WIN_APP
-
+ #define DebugPrintf(in, ...) + + #else +-extern int debug_level; + + #if defined INTEGRATED_IN_WIN_APP + @@ -191,7 +191,6 @@ -
- #else
- void DebugPrintf(int level, const char *fmt, ...);
--//#define DebugPrintf(level, ...) if (level <= debug_level) { TRACE( __VA_ARGS__ ); }
- #endif
-
- void ClearSerialPortBuffers(ISP_ENVIRONMENT *IspEnvironment);
+ + #else + void DebugPrintf(int level, const char *fmt, ...); +-//#define DebugPrintf(level, ...) if (level <= debug_level) { TRACE( __VA_ARGS__ ); } + #endif + + void ClearSerialPortBuffers(ISP_ENVIRONMENT *IspEnvironment); diff -rub lpc21isp-1.60/lpcprog.c lpc21isp-Linux//lpcprog.c --- lpc21isp-1.60/lpcprog.c 2008-07-21 14:39:50.000000000 -0600 +++ lpc21isp-Linux//lpcprog.c 2008-09-16 08:52:46.000000000 -0600 @@ -1062,15 +1062,16 @@ - }
- else
- {
-+ if (IspEnvironment->DoNotStart == 0)
-+ {
- DebugPrintf(2, "Now launching the brand new code\n");
- fflush(stdout);
--
- if (IspEnvironment->HalfDuplex == 0)
- sprintf(tmpString, "G %ld A\r\n", IspEnvironment->StartAddress);
- else
- sprintf(tmpString, "G %ld A\n", IspEnvironment->StartAddress);
--
- SendComPort(IspEnvironment, tmpString); //goto 0 : run this fresh new downloaded code code
-+
- if (IspEnvironment->BinaryOffset < LPC_RAMSTART)
- { // Skip response on G command - show response on Terminal instead
- ReceiveComPort(IspEnvironment, Answer, sizeof(Answer)-1, &realsize, 2, 5000);
+ } + else + { ++ if (IspEnvironment->DoNotStart == 0) ++ { + DebugPrintf(2, "Now launching the brand new code\n"); + fflush(stdout); +- + if (IspEnvironment->HalfDuplex == 0) + sprintf(tmpString, "G %ld A\r\n", IspEnvironment->StartAddress); + else + sprintf(tmpString, "G %ld A\n", IspEnvironment->StartAddress); +- + SendComPort(IspEnvironment, tmpString); //goto 0 : run this fresh new downloaded code code ++ + if (IspEnvironment->BinaryOffset < LPC_RAMSTART) + { // Skip response on G command - show response on Terminal instead + ReceiveComPort(IspEnvironment, Answer, sizeof(Answer)-1, &realsize, 2, 5000); @@ -1099,6 +1100,7 @@ - return (FAILED_RUN + GetAndReportErrorNumber(Answer));
- }
- }
-+ }
-
- fflush(stdout);
- }
+ return (FAILED_RUN + GetAndReportErrorNumber(Answer)); + } + } ++ } + + fflush(stdout); + } Only in lpc21isp-Linux/: lpcprog.c.orig diff -rub lpc21isp-1.60/Makefile lpc21isp-Linux//Makefile --- lpc21isp-1.60/Makefile 2008-04-07 00:23:00.000000000 -0600 @@ -85,18 +85,18 @@ diff -rub lpc21isp-1.60/Makefile lpc21isp-Linux//Makefile @@ -3,9 +3,9 @@ GLOBAL_DEP = adprog.h lpc21isp.h lpcprog.h lpcterm.h CC = gcc - + -ifneq ($findstring("freebsd", $(OSTYPE)),"") -CFLAGS+=-D__FREEBSD__ -endif +#ifneq ($findstring("freebsd", $(OSTYPE)),"") +#CFLAGS+=-D__FREEBSD__ +#endif - + adprog.o: adprog.c $(GLOBAL_DEP) $(CC) $(CDEBUG) $(CFLAGS) -c -o adprog.o adprog.c @@ -21,3 +21,4 @@ - + clean: $(RM) adprog.o lpcprog.o lpcterm.o lpc21isp + $(RM) *~ diff --git a/nuttx/configs/mcu123-lpc214x/src/Makefile b/nuttx/configs/mcu123-lpc214x/src/Makefile index 79f767fff..57630674d 100644 --- a/nuttx/configs/mcu123-lpc214x/src/Makefile +++ b/nuttx/configs/mcu123-lpc214x/src/Makefile @@ -45,7 +45,7 @@ else CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/arm -I$(TOPDIR)/sched endif -ASRCS = +ASRCS = AOBJS = $(ASRCS:.S=$(OBJEXT)) CSRCS = up_spi1.c up_leds.c |