-
Notifications
You must be signed in to change notification settings - Fork 29
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
Forever waiting for AHB clock in nightly #33
Comments
This comment was marked as outdated.
This comment was marked as outdated.
I just tested this in Beta and it's also broken there. I think it's worth filing an issue with Edit: filed rust-lang/rust#106830 |
As @hacknus said, in nightly this line hangs: The GRSTCTL register is at address 0x50000010, and AHBIDL is bit 31. On my F411 reproducing this issue, that memory address is 0x80000000 (AHBIDL set) as you'd expect, but the disassembly around that region indicates the code's actually reading from
|
I think this is a bug in the RAL included in this crate; the Adding Not sure what commit in rust-lang exactly triggered this, looks like @antonok-edm has narrowed it down to between nightly-2022-11-19 and nightly-2022-11-24. |
Add repr(C) to all RegisterBlocks, fixes #33
relevant issues: - stm32-rs/synopsys-usb-otg#33 - stm32-rs/stm32f4xx-hal#574 repr(C) required otherwise layout is optimized by rust compiler Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
Original issue, was redirected here.
I tried both USB-examples on my STM32F405; poll and interrupt and both work with rust stable (rustc 1.66.0 ) but hang with nightly (rustc 1.68.0-nightly).
By using the debugger, I notice that I get stuck in this line:
line 365 in
.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/synopsys-usb-otg-0.3.1/src/bus.rs
full output of the debugger:
it seems in
--release
some stuff is optimized out, but it gets stuck at the same point in debug:The text was updated successfully, but these errors were encountered: