7 years, 2 months ago.

what am I doing wrong when programming mbed lpc-1768 code to custom pcb with a Segger Flasher Arm?

Developed very simple code to run on the MBED LPC-1768 development board. It ran fine with the created binary. However, when I program the flash through the JTAG using the Segger Flasher Arm programmer. I went through the steps and everything seems fine and the software states the flash was successfully programed and verified. After powering the custom pcb down and then back up, the code does not seem to run. I loaded the firmware code starting at 0x40000.

1 Answer

7 years, 2 months ago.

I have used Segger Jflash to flash an LPC1768 using SWD as well as JTAG and that works fine. Compile using mbed online, save the bin file to some directory on the PC. Start JFlash, Select a default LPC1768.jflash project settings file, open your bin as datafile, startaddress 0, flash and verify, then select the ''start application'' option.

The default LPC1768 project file should select all sectors and start at sector0 address 0x0 (check options/project settings/flash tab).

How do you check that the program is running (blink LED?)

Make sure that the clock is Ok and that the device is not held in reset.

Yes that works with bins created from the on-line compliler. However, I was trying out elua bin for the mbed lpc-1768. While it ran fine on the mbed board, the same binary did not run on custom pcb like other mbed programs whose binary were generated by the on-lne complier. Why will elua bin work on the MBED but not on the custom PCB with same LPC-1768?

posted by todd Hagan 02 Feb 2017

I never tried the elua binary stuff on mbed. One thing I noticed in some discussions was that it needs the mbed filesystem. That filesystem is provided by the interface chip on the lpc1768 mbed and wont be available on your customboard. Maybe this explains why it wont work. Your own regular testcode seems to work Ok, so it might be the specific needs of elua that are causing problems.

posted by Wim Huiskamp 03 Feb 2017