Trying to flash code in RAM of nRF52832 using Segger Embedded Studio.
Is there any SDK Example program for the same Please share the same
Trying to flash code in RAM of nRF52832 using Segger Embedded Studio.
Is there any SDK Example program for the same Please share the same
Not entirely clear what you mean by that?
You mean load code into RAM?
Yes I need to load code in RAM instead of Flash Memory.
I have not tried in any other Cortex M4 before, So I don't know whether it is different or Not.
I need (sic?) to execute the whole program(all function call) from RAM
Why?
If you explain your goal, people may be able to help you get there ...
http://www.catb.org/esr/faqs/smart-questions.html#goal
Again:
I have tried different methods
What, exactly, have you tried?
What problems, exactly, are you having?
My goal is very simple. I'm trying to flash blinky SDE example program directly to RAM. Such a way that if I power OFF & ON the board. LED should not blink.(Code will be gone off)
No, "running from RAM" is not a goal - it is a means to an end.
RAM is volatile - so, when you power-off the board, the code will be gone!
So running from RAM is not going to achieve your stated goal with the LED!
I have tried setting of ProgramSection load="No" in Flash area and making ProgramSection load="yes" in the RAM area in 'Flash_Placement.xml' and removed FLASH related Macro in Section Placement MAcro in Common (Private Configuration), but I got build error in many cases.
I have tried setting of ProgramSection load="No" in Flash area and making ProgramSection load="yes" in the RAM area in 'Flash_Placement.xml' and removed FLASH related Macro in Section Placement MAcro in Common (Private Configuration), but I got build error in many cases.
Please try the blinky example attached below. I just change the address range for the flash segment to code RAM. Segments should be renamed if you want to do it properly.
You also need to set update PC with the debugger to start execution from RAM:
EDIT: You also need to set the VTOR register if you need interrupt forwarding.
I have tried with some register configuration by referring http://markding.github.io/swd_programing_sram/ and can able to flash code successfully in RAM.
Thanks for your support on this Vidar for understanding what I need.
Could you elaborate how you did it? I also want to download my code to RAM so that I wouldn't damage the flash unit. It's for CI unit test.