1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00

PICO: Update linker script for stack symbols.

This commit is contained in:
Matthew Selby 2025-06-02 15:51:49 +01:00
parent 0381a9102b
commit 8dd081e874

View file

@ -248,7 +248,7 @@ SECTIONS
*(.scratch_y.*) *(.scratch_y.*)
. = ALIGN(4); . = ALIGN(4);
__scratch_y_end__ = .; __scratch_y_end__ = .;
} > SCRATCH_Y AT > FLASH } > SCRATCH_Y AT > FLASH =0xa5a5a5a5 /* BF: want to fill with STACK_FILL_CHAR to allow stack check - this doesn't seem to do it */
__scratch_y_source__ = LOADADDR(.scratch_y); __scratch_y_source__ = LOADADDR(.scratch_y);
/* .stack*_dummy section doesn't contains any symbols. It is only /* .stack*_dummy section doesn't contains any symbols. It is only
@ -306,6 +306,14 @@ SECTIONS
__StackBottom = __StackTop - SIZEOF(.stack_dummy); __StackBottom = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop); PROVIDE(__stack = __StackTop);
/* BetaFlight:
* &_estack == Highest address of the user mode stack
* &_Min_Stack_Size = "required" (guaranteed) amount of stack
* We have all of SCRATCH_Y available uncontested for stack, length 4k = 0x1000
*/
_estack = __StackTop;
_Min_Stack_Size = 0x1000;
/* picolibc and LLVM */ /* picolibc and LLVM */
PROVIDE (__heap_start = __end__); PROVIDE (__heap_start = __end__);
PROVIDE (__heap_end = __HeapLimit); PROVIDE (__heap_end = __HeapLimit);