Skip to content

Commit b1c0595

Browse files
committed
check that the heap doesn't overlap with .bss / .data
1 parent 7524ff3 commit b1c0595

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

cortex-m-rt/link.x.in

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,20 @@ cortex-m-rt: The reset vector is missing. This is a bug in cortex-m-rt. Please f
159159
report at: https://github.com/japaric/cortex-m-rt/issues");
160160

161161
ASSERT(__eexceptions - ORIGIN(FLASH) == 0x40, "
162-
cortex-m-rt: The exception handlers are missing. This is a bug in cortex-m-rt. Please file
162+
cortex-m-rt: The exception vectors are missing. This is a bug in cortex-m-rt. Please file
163163
a bug report at: https://github.com/japaric/cortex-m-rt/issues");
164164

165+
ASSERT(__sheap >= __ebss, "
166+
cortex-m-rt: The heap overlaps with the .bss section. This is a bug in cortex-m-rt. Please
167+
file a bug report at: https://github.com/japaric/cortex-m-rt/issues");
168+
169+
ASSERT(__sheap >= __edata, "
170+
cortex-m-rt: The heap overlaps with the .data section. This is a bug in cortex-m-rt.
171+
Please file a bug report at: https://github.com/japaric/cortex-m-rt/issues");
172+
165173
ASSERT(__einterrupts - __eexceptions > 0, "
166-
cortex-m-rt: The interrupt handlers are missing. Possible fixes, from most likely to less
167-
likely:
174+
cortex-m-rt: The interrupt vectors are missing. Possible solutions, from most likely to
175+
less likely:
168176
- Link to a device crate
169177
- Disable the 'device' feature of cortex-m-rt to build a generic application (a dependency
170178
may be enabling it)

0 commit comments

Comments
 (0)