Update LPC2148 info
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@943 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
e350fb216f
commit
2573d84a30
@ -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.
|
||||
|
||||
|
102
configs/mcu123-lpc214x/lpc21isp-1.60.diff
Normal file
102
configs/mcu123-lpc214x/lpc21isp-1.60.diff
Normal file
@ -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) *~
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user