-
-
Notifications
You must be signed in to change notification settings - Fork 75
Failure to detect heap #360
Comments
cortex-m-rt exports an Due to the |
ah that was the original plan, it seems like that didn't work right: #31 (comment) |
Ah I see. I really liked the watermark idea from the linked issue since it would work with heap and could also report approximate stack usage. Any reasons for not doing that instead? I imagine chips with large memory could be slow, but is that an issue with anything that probe-rs supports? |
That is what we implemented |
@chemicstry You can enable this feature with the |
It seems that this is the best we can do. But I personally don't know if the symbols |
It seems that $ probe-run --chip STM32F429ZITx --measure-stack target/thumbv7em-none-eabihf/release/fw-power-switching
(HOST) INFO flashing program (119 pages / 119.00 KiB)
(HOST) INFO success!
(HOST) INFO painting 181.31 KiB of RAM for stack usage estimation
────────────────────────────────────────────────────────────────────────────────
...
────────────────────────────────────────────────────────────────────────────────
(HOST) INFO reading 181.31 KiB of RAM for stack usage estimation
(HOST) INFO program has used at least 181.31/181.31 KiB (100.0%) of stack space It could be due to an issue with my code, though. I will update once I find more time to investigate this. |
Is this example with some kind of heap? Atm, we only handle single-ram chips well. |
I'm using heap provided by alloc-cortex-m on STM32F429ZIT6, however probe-run fails to detect heap usage and still installs stack canary, which results in bogus warnings like:
I have narrowed the problem to this heap check, which fails to detect any of the alloc symbols.
Output of
cargo nm --release | grep alloc
:So it seems that rust compiler does not emit the
__rust_alloc
symbol, or it gets inlined? I'm not sure what would be the best way to fix this. Adding additional symbols to check like__rust_realloc
might not be fail-proof if they can be inlined too.The text was updated successfully, but these errors were encountered: