Skip to content

Commit

Permalink
Mention value of STACK_PAINT_VALUE
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgreig committed Aug 15, 2024
1 parent 1074ea5 commit 0df6752
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cortex-m-rt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@
//!
//! ## `paint-stack`
//!
//! Everywhere between `__sheap` and `___stack_start` is painted with the fixed value `STACK_PAINT_VALUE`.
//! Everywhere between `__sheap` and `___stack_start` is painted with the fixed value
//! `STACK_PAINT_VALUE`, which is `0xCCCC_CCCC`.
//! You can then inspect memory during debugging to determine how much of the stack has been used -
//! where the stack has been used the 'paint' will have been 'scrubbed off' and the memory will
//! have a value other than `STACK_PAINT_VALUE`.
Expand Down Expand Up @@ -475,9 +476,8 @@
extern crate cortex_m_rt_macros as macros;

/// The 32-bit value the stack is painted with before the program runs.
///
/// Note: keep this value in-sync with the start-up assembly code, as we can't
/// use const values in `global_asm!` yet.
// Note: keep this value in-sync with the start-up assembly code, as we can't
// use const values in `global_asm!` yet.
#[cfg(feature = "paint-stack")]
pub const STACK_PAINT_VALUE: u32 = 0xcccc_cccc;

Expand Down

0 comments on commit 0df6752

Please sign in to comment.