Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert rtic from 0.5.5 to 0.5.3 #143

Closed
wants to merge 2 commits into from

Conversation

HarryMakes
Copy link
Contributor

This is to fix a panicking upon initialization problem that can be resolved by reverting the update earlier taken on the rtic crate.

Since d5916c5 where rtic is bumped from 0.5.3 to 0.5.5, the compiled firmware will cause the Stabilizer panick upon powering up. With GDB, the backtrace looks like this:

(gdb) backtrace
#0  0x08020c90 in rust_begin_unwind (_info=<optimized out>)
#1  0x08017532 in core::panicking::panic_fmt () at library/core/src/panicking.rs:85
#2  0x0801f0d0 in core::option::expect_failed () at library/core/src/option.rs:1213
#3  0x08014674 in stabilizer::init (c=...)
    at /rustc/6af1bdda54abc9e919fc1137411dfc4311e05649/library/core/src/option.rs:370
#4  0x0801741c in stabilizer::APP::main () at src/main.rs:160

Doing next on GDB from the first PC will put the CPU to the panicking loop after the following code:

...
halted: PC: 0x08000334
537	                *SCB_CPACR | SCB_CPACR_FPU_ENABLE | SCB_CPACR_FPU_USER,
(gdb) n
Info : halted: PC: 0x08000336
halted: PC: 0x08000336
Info : halted: PC: 0x0800033a
halted: PC: 0x0800033a
535	            core::ptr::write_volatile(
(gdb) n
Info : halted: PC: 0x0800033c
halted: PC: 0x0800033c
550	            trampoline()
(gdb) n
Info : halted: PC: 0x08020c88
halted: PC: 0x08020c88
^C
Program received signal SIGINT, Interrupt.
0x08020c96 in rust_begin_unwind (_info=<optimized out>)

On a side note, a similar symptom where the Ethernet PHY does not get reset, as discussed in #141, might have also arisen from this new version of rtic. However, the reset delay still seems a bit too short to me.

- This would fix the firmware from panicking on power-up
@HarryMakes
Copy link
Contributor Author

I have just opened an issue over cortex-m-rtic as well: rtic-rs/rtic#361

@HarryMakes HarryMakes closed this Sep 16, 2020
@HarryMakes
Copy link
Contributor Author

Closed since a new solution is needed after migrating from 0.5.3 to 0.5.5: #144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant