Skip to content

Commit 22ba919

Browse files
committed
cmrt: change condition on _stext location check
This avoids spurious errors when `.text` doesn't fit in `FLASH` which have nothing to do with the position of `_stext`. By not checking, we let the linker provide its own, more-useful, error. Closes #509.
1 parent 6b3a5b7 commit 22ba919

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cortex-m-rt/link.x.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ ASSERT(ADDR(.vector_table) + SIZEOF(.vector_table) <= _stext, "
257257
ERROR(cortex-m-rt): The .text section can't be placed inside the .vector_table section
258258
Set _stext to an address greater than the end of .vector_table (See output of `nm`)");
259259

260-
ASSERT(_stext + SIZEOF(.text) < ORIGIN(FLASH) + LENGTH(FLASH), "
260+
ASSERT(_stext > ORIGIN(FLASH) && _stext < ORIGIN(FLASH) + LENGTH(FLASH), "
261261
ERROR(cortex-m-rt): The .text section must be placed inside the FLASH memory.
262-
Set _stext to an address smaller than 'ORIGIN(FLASH) + LENGTH(FLASH)'");
262+
Set _stext to an address within the FLASH region.");
263263

264264
/* # Other checks */
265265
ASSERT(SIZEOF(.got) == 0, "

0 commit comments

Comments
 (0)