Skip to content

Add stack measurement to the STM32 framework #131

@bifurcation

Description

@bifurcation

The cortex-m-rt crate supports a paint-stack feature, which adds code to the binary to paint the stack before the program runs. We should add a few things so that we can do stack usage measurements based on stack painting:

  • Add code to find the "high water mark" of the paint after some program execution
  • Add code to "repaint" the stack to allow incremental measurements

There is some initial code in ui-stm32/src/stack.rs for these functions, and ui-stm32/src/bin/stack.rs is a small test binary. Be cautious with these, however -- running an earlier version of the test binary rendered my UI chip completely non-functional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions