Skip to content

Commit 0f93de2

Browse files
committed
nxp: fix vector redefinition from CMSIS
Since 5.7 CMSIS update to Mbed OS, __VECTOR_TABLE is defined in cmsis_gcc header file. Many MCU in NXP uses this symbol as linker definition, therefore we should check if already defined and undefined it. Fixes #13062
1 parent 165be79 commit 0f93de2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/fsl_common.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
*/
3030

3131
#include "fsl_common.h"
32+
33+
/* At least CMSIS 5.7 introduced vector table and define this GCC linker symbol to
34+
__Vectors - not valid for many NXP MCU. To fix this, we undefine it if already defined
35+
as it comes from a linker */
36+
#ifdef __VECTOR_TABLE
37+
#undef
38+
#endif
39+
3240
void InstallIRQHandler(IRQn_Type irq, uint32_t irqHandler)
3341
{
3442
/* Addresses for VECTOR_TABLE and VECTOR_RAM come from the linker file */

0 commit comments

Comments
 (0)