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?
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?
Hi!
I co-worker of mine has this Zephyr blinky sample that executes from RAM on the app core of the nRF5340, by replacing the flash memory ranges with RAM addresses in an overlay file.
Is that what you were looking for?
What is your end goal with moving all code to RAM?
Best regards,
Heidi
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