Skip to content

Commit e12539f

Browse files
committed
Corrected stack vs hart_stack_size assertion
For example: 4 cores, each with 1KB hart_stack_size, should be able to fit a stack with a size of 4KB exactly. I.e 4 = (3 + 1) * 1
1 parent 025e42b commit e12539f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

riscv-rt/link.x.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ ASSERT(_stext + SIZEOF(.text) < ORIGIN(REGION_TEXT) + LENGTH(REGION_TEXT), "
218218
ERROR(riscv-rt): The .text section must be placed inside the REGION_TEXT region.
219219
Set _stext to an address smaller than 'ORIGIN(REGION_TEXT) + LENGTH(REGION_TEXT)'");
220220

221-
ASSERT(SIZEOF(.stack) > (_max_hart_id + 1) * _hart_stack_size, "
221+
ASSERT(SIZEOF(.stack) >= (_max_hart_id + 1) * _hart_stack_size, "
222222
ERROR(riscv-rt): .stack section is too small for allocating stacks for all the harts.
223223
Consider changing `_max_hart_id` or `_hart_stack_size`.");
224224

0 commit comments

Comments
 (0)