English
Language : 

AN4296 Datasheet, PDF (8/25 Pages) STMicroelectronics – The purpose of this application note is to give a presentation
Execute application code from CCM RAM using the IAR EWARM toolchain
2
Execute application code from CCM RAM
using the IAR EWARM toolchain
AN4296
2.1
Note:
Executing a simple code from CCM RAM (except for interrupt
handler)
A simple code can be composed of one or more functions that are not referenced from an
interrupt handler. If the code is referenced from an interrupt handler, follow the steps
described in Section 2.2: Executing an interrupt handler from CCM RAM.
EWARM provides the possibility to place one or more functions or a whole source file in
CCM RAM.
This operation requires a new section to be defined in the linker file (.icf) to host the code to
be placed in CCM RAM. This section is copied to CCM RAM at startup. The required steps
are the following:
1. Define the address area for the CCM RAM by indicating the start and end addresses.
2. Tell the linker to copy at startup the section named .ccmram from Flash memory to
CCM RAM.
3. Indicate to the linker that the code section .ccmram should be placed in the CCM RAM
region.
Refer to Figure 2: EWARM linker update for an example of code implementing these
operations.
This procedure is not valid for interrupt handlers.
8/25
DocID024590 Rev 3