This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

seperate load and execution region for LPC24xx project ...

Hi everyone,

I have a need to store my program in the internal flash memory of the LPC24xx but execute the code from RAM. I tried to use scatter-loading. The problem is that I cannot get my complete memory image copied to RAM. The linker puts my provided sections only in one of the required regions.
Could I get a example of how to generate a project that loads the image to flash but at execution time copies the image to RAM and executes from RAM

Thank you,
Frank

Parents
  • Automatic copying of load region in Flash to execution region in RAM is performed in the pre-main (library function) which is called from startup. Therefore you need to place the startup code and this library code (InRoot$$Sections) into the region which has the same load and execution address (just like in your scatter file).

    The standard startup file with the mentioned scatter file is all what you need to make an application which is stored in flash and runs from RAM.

Reply
  • Automatic copying of load region in Flash to execution region in RAM is performed in the pre-main (library function) which is called from startup. Therefore you need to place the startup code and this library code (InRoot$$Sections) into the region which has the same load and execution address (just like in your scatter file).

    The standard startup file with the mentioned scatter file is all what you need to make an application which is stored in flash and runs from RAM.

Children
  • Hi Robert,

    this is exactly what I do but the library code always crashed.
    Now I found the reason. I accidentally selected MicroLib in my project and this causes the crash in the library code. After deselecting the MicroLib my scatterloading works.

    Frank