AnsweredAssumed Answered

LPC540xx: Run-Time Self-Programming of SPIFI flash

Question asked by bob belmont on May 10, 2019
Latest reply on May 15, 2019 by Ricardo Delsordo

We need to self-update external SPIFI flash where our code originally runs from (XIP). In order to do this , the SPIFI flash programming code must execute from RAM.


One way I was planning on addressing this is by:


a)create a specific project for the programming code (running from RAM); this project would have linker directives to exclusively target RAM for code and RW/RO datas.


b)inject the output (KEIL 's ".out") in the original code that runs from external flash


c)the original code would: copy the (RAM only) programming code at run-time from flash to RAM, relocate the vector table and jump to it.


I am struggling with (b)/(c) as I don't know the file format for the executable (.out). Do you have any suggestion or a better way to achieve this?