Execute a library from CCM SRAM
Follow the steps below to execute a library from CCM SRAM:
- Add the
.ccmramsection in the linker file as defined in Execute a function or an interrupt handler from CCM SRAM. - Place the library 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 library myLib.a 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*) *myLib.a:*(.text .text*) . = ALIGN(4); _eccmram = .; /* define a global symbols at ccmram end */ } >CCMRAM AT> FLASH /*--- End of CCMRAM linker section definition ---*/