cancel
Showing results for 
Search instead for 
Did you mean: 

Execute specific functions from RAM

nagarasr
Associate II

Hi, I would like to know the procedure to execute specific functions from RAM.

I have tried __ramfunc at beginning of the function but it requires all the subsequent functions also to be run from RAM. This would require lot of manual code updates. Is there a way to do it from linker script? I tried placing the functions like below but it would not move the function from ROM to RAM.

place in RAM_region { readwrite,
                                    block CSTACK,
                                    block HEAP,
                                    readonly object function1 // this is my expected function to run from RAM
};

10 REPLIES 10

Did you test the project I shared as it is and checked how it works?

Are you using an RTOS? if yes start with a simple code (without RTOS), then move on to a complex code.

For the interrupt, I suggested to follow the application note section: 2.2 Execute an interrupt handler from CCM SRAM.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.