From 0b835aaed4e3d8fcef2b16b79f5979bb1feb5dab Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sat, 11 Jan 2025 10:55:26 +1100 Subject: [PATCH] cortex-m-rt: fix off-by-one in .text in FLASH section assert --- cortex-m-rt/link.x.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cortex-m-rt/link.x.in b/cortex-m-rt/link.x.in index 8e287d25..ecd1a991 100644 --- a/cortex-m-rt/link.x.in +++ b/cortex-m-rt/link.x.in @@ -266,7 +266,7 @@ ASSERT(ADDR(.vector_table) + SIZEOF(.vector_table) <= _stext, " ERROR(cortex-m-rt): The .text section can't be placed inside the .vector_table section Set _stext to an address greater than the end of .vector_table (See output of `nm`)"); -ASSERT(_stext > ORIGIN(FLASH) && _stext < ORIGIN(FLASH) + LENGTH(FLASH), " +ASSERT(_stext >= ORIGIN(FLASH) && _stext < ORIGIN(FLASH) + LENGTH(FLASH), " ERROR(cortex-m-rt): The .text section must be placed inside the FLASH memory. Set _stext to an address within the FLASH region.");