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

fix: stm32h7rs usb_refck panic message now compiles #3927

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

friedman-ionq
Copy link

With the following in Cargo.toml:

embassy_stm32 = {"0.2", features = [   "memory-x",
    "stm32h7s3l8",
    "defmt",
    "time-driver-any",
    "exti",
    "unstable-pac",
] }

the crate would not compile. This fixes the issue.

@Dirbaio
Copy link
Member

Dirbaio commented Feb 27, 2025

Could you add this feature combination to ci.sh so it'd have been caught? thanks!

@friedman-ionq
Copy link
Author

friedman-ionq commented Feb 27, 2025

Could you add this feature combination to ci.sh so it'd have been caught? thanks!

Sure. Turns out the minimum repeatable feature is just "stm32h7s3l8". Which is surprising, because there already is a test case. Digging deeper.

@Dirbaio
Copy link
Member

Dirbaio commented Feb 27, 2025

maybe it's due to defmt. When it's enabled the panic! macro is overridden, so maybe it works with and fails without.

@friedman-ionq
Copy link
Author

maybe it's due to defmt. When it's enabled the panic! macro is overridden, so maybe it works with and fails without.

$ ./ci.sh
thread 'main' panicked at src/bin/cargo-batch.rs:136:85:
called `Result::unwrap()` on an `Err` value: the package 'embassy-stm32-tests' does not contain this feature: defmt
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@Dirbaio
Copy link
Member

Dirbaio commented Feb 27, 2025

the embassy-stm32-tests crate doesn't have it, embassy-stm32 does.

@friedman-ionq
Copy link
Author

the embassy-stm32-tests crate doesn't have it, embassy-stm32 does.

``~/work/embassy (main)$ git diff
diff --git a/ci.sh b/ci.sh
index e32105b16..46354f096 100755
--- a/ci.sh
+++ b/ci.sh
@@ -169,6 +169,7 @@ cargo batch
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u031r8,defmt,exti,time-driver-any,time
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u073mb,defmt,exti,time-driver-any,time
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u083rc,defmt,exti,time-driver-any,time \

  • --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabihf --features stm32h7s3l8,defmt,time-driver-any,exti,unstable-pac
    --- build --release --manifest-path embassy-nxp/Cargo.toml --target thumbv8m.main-none-eabihf
    --- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features ''
    --- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'log' \
does not repro the bug when I execute `./ci.sh` on main.

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.

2 participants