As I commented in previous post I’m bought the board where I ran NuttX for the first time:

First I tried to get the a current NuttX version from git repository (as April 2023)

Configuring/Compiling:

$ ./tools/configure.sh olimex-lpc2378:nsh
$ make -j

Verifying current size:

$ size nuttx
text data bss dec hex filename
88816 464 1804 91084 163cc nuttx

Flashing

$ sudo openocd -f interface/vsllink.cfg -f target/lpc2378.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x0"
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
init_targets
Warning - assuming default core clock 4MHz! Flashing may fail if actual core clock is different.
Info : auto-selecting first available session transport "jtag". To override use 'transport select '.
Info : Versaloon(0x15)by Simon(compiled on Jul 8 2011)
Info : USB_TO_XXX abilities: 0x0000076E:0x010001EF:0xC0000007
Info : clock speed 500 kHz
Info : JTAG tap: lpc2378.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787 (), part: 0xf1f0, ver: 0x4)
Info : Embedded ICE version 7
Error: EmbeddedICE v7 handling might be broken
Info : lpc2378.cpu: hardware has 2 breakpoint/watchpoint units
Info : starting gdb server for lpc2378.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: lpc2378.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787 (), part: 0xf1f0, ver: 0x4)
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x00000000
Warn : NOTE! DCC downloads have not been enabled, defaulting to slow memory writes. Type 'help dcc'.
Warn : NOTE! Severe performance degradation without fast memory access enabled. Type 'help fast'.
Warn : Boot verification checksum in image (0xb8a06f58) to be written to flash is different from calculated vector checksum (0xb8a06f60).
Warn : OpenOCD will write the correct checksum. To remove this warning modify build tools on developer PC to inject correct LPC vector checksum.
auto erase enabled
wrote 98304 bytes from file nuttx.bin in 12.633556s (7.599 KiB/s)

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections

Then I removed the ISP_E and RST_E jumper, connected to minicom /dev/ttyUSB0 configured to 9600 8N1 and reset the board, but nothing appeared on terminal.

Then I decided to test again using an “ancient” version (NuttX 7.12), but to avoid modifying the Makefiles to work with new gcc toolchain, I installed the ARM GNU Toolchain arm-2010.09-51-arm-none-eabi.bin

I almost forgot that old toolchain uses “/” instead “:” to separate board from board profile:

$ cd nuttx-7.12
$ cd tools
$ ./configure.sh olimex-lpc2378/nsh
$ cd ..
$ make

Let’s see the size:

$ size nuttx
text data bss dec hex filename
94644 169 2400 97213 17bbd nuttx

Strange, this version is bigger than current version (that didn’t work)

Flashing:

$ sudo openocd -f interface/vsllink.cfg -f target/lpc2378.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x0"
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
init_targets
Warning - assuming default core clock 4MHz! Flashing may fail if actual core clock is different.
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Info : Versaloon(0x15)by Simon(compiled on Jul  8 2011)
Info : USB_TO_XXX abilities: 0x0000076E:0x010001EF:0xC0000007
Info : clock speed 500 kHz
Info : JTAG tap: lpc2378.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787 (<unknown>), part: 0xf1f0, ver: 0x4)
Info : Embedded ICE version 7
Error: EmbeddedICE v7 handling might be broken
Info : lpc2378.cpu: hardware has 2 breakpoint/watchpoint units
Info : starting gdb server for lpc2378.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: lpc2378.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787 (<unknown>), part: 0xf1f0, ver: 0x4)
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x00000000
Warn : NOTE! DCC downloads have not been enabled, defaulting to slow memory writes. Type 'help dcc'.
Warn : NOTE! Severe performance degradation without fast memory access enabled. Type 'help fast'.
Warn : Boot verification checksum in image (0xb8a06f58) to be written to flash is different from calculated vector checksum (0xb8a06f60).
Warn : OpenOCD will write the correct checksum. To remove this warning modify build tools on developer PC to inject correct LPC vector checksum.
auto erase enabled
wrote 98304 bytes from file nuttx.bin in 12.194902s (7.872 KiB/s)

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections

After entering on minicom (configured to 9600 8N1) and resetting the board I got this:

NuttShell (NSH) NuttX-7.12
nsh> uname -a
NuttX 7.12 d241ec59c0bf2909fbb07795b7a30ed3b3538aad arm olimex-lpc2378
nsh>

Now I need to git bisect NuttX to discover which patch broke it.

Important notes:

1) I faced a strange issue with OpenOCD, after flashing NuttX the OpenOCD stopped to work, seems like OpenOCD mess with some JTAG pins. The solution I found was using https://www.pjrc.com/arm/lpc2k_pgm/ to flash a simple blink LED example and then flash NuttX. I download the file lpc2k_pgm_1.05.tar.gz and modified the makefile to use “pkg-config –libs gtk+-2.0” and “pkg-config –cflags gtk+-2.0” instead of gtk-config. This is the program screen:

2) As mentioned above, after flashing NuttX you need to remove the ISP_E and RST_E jumper to avoid entering on bootloader mode after flashing the firmware.