summaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-19 15:33:44 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-19 15:33:44 +0000
commitb54085ce47b1903bc32ccd30cda10be743202e7b (patch)
treeea95a91adab084d48f4fc9d2a5fad19d72eb4386 /nuttx/configs
parent8d8a27b82c3f5ebc31f7572ba013e816b496c19a (diff)
downloadpx4-nuttx-b54085ce47b1903bc32ccd30cda10be743202e7b.tar.gz
px4-nuttx-b54085ce47b1903bc32ccd30cda10be743202e7b.tar.bz2
px4-nuttx-b54085ce47b1903bc32ccd30cda10be743202e7b.zip
Update LPC2148 info
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@943 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs')
-rw-r--r--nuttx/configs/mcu123-lpc214x/README.txt25
-rw-r--r--nuttx/configs/mcu123-lpc214x/lpc21isp-1.60.diff102
-rw-r--r--nuttx/configs/mcu123-lpc214x/nsh/defconfig47
-rw-r--r--nuttx/configs/mcu123-lpc214x/ostest/Make.defs2
-rw-r--r--nuttx/configs/mcu123-lpc214x/ostest/defconfig47
-rw-r--r--nuttx/configs/mcu123-lpc214x/ostest/ld.script2
-rwxr-xr-xnuttx/configs/mcu123-lpc214x/ostest/setenv.sh2
7 files changed, 219 insertions, 8 deletions
diff --git a/nuttx/configs/mcu123-lpc214x/README.txt b/nuttx/configs/mcu123-lpc214x/README.txt
index 1314a24a5..b960c4401 100644
--- a/nuttx/configs/mcu123-lpc214x/README.txt
+++ b/nuttx/configs/mcu123-lpc214x/README.txt
@@ -1,7 +1,24 @@
README
^^^^^^
-Each Phillips LPC214x configuration is maintained in a sudirectory and
+Tools
+^^^^^
+
+I use the lpc21isp tool to load NuttX into FLASH. That tool is available
+in the files section at http://tech.groups.yahoo.com/group/lpc21isp/. In
+order version 1.60 of lpc21isp for Linux, I had to make several changes.
+This changes are shown in lpc21ips-1.60.diff.
+
+I use the script lpc21isp.sh to perform the actual download. You will
+probably have to make some changes to this script in order to use it.
+For example, the path to the built lpc21isp binary will most likely
+have to have change. Then move this script to the top level NuttX
+directory and simply execute it to load NuttX onto the board.
+
+Configurations
+^^^^^^^^^^^^^^
+
+Each NXP LPC214x configuration is maintained in a sudirectory and
can be selected as follow:
cd tools
@@ -15,3 +32,9 @@ ostest
^^^^^^
This configuration directory, performs a simple OS test using
examples/ostest.
+
+nsh
+^^^
+Configures the NuttShell (nsh) located at examples/nsh. The
+Configuration enables only the serial NSH interfaces.
+
diff --git a/nuttx/configs/mcu123-lpc214x/lpc21isp-1.60.diff b/nuttx/configs/mcu123-lpc214x/lpc21isp-1.60.diff
new file mode 100644
index 000000000..277b21921
--- /dev/null
+++ b/nuttx/configs/mcu123-lpc214x/lpc21isp-1.60.diff
@@ -0,0 +1,102 @@
+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:
+@@ -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);
+ }
+
+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;
+
+@@ -173,7 +174,6 @@
+ #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);
+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);
+@@ -1099,6 +1100,7 @@
+ 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
++++ lpc21isp-Linux//Makefile 2008-09-16 09:23:02.000000000 -0600
+@@ -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/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
index 34872041c..ddbfe328d 100644
--- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
@@ -335,16 +335,59 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
#
# Settings for examples/nsh
+#
+# CONFIG_EXAMPLES_NSH_FILEIOSIZE - Size of a static I/O buffer
+# CONFIG_EXAMPLES_NSH_STRERROR - Use strerror(errno)
+# CONFIG_EXAMPLES_NSH_LINELEN - Maximum length of one command line
+# CONFIG_EXAMPLES_NSH_STACKSIZE - Stack size to use for new threads.
+# CONFIG_EXAMPLES_NSH_NESTDEPTH - Max number of nested if-then[-else]-fi
+# CONFIG_EXAMPLES_NSH_DISABLESCRIPT - Disable scripting support
+# CONFIG_EXAMPLES_NSH_DISABLEBG - Disable background commands
+# CONFIG_EXAMPLES_NSH_ROMFSETC - Use startup script in /etc
+# CONFIG_EXAMPLES_NSH_CONSOLE - Use serial console front end
+# CONFIG_EXAMPLES_NSH_TELNET - Use telnetd console front end
+#
+# If CONFIG_EXAMPLES_NSH_TELNET is selected:
+# CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE -- Telnetd I/O buffer size
+# CONFIG_EXAMPLES_NSH_DHCPC - Obtain address using DHCP
+# CONFIG_EXAMPLES_NSH_IPADDR - Provides static IP address
+# CONFIG_EXAMPLES_NSH_DRIPADDR - Provides static router IP address
+# CONFIG_EXAMPLES_NSH_NETMASK - Provides static network mask
+# CONFIG_EXAMPLES_NSH_NOMAC - Use a bogus MAC address
+#
+# If CONFIG_EXAMPLES_NSH_ROMFSETC is selected:
+# CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT - ROMFS mountpoint
+# CONFIG_EXAMPLES_NSH_INITSCRIPT - Relative path to init script
+# CONFIG_EXAMPLES_NSH_ROMFSDEVNO - ROMFS RAM device minor
+# CONFIG_EXAMPLES_NSH_ROMFSSECTSIZE - ROMF sector size
+# CONFIG_EXAMPLES_NSH_FATDEVNO - FAT FS RAM device minor
+# CONFIG_EXAMPLES_NSH_FATSECTSIZE - FAT FS sector size
+# CONFIG_EXAMPLES_NSH_FATNSECTORS - FAT FS number of sectors
+# CONFIG_EXAMPLES_NSH_FATMOUNTPT - FAT FS mountpoint
+CONFIG_EXAMPLES_NSH_FILEIOSIZE=512
+CONFIG_EXAMPLES_NSH_STRERROR=n
+CONFIG_EXAMPLES_NSH_LINELEN=64
+CONFIG_EXAMPLES_NSH_STACKSIZE=2048
+CONFIG_EXAMPLES_NSH_NESTDEPTH=3
+CONFIG_EXAMPLES_NSH_DISABLESCRIPT=n
+CONFIG_EXAMPLES_NSH_DISABLEBG=n
+CONFIG_EXAMPLES_NSH_ROMFSETC=n
CONFIG_EXAMPLES_NSH_CONSOLE=y
CONFIG_EXAMPLES_NSH_TELNET=n
CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE=512
-CONFIG_EXAMPLES_NSH_CMD_SIZE=40
-CONFIG_EXAMPLES_NSH_STACKSIZE=2048
CONFIG_EXAMPLES_NSH_DHCPC=n
CONFIG_EXAMPLES_NSH_NOMAC=n
CONFIG_EXAMPLES_NSH_IPADDR=(10<<24|0<<16|0<<8|2)
CONFIG_EXAMPLES_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1)
CONFIG_EXAMPLES_NSH_NETMASK=(255<<24|255<<16|255<<8|0)
+CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT="/etc"
+CONFIG_EXAMPLES_NSH_INITSCRIPT="init.d/rcS"
+CONFIG_EXAMPLES_NSH_ROMFSDEVNO=0
+CONFIG_EXAMPLES_NSH_ROMFSSECTSIZE=64
+CONFIG_EXAMPLES_NSH_FATDEVNO=1
+CONFIG_EXAMPLES_NSH_FATSECTSIZE=512
+CONFIG_EXAMPLES_NSH_FATNSECTORS=1024
+CONFIG_EXAMPLES_NSH_FATMOUNTPT=/tmp
#
# Stack and heap information
diff --git a/nuttx/configs/mcu123-lpc214x/ostest/Make.defs b/nuttx/configs/mcu123-lpc214x/ostest/Make.defs
index f8451a321..6f40bbb32 100644
--- a/nuttx/configs/mcu123-lpc214x/ostest/Make.defs
+++ b/nuttx/configs/mcu123-lpc214x/ostest/Make.defs
@@ -1,5 +1,5 @@
##############################################################################
-# configs/mcu123-lpc214x/Make.defs
+# configs/mcu123-lpc214x/ostest/Make.defs
#
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/nuttx/configs/mcu123-lpc214x/ostest/defconfig b/nuttx/configs/mcu123-lpc214x/ostest/defconfig
index 8d6a46c7e..702178fe2 100644
--- a/nuttx/configs/mcu123-lpc214x/ostest/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/ostest/defconfig
@@ -335,16 +335,59 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
#
# Settings for examples/nsh
+#
+# CONFIG_EXAMPLES_NSH_FILEIOSIZE - Size of a static I/O buffer
+# CONFIG_EXAMPLES_NSH_STRERROR - Use strerror(errno)
+# CONFIG_EXAMPLES_NSH_LINELEN - Maximum length of one command line
+# CONFIG_EXAMPLES_NSH_STACKSIZE - Stack size to use for new threads.
+# CONFIG_EXAMPLES_NSH_NESTDEPTH - Max number of nested if-then[-else]-fi
+# CONFIG_EXAMPLES_NSH_DISABLESCRIPT - Disable scripting support
+# CONFIG_EXAMPLES_NSH_DISABLEBG - Disable background commands
+# CONFIG_EXAMPLES_NSH_ROMFSETC - Use startup script in /etc
+# CONFIG_EXAMPLES_NSH_CONSOLE - Use serial console front end
+# CONFIG_EXAMPLES_NSH_TELNET - Use telnetd console front end
+#
+# If CONFIG_EXAMPLES_NSH_TELNET is selected:
+# CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE -- Telnetd I/O buffer size
+# CONFIG_EXAMPLES_NSH_DHCPC - Obtain address using DHCP
+# CONFIG_EXAMPLES_NSH_IPADDR - Provides static IP address
+# CONFIG_EXAMPLES_NSH_DRIPADDR - Provides static router IP address
+# CONFIG_EXAMPLES_NSH_NETMASK - Provides static network mask
+# CONFIG_EXAMPLES_NSH_NOMAC - Use a bogus MAC address
+#
+# If CONFIG_EXAMPLES_NSH_ROMFSETC is selected:
+# CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT - ROMFS mountpoint
+# CONFIG_EXAMPLES_NSH_INITSCRIPT - Relative path to init script
+# CONFIG_EXAMPLES_NSH_ROMFSDEVNO - ROMFS RAM device minor
+# CONFIG_EXAMPLES_NSH_ROMFSSECTSIZE - ROMF sector size
+# CONFIG_EXAMPLES_NSH_FATDEVNO - FAT FS RAM device minor
+# CONFIG_EXAMPLES_NSH_FATSECTSIZE - FAT FS sector size
+# CONFIG_EXAMPLES_NSH_FATNSECTORS - FAT FS number of sectors
+# CONFIG_EXAMPLES_NSH_FATMOUNTPT - FAT FS mountpoint
+CONFIG_EXAMPLES_NSH_FILEIOSIZE=512
+CONFIG_EXAMPLES_NSH_STRERROR=n
+CONFIG_EXAMPLES_NSH_LINELEN=64
+CONFIG_EXAMPLES_NSH_STACKSIZE=2048
+CONFIG_EXAMPLES_NSH_NESTDEPTH=3
+CONFIG_EXAMPLES_NSH_DISABLESCRIPT=n
+CONFIG_EXAMPLES_NSH_DISABLEBG=n
+CONFIG_EXAMPLES_NSH_ROMFSETC=n
CONFIG_EXAMPLES_NSH_CONSOLE=y
CONFIG_EXAMPLES_NSH_TELNET=n
CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE=512
-CONFIG_EXAMPLES_NSH_CMD_SIZE=40
-CONFIG_EXAMPLES_NSH_STACKSIZE=2048
CONFIG_EXAMPLES_NSH_DHCPC=n
CONFIG_EXAMPLES_NSH_NOMAC=n
CONFIG_EXAMPLES_NSH_IPADDR=(10<<24|0<<16|0<<8|2)
CONFIG_EXAMPLES_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1)
CONFIG_EXAMPLES_NSH_NETMASK=(255<<24|255<<16|255<<8|0)
+CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT="/etc"
+CONFIG_EXAMPLES_NSH_INITSCRIPT="init.d/rcS"
+CONFIG_EXAMPLES_NSH_ROMFSDEVNO=0
+CONFIG_EXAMPLES_NSH_ROMFSSECTSIZE=64
+CONFIG_EXAMPLES_NSH_FATDEVNO=1
+CONFIG_EXAMPLES_NSH_FATSECTSIZE=512
+CONFIG_EXAMPLES_NSH_FATNSECTORS=1024
+CONFIG_EXAMPLES_NSH_FATMOUNTPT=/tmp
#
# Stack and heap information
diff --git a/nuttx/configs/mcu123-lpc214x/ostest/ld.script b/nuttx/configs/mcu123-lpc214x/ostest/ld.script
index 7b916da26..ecd740527 100644
--- a/nuttx/configs/mcu123-lpc214x/ostest/ld.script
+++ b/nuttx/configs/mcu123-lpc214x/ostest/ld.script
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/mcu123-lpc214x/ld.script
+ * configs/mcu123-lpc214x/ostest/ld.script
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh b/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh
index a6843f6dd..12915788d 100755
--- a/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh
+++ b/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# mcu123-lpc2148/setenv.sh
+# configs/mcu123-lpc2148/ostest/setenv.sh
#
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>