mirror of https://github.com/ARMmbed/mbed-os.git
[M2351] Support __vector_table instead of __vector_handlers in IAR
parent
1f27546480
commit
c5494eb751
|
@ -398,6 +398,7 @@ void Default_Handler(void)
|
|||
}
|
||||
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
uint32_t GetPC(void)
|
||||
{
|
||||
uint32_t val=0;
|
||||
|
@ -407,4 +408,5 @@ __asm {
|
|||
MOV val, R0
|
||||
}
|
||||
return val;
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -19,8 +19,11 @@
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
#if defined(__ICCARM__)
|
||||
extern void *__vector_table; /* see startup file */
|
||||
#else
|
||||
extern void *__vector_handlers; /* see startup file */
|
||||
#endif
|
||||
extern uint32_t GetPC(void); /* Get current program counter(PC) */
|
||||
|
||||
|
||||
|
@ -70,8 +73,12 @@ void SystemInit(void)
|
|||
{
|
||||
|
||||
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
||||
#if defined(__ICCARM__)
|
||||
SCB->VTOR = (uint32_t) &__vector_table;
|
||||
#else
|
||||
SCB->VTOR = (uint32_t) &__vector_handlers;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
TZ_SAU_Setup();
|
||||
|
|
Loading…
Reference in New Issue