Content originally posted in LPCWare by PhilYoung on Sun Mar 25 05:07:22 MST 2012
I have programmed the oroginal silicon using the Keil tools and uLink2 /uLink-pro, haven't tried the new silicon yet but going to modify the code for that today.
The device is programmed in the same way as any other LPC device by downloading a programmer into internal RAM using the Keil flash programmer framework.
On the original device I used a programmer supplied by NXP and a script which the debugger executed to set up the EMC for flash programming, but now that the device is finalized I'm planning to modify the programmer to set up the EMC itself.
This should be quite easy to do since I already have the EMC setup code in the app so I can re-use it, the only part requiring any real thought should be just going through the manufacturers device datasheet to set up the table for the particular flash I'm using.
once this is done ti's no different to the mechanism used for programming the internal flash on existing LPC devices, just tell the tool which programmer to download that suits your flash device.
you can find the template programmer in C:\Keil\ARM\Flash\_Template, just add code to set up the EMC and customize the flash table to suit, then build it as position independant code and select a suitable internal ram area to load it to in the flash tools dialog.
regards
Phil.