Skip to main content

STACK_MEMORY

Static STACK_MEMORY 

Source
#[unsafe(no_mangle)]
pub(crate) static mut STACK_MEMORY: [u8; 4096]
Expand description

Size to allocate for the stack.

This creates a static buffer inserted into the .stack_buffer section that the linker script picks up and places at the correct location in RAM.

This section attribute is only applied when targeting bare-metal (target_os = "none"). Host builds (e.g. tests, clippy, doc) use object formats (Mach-O, PE, …) that reject a bare section name like this, yielding errors such as: mach-o section specifier requires a segment and section separated by a comma.