Execute a file from CCM SRAM
Executing a source file from CCM SRAM means that all functions declared in this file are executed from CCM SRAM.
To execute a file from CCM SRAM, follow the steps listed below:
- Add the
.ccmramsection in the linker file as defined in Execute a function or an interrupt handler from CCM SRAM. - Place the file in CCM SRAM as shown below. The startup file also needs to be updated to copy code from the flash memory to CCM SRAM as described in Execute a function or an interrupt handler from CCM SRAM.
This example shows how to execute file myTestCCM.o from CCM SRAM:
/*--- New CCMRAM linker section definition ---*/ _siccmram = LOADADDR(.ccmram); /* CCMRAM section */ .ccmram : { . = ALIGN(4); _sccmram = .; /* define a global symbols at ccmram start */ *(.ccmram) *(.ccmram*) *myTestCCM.o(.text .text*) . = ALIGN(4); _eccmram = .; /* define a global symbols at ccmram end */ } >CCMRAM AT> FLASH /*--- End of CCMRAM linker section definition ---*/