Skip to content

Commit beb4459

Browse files
iabdalkaderdpgeorge
authored andcommitted
mimxrt/boards: Fix __VECTOR_TABLE link issue with CMSIS 5.9.0.
In CMSIS 5.9.0, the compiler headers define `__VECTOR_TABLE`, which will be substituted with its corresponding value (e.g., `__Vectors` for gcc). However, the linker script in this port can't include compiler headers when it's processed, so `__VECTOR_TABLE` is used as the literal variable name, which results in an undefined linker error. To fix this, the two possible values of `__VECTOR_TABLE` are both defined in the linker script. Signed-off-by: iabdalkader <[email protected]>
1 parent e2fa0c6 commit beb4459

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ports/mimxrt/boards/common.ld

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,14 @@ SECTIONS
8383
/* The startup code goes first into internal RAM */
8484
.interrupts :
8585
{
86-
__VECTOR_TABLE = .;
86+
__Vectors = .;
87+
__vector_table = .;
8788
. = ALIGN(4);
8889
KEEP(*(.isr_vector)) /* Startup code */
8990
. = ALIGN(4);
9091
} > m_interrupts
9192

92-
__VECTOR_RAM = __VECTOR_TABLE;
93+
__VECTOR_RAM = __Vectors;
9394
__RAM_VECTOR_TABLE_SIZE_BYTES = 0x0;
9495

9596
/* The program code and other data goes into internal RAM */

0 commit comments

Comments
 (0)