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

 

posted @ 2014-02-25 19:40  IAmAProgrammer  阅读(1115)  评论(0编辑  收藏  举报