Content originally posted in LPCWare by mark.williamson.cml on Fri Jun 01 04:07:38 MST 2012
Thank you - I've switched to using the LPCXpresso driver to flash the part, rather than programming in application.
I'm running into a bit of confusion on exactly how the process is to work though - I have read various threads on this forum and looked through the manuals and I still feel a bit vague about a couple of topics.
I want to use the boot ROM on the LPC43xx to load the application into RAM. I'm trying to get the image into Flash in whatever format that bootloader expects, but I want the code to be linked to run from RAM once it's kicked off.
I'm not clear on:
[LIST]
[*]How the header expected by the ROM bootloader should be added. Should I generate it and put it in a linker section? Can I get the tools to do it?
[*]How do I need to alter the linker scripts I'm using (if it all) to get code that already runs from RAM to boot from Flash OK?
[/LIST]
I've tried adding the header manually to the start of the binary but I'm not 100% convinced either that I've done it correctly, or whether I was supposed to!
I've not managed to persuade the downloader into attempting a programming without setting the LMA of the text segment explicitly to be in the SPI Flash area - which seems fair enough. However even when I do that and programming succeeds I get an error (Wt:43:Invalid Reset Vector - out of range) and the device fails to boot.
I can supply more detailed error logs if necessary. In the meantime I'll keep trying to puzzle it out.