Expand description
The main stack’s high-water, by paint and scan.
Identical in m5stack-core and korvo1-bsp on purpose, as monitor
is: change it in one, change it in the other, and cmp them.
esp_rtos::stack_usage reports heap-allocated task stacks only; the main
stack is linker-provided (.stack) and already in use when the scheduler
starts, so nothing reports it unless it is painted before it is used. A
margin read off .stack’s size is not a margin: on these chips the region
is the linker’s slack, and nothing but a reading separates a comfortable
build from one that faults mid-session.
Functions§
- main_
stack_ margin - Bytes between the bottom of the main stack and its deepest use so far, or
Noneif it was never painted. - main_
stack_ size - The main stack’s size:
.stack, as linked. - paint_
main_ stack - Paint the main stack below the stack pointer.