EWARM STM32 向量表偏移设置
system_stm32f2xx.c
#ifdef VECT_TAB_SRAM SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */ #else SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */ #endif
extern unsigned int __vector_table; SCB->VTOR = (unsigned int)&__vector_table;
startup_stm32f2xx.s
PUBLIC __vector_table DATA __vector_table DCD sfe(CSTACK) DCD Reset_Handler ; Reset Handler