@@ -9,6 +9,9 @@ EXTERN(__RESET_VECTOR);
9
9
object file that's passed to the linker *before* this crate */
10
10
EXTERN(__INTERRUPTS);
11
11
12
+ /* Provide a default for __VECTORS_END_ADDR. Can be overriden in the user memory.x file */
13
+ PROVIDE(__VECTORS_END_ADDR = 0x10000);
14
+
12
15
/* # Pre-initialization function */
13
16
/* If the user overrides this using the `pre_init!` macro or by creating a `__pre_init` function,
14
17
then the function this points to will be called before the RAM is initialized. */
@@ -78,17 +81,18 @@ SECTIONS
78
81
}
79
82
80
83
/* 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 , "
82
85
ERROR(msp430-rt): The VECTORS memory region must end at address 0x10000. Check memory.x");
83
86
84
- ASSERT(ADDR(.vector_table) + SIZEOF(.vector_table) == 0x10000 , "
87
+ ASSERT(ADDR(.vector_table) + SIZEOF(.vector_table) == __VECTORS_END_ADDR , "
85
88
ERROR(msp430-rt): .vector_table is shorter than expected.
86
89
Possible solutions, from most likely to less likely:
87
90
- Link to a svd2rust generated pac crate, if you are not
88
91
- Fix _sinterrupts in memory.x; it doesn't match the number of interrupts provided by the
89
92
pac crate
90
93
- Disable the 'device' feature of msp430-rt to build a generic application; a dependency
91
94
may be enabling it
95
+ - Override __VECTORS_END_ADDR if your vector table is not placed at the regular vector location
92
96
");
93
97
94
98
ASSERT(_sgot == _egot, "
0 commit comments