Skip to content

Commit

Permalink
Update CM4 linker script assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
multiplemonomials committed Nov 26, 2024
1 parent 1179dd7 commit 469961e
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,15 @@ SECTIONS
_ebss = .;
} > SRAM_D2

/* Check if data + stack will exceed SRAM limit */
ASSERT(_ebss < ORIGIN(SRAM_D2) + LENGTH(SRAM_D2) - MBED_CONF_TARGET_BOOT_STACK_SIZE, "region SRAM does not have enough space for boot stack size")

.heap (COPY):
{
__end__ = .;
PROVIDE(end = .);
PROVIDE(__mbed_sbrk_start = .);
*(.heap*)
. = ORIGIN(SRAM_D2) + LENGTH(SRAM_D2) - MBED_CONF_TARGET_BOOT_STACK_SIZE;
PROVIDE(__mbed_krbs_start = .);
__HeapLimit = .;
} > SRAM_D2
/* .stack_dummy section doesn't contains any symbols. It is only
Expand All @@ -207,9 +208,6 @@ SECTIONS
__StackLimit = __StackTop - MBED_CONF_TARGET_BOOT_STACK_SIZE;
PROVIDE(__stack = __StackTop);

/* Check if data + heap + stack exceeds SRAM_D2 limit */
ASSERT(__StackLimit >= __HeapLimit, "region SRAM_D2 overflowed with stack")

/* Put crash data in the otherwise unused D3 SRAM */
.crash_data_ram :
{
Expand Down

0 comments on commit 469961e

Please sign in to comment.