ISP Upload for the NXP LPC804

This post will compare and discuss tools for the flashware upload to the NXP LPC804 microcontroller via ISP (in-system programming) UART interface.

GCC Toolchain

A usual GCC based toolchain looks like this:

“.c” file are compiled (CC), linked (LD) and the resulting .elf file is usually converted to “.hex”. The upload of the “.hex” binary is the last step in the chain. The microcontroller can be started, once the binary is successfully flashed.

I decided to have a closer look to the existing ISP upload tools:

LPC804 ISP Upload Tools

The following tools seem to be available for free:

  • “lpc21isp”, available on sf.net and github.com. The version here has been extended for the LPC804.
  • “mxli” is available here.
  • “FlashMagic” is a commercial tool, but offers a free version here.
  • “hex2lpc8xx” is my own ISP upload tool for the LPC804, it is available on github.

Operating System

OS lpc21isp mxli FlashMagic hex2lpc8xx
Windowsyesnoyesno
Linuxyesyesnoyes

Only lpc21isp can be compiled for Linux and Windows…

LPC804 Support and flash speed

If have checked support for the LPC804. Flash upload was tested with a 3K test file.

LPC804 lpc21isp mxli FlashMagic hex2lpc8xx
LPC804
Autodetect
yesnot for the LPC804yesyes
LPC804 Supportyes,
added by community
maybe,
but not predefined
yesyes
LPC804 Upload1 sec~ 2 sec5 sec

“mxli” might support LPC804, but there was no predefined setup for it. My own tool seems to be a little bit slow, compared to the other tools.

Execute Flashware

Launching the uploaded flashware reduces the effort. Usual steps are:

  1. Connect LPC804 to the host computer
  2. Put the LPC804 into ISP mode
  3. Execute reset to start the ISP bootloader
  4. ISP upload user code
  5. Put the LPC804 into user code mode
  6. Execute reset to start the user code

The manual effort is reduced if resets and/or ISP mode change are not required.

Auto Start lpc21isp mxli FlashMagic hex2lpc8xx
ISP Mode change required?yesunknownyesno
Reset for user codenounknownnono

For “hex2lpc8xx” the LPC804 can stay in ISP mode. No mode change and no further resets are required. The user code will be started after upload although the LPC804 is still configured for ISP mode.

Upload takes a little bit longer with “hex2lpc8xx”, but lesser manual handling is required after successful upload.

Conclusion

My plan is to work with Linux, so FlashMagic is not an option. Adding LPC804 support might be possible, but with two other options available, I decided to go ahead with “lpc21isp” and “hex2lpc8xx”. Both tools are available on my github page for the LPC804.

“lpc21isp” binary for windows is available here.

Next LPC804 Post: “NXP LPC804 Toolchain and Blink Project”

One thought on “ISP Upload for the NXP LPC804

Leave a comment