We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello. How to execute code from RAM in uVision V4.60? I pulled BOOT0, BOOT1 to VDD. I don't know what is the next step.
When testing, you can just change your project and in the flash input boxes specify the start address of RAM and then you adjust the address range you specified in the RAM input boxes and shrink the values there correspondingly.
Note two things. 1) You need to check what requirements that specific processor has for interrupt vector table, so you get the vector table properly mapped into the RAM address range. You might have to adjust the startup file to take care of this.
2) You need to use a debugger script that sets the PC to the start of the address range where the code got loaded, since the physical processor will not know about your code in RAM and will try to do a normal start based on the reset vector.
When you later decide to run code in RAM in production use, you can make use of the configuration file for the linker, to have the linker store the code in flash, but configure it for duplication into RAM before your code starts to run. This is similar to how R/W variables have their initial values stored in flash and the startup file then extracts these values into RAM.