@@ -9,6 +9,9 @@ EXTERN(__RESET_VECTOR);
99 object file that's passed to the linker *before* this crate */
1010EXTERN(__INTERRUPTS);
1111
12+ /* Provide a default for __VECTORS_END_ADDR. Can be overriden in the user memory.x file */
13+ PROVIDE(__VECTORS_END_ADDR = 0x10000);
14+
1215/* # Pre-initialization function */
1316/* If the user overrides this using the `pre_init!` macro or by creating a `__pre_init` function,
1417then the function this points to will be called before the RAM is initialized. */
@@ -78,17 +81,18 @@ SECTIONS
7881}
7982
8083/* Do not exceed this mark in the error messages below | */
81- ASSERT(ORIGIN(VECTORS) + LENGTH(VECTORS) == 0x10000 , "
84+ ASSERT(ORIGIN(VECTORS) + LENGTH(VECTORS) == __VECTORS_END_ADDR , "
8285ERROR(msp430-rt): The VECTORS memory region must end at address 0x10000. Check memory.x");
8386
84- ASSERT(ADDR(.vector_table) + SIZEOF(.vector_table) == 0x10000 , "
87+ ASSERT(ADDR(.vector_table) + SIZEOF(.vector_table) == __VECTORS_END_ADDR , "
8588ERROR(msp430-rt): .vector_table is shorter than expected.
8689Possible solutions, from most likely to less likely:
8790- Link to a svd2rust generated pac crate, if you are not
8891- Fix _sinterrupts in memory.x; it doesn't match the number of interrupts provided by the
8992 pac crate
9093- Disable the 'device' feature of msp430-rt to build a generic application; a dependency
9194may be enabling it
95+ - Override __VECTORS_END_ADDR if your vector table is not placed at the regular vector location
9296");
9397
9498ASSERT(_sgot == _egot, "
0 commit comments