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

How to relocate all code and data for Zephyr NCS nRF5340 project to RAM?

I've added:

zephyr_code_relocate(src/main.c SRAM)

and

CONFIG_CODE_DATA_RELOCATION=y

However, this only relocates by main to RAM.  Vectors, kernel, etc, are still going to flash.

How can I relocate all code and data to RAM?

 

Parents
  • Hi Heidi,

    Thanks!  That "trick" hadn't occurred to me.  That approach seems to get everything in RAM (although the segment is still called FLASH).

    Would be nice if there was a project configuration option that located everything in the RAM segment for the future...

    End Goal: I'm creating code that runs during manufacturing that tests and programs the PCBA.  This code is loaded into RAM via SWD from a custom production test fixture and then RPC over SWD is used to run the code from the text fixture.

    Best,

      Denis

Reply
  • Hi Heidi,

    Thanks!  That "trick" hadn't occurred to me.  That approach seems to get everything in RAM (although the segment is still called FLASH).

    Would be nice if there was a project configuration option that located everything in the RAM segment for the future...

    End Goal: I'm creating code that runs during manufacturing that tests and programs the PCBA.  This code is loaded into RAM via SWD from a custom production test fixture and then RPC over SWD is used to run the code from the text fixture.

    Best,

      Denis

Children
No Data
Related