lpcware

LPC1754 Execute from RAM to program Flash

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by wdawson61 on Fri Aug 05 10:24:46 MST 2011
Hi all.  I need to implement the ability for an LPC1754 to update its entire 128k flash from code executing in RAM. I.e., the RAM code buffers the data from a peripheral and writes to flash using IAP.  We do not have access to UART0 so Can't just use ISP like we should.  I realize there will be a substantial risk of bricking the part, but need to proceed none the less. So, here is what I'm asking:

To build an image that can run from (a specific location in) RAM, do I just  modify my linker script to make all sections, text, bss, stack, load into one or more of the RAM sections?

Can an initialized data section still be used? 
i.e.
const int a=5;

Do I need to set any entry special point, etc?

Can I run this project under the debugger to test it?

Are there examples of this anywhere on the forum?

Many thanks in advance!

Wade.

Outcomes