lpcware

IAP boot image generation using Keil uVision 4

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by jeffh on Thu Aug 01 15:45:40 MST 2013
I would like to use IAP to update the internal flash boot image at runtime.  I am using lpc4357 so one bank will be running the current boot image and the other bank will be used to store/run the new image.  I have this working but I have to compile the new image specifically for the intended bank or else it won't work.  Is there some way to use relative addressing in Keil so I can compile one image to use for IAP regardless if it is placed in bank 0 or 1?

Two more issues concerning IAP:
1. The IAP section in the manual says:
"IAP commands which result in a flash write/erase operation use 32 bytes of space in the top portion of the on-chip RAM for execution."
Which specific RAM address range is being used for the 32 bytes?  The 4357 has local and AHB RAM in non-contiguous regions.

2. When IAP is completed and I set the active flash bank to the new boot image, I want to reset the chip to boot using the new image.  I call NVIC_SystemReset() but this seems to just reset and run the old image.  What is the correct way to boot to the new image?

Outcomes