Content originally posted in LPCWare by lpcxpresso-support on Fri Nov 14 03:48:29 MST 2014
It downloads via SWD or JTAG.
Assuming that you really do want to try to download a program into flash via SWD or JTAG, then you are basically going to have to implement most of the functionality of a debugger (gain control of the CPU, download data into RAM, setup the registers, start executing the program). Then you are going to need to communicate with that program to send it data and tell it to program the flash with the data that you send it.
Or, you might want to rethink what you are trying to do here...