Skip to content

Commit b02ec57

Browse files
authored
Merge pull request rust-embedded#573 from 9names/fix_stext_assert
cortex-m-rt: fix off-by-one in .text in FLASH section assert
2 parents 9177271 + 0b835aa commit b02ec57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cortex-m-rt/link.x.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ ASSERT(ADDR(.vector_table) + SIZEOF(.vector_table) <= _stext, "
266266
ERROR(cortex-m-rt): The .text section can't be placed inside the .vector_table section
267267
Set _stext to an address greater than the end of .vector_table (See output of `nm`)");
268268

269-
ASSERT(_stext > ORIGIN(FLASH) && _stext < ORIGIN(FLASH) + LENGTH(FLASH), "
269+
ASSERT(_stext >= ORIGIN(FLASH) && _stext < ORIGIN(FLASH) + LENGTH(FLASH), "
270270
ERROR(cortex-m-rt): The .text section must be placed inside the FLASH memory.
271271
Set _stext to an address within the FLASH region.");
272272

0 commit comments

Comments
 (0)