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

STM32 - execute code from RAM


Hi,

My requirement is, I need the code itself should copy into RAM from Internal Flash and execute from RAM.

please post your suggestions for this implementation.

Thanks & Regards,

Saneesh

Parents
  • Hi Saneesh,

    Assuming you're using uVision you can right-click on a file in your project, select "Options for file..." and select the RAM region configured for your project in the "Code/const" dropdown. The scatter load mechanism should take care of everything for you.

    You can also hand-edit the scatter load (*.sct) file to achieve the same thing. Read up on scatter loading in the ARM documentation.

    Keil has an example for this approach here, assuming you have Keil installed in C:\Keil:

    C:\Keil\ARM\Examples\RAM_Function

    Andrew

Reply
  • Hi Saneesh,

    Assuming you're using uVision you can right-click on a file in your project, select "Options for file..." and select the RAM region configured for your project in the "Code/const" dropdown. The scatter load mechanism should take care of everything for you.

    You can also hand-edit the scatter load (*.sct) file to achieve the same thing. Read up on scatter loading in the ARM documentation.

    Keil has an example for this approach here, assuming you have Keil installed in C:\Keil:

    C:\Keil\ARM\Examples\RAM_Function

    Andrew

Children