Add CFI directives to asm blocks
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- embedded-iot
Research direction
Start by locating the assembly blocks in the cortex-m crate and read the linked ARM guidance and related rust-embedded/aarch32 issue. Use the reported probe-rs unwind error as a reference when checking the affected paths. Done means the debugger can unwind through the relevant assembler functions without the reported CFA error.
Written by the indexing model from the issue text.
Description
See https://support.arm.com/documentation/107976/22-1-0/Debug-information-for-your-application/How-to-get-a-backtrace-through-AArch32-assembler-functions for details on telling the debugger about where functions start and end, and when LR is corrupted.
See also https://github.com/rust-embedded/aarch32/issues/230
This might resolve the following probe-rs error:
Firmware exited with: Unknown runtime error
ERROR probe_rs_debug::debug_info: Other("UNWIND: Tried to unwind `RegisterRule` at CFA = None.")
Core 0
Frame 0: syscall1 @ 0x16c4 inline
/Users/jonathan/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cortex-m-semihosting-app/src/bin/panic.rs:9:1
<snip stack frames>
Frame 9: Reset : ERROR: UNWIND: Tried to unwind `RegisterRule` at CFA = None. @ 0x13a
Error: Unknown runtime error
- Dominant language
- Rust
- Stars
- 1k
- Forks
- 201
- Avg merge
- 1h 8m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-embedded/cortex-m
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
rust-embedded/cortex-m#651 · 5 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rust-embedded/cortex-m#637 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rust-embedded/cortex-m#511 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
rust-embedded/cortex-m#694 · 1 comment ·
-
Enabling LOBOpen
Difficulty 4/5 3-5 days Newbie friendliness 52/100
rust-embedded/cortex-m#691 · 1 comment ·
All issues in rust-embedded/cortex-m
Similar issues
-
[Feature]: [P3] engine-rs: the package source hash should ignore line endings and untracked filesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
maniator/verticopolis#880 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 3 days
-
defect
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days