English
Language : 

AN4296 Datasheet, PDF (13/25 Pages) STMicroelectronics – The purpose of this application note is to give a presentation
AN4296
Execute application code from CCM RAM using the IAR EWARM toolchain
2.2.2
Updating the startup file
To update the startup file:
1. Make a second vector table to be stored in CCM RAM. The startup_stm32f30x.s file
should be modified by removing all entries except for sfe(CSTACK) and Reset_Handler
from the original vector table ‘__vector_table’.
2. Add a second vector table to be placed in CCM RAM. It should contain all entries. As
an example you can call it ‘__vector_table_CCMRAM’. This vector table must be
placed in the intvec_CCMRAM section defined in the linker file.
Figure 6. EWARM startup file update for interrupt handler
2.2.3
2.2.4
Place the interrupt handler in CCM RAM
Place the interrupt handler to be executed in CCM RAM as described in Section 2.1.2 or
the whole stm32f_it.c file as described in Section 2.1.1.
Remap the vector table to CCM RAM
In SystemInit function, remap the vector table to CCM RAM by modifying the VTOR register
as following:
SCB->VTOR = 0x10000000 | VECT_TAB_OFFSET;
DocID024590 Rev 3
13/25
24