Skip to content

Commit 979be85

Browse files
Merge #167
167: Makefile: Support dumping stack size usage r=alistair23 a=alistair23 I have lots of issues of running out of stack, let's add a Makefile option to print stack usage. Signed-off-by: Alistair Francis <[email protected]> Co-authored-by: Alistair Francis <[email protected]>
2 parents dff5762 + eefde73 commit 979be85

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ setup:
3737
rustup component add rustfmt
3838
rustup component add clippy
3939
cargo install elf2tab --version 0.4.0
40+
cargo install stack-sizes
4041

4142
.PHONY: examples
4243
examples:
@@ -53,6 +54,10 @@ test:
5354
PLATFORM=nrf52 cargo test --workspace
5455
make examples
5556

57+
.PHONY: analyse-stack-sizes
58+
analyse-stack-sizes:
59+
cargo stack-sizes $(release) --example $(EXAMPLE) $(features) -- -Z emit-stack-sizes
60+
5661
.PHONY: hail
5762
hail:
5863
PLATFORM=hail cargo build $(release) --target=thumbv7em-none-eabi --examples $(features)

0 commit comments

Comments
 (0)