Content originally posted in LPCWare by Pacman on Sat Jun 14 10:37:27 MST 2014
Unfortunately I don't have any experience in making bootloaders.
However, I've written a fairly good amount of Cortex-M assembly, and I've also written my own startup-code, which I use for most of my projects.
A bootloader is just a normal firmware 'program' that runs on the microcontroller.
It's the first program that is executed.
-So instead of executing your normal code, you write such a bootloader.
The LPC still have its own ROM bootloader, which is executed before your bootloader.
Your bootloader should set up the external memories (flash and sdram), then either execute the code in the external flash memory directly (if possible), or copy that code from the external flash memory to your SDRAM, and then jump to that code.
-But I think it would be a good idea if NXP can confirm that it can be done the way I've mentioned.