I'm using µVision 4.50.0.0 with Keil MCB1700 with LPC1768.
I wrote a secondary boot-loader, that reads srecord file from usb and writes that into flash starting 0x20000. The AN10866.pdf from NXP helped a lot.
The application itself is built with following changes: Target Options IROM1 Start 0x20000 Size 0x60000 Asm options Define NO_CRP.
The following code should start my application after successful update/validating the present firmware:
#define APPL_RUN_ADDR 0x00020000 __asm void boot_jump(U32 address) { LDR SP, [R0] LDR PC, [R0, #4] } void run_appl() { SCB->VTOR = APPL_RUN_ADDR & 0x1FFFF80; boot_jump(APPL_RUN_ADDR); }
This code snippet is copied from nxp's AN10866.pdf, too.
But the firmware doesn't start reliable. Where do I stuck?
APPL_RUN_ADDR is defined to 0x20000
at 0x20004 there's 00020229 (this is the Reset_Handler fro my application, which I checked in the map file).
Unfortunately I don't find the AN10866.zip example files, to see how nxp's bootloader was built exactly.
What else have I forgotten to do?
Thanks in advance Hubert