This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Execute application loaded in RAM

Custom nRF52 device uses SPI interface for external flash, so in order to read/write to external flash would need a RAM loaded firmware to keep code in internal flash untouched. Is it possible to create something similar to this: https://github.com/ti-simplelink/flash-rover
For this would need to be able to execute application (non-soft device) in RAM. 
Would simply changing flash memory ranges with RAM memory ranges work? And if so where should those changes be made? 

  • Hi, for executing firmware from RAM the linker config would need to be changed from flash memory ranges to ones in RAM yes, and there would need to be some way of loading the firmware into RAM (for example via a debug probe connection, if there isn't going to be any involvement in this by firmware in flash).

    I'm guessing that you're not talking about execute-in-place (XIP) QSPI memory since you're mentioning SPI and executing from RAM?

    If you're using an IDE like Segger Embedded Studio or Keil µVision they should both have functionality for placing functions in RAM and will then generate the required startup code for copying them from their location in flash to their designated area in RAM, but I guess that's not exactly what you were looking for?