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

Inconsistent Test Results on STM32H750 #36

Open
Dicklessgreat opened this issue Aug 19, 2024 · 3 comments
Open

Inconsistent Test Results on STM32H750 #36

Dicklessgreat opened this issue Aug 19, 2024 · 3 comments

Comments

@Dicklessgreat
Copy link

Dicklessgreat commented Aug 19, 2024

I am running tests on the STM32H750 and have encountered a very strange situation. Each time I run the tests, the results are different. I've labeled the patterns I observed as "A", "B," and "C."

  • Pattern A: The test panics before it begins.
ERROR probe_rs::debug::debug_info: Other("UNWIND: Tried to unwind `RegisterRule` at CFA = None.")
Frame 0: HardFault <Cause: Escalated UsageFault <Cause: Undefined instruction>> : ERROR: While resolving function information for the program counter (0x00000002) that caused the exception. @ 0x00000002
Frame 1: <unknown function @ 0x00000002> : ERROR: UNWIND: Tried to unwind `RegisterRule` at CFA = None. @ 0x00000002
       /Users/dicklessgreat/.cargo/git/checkouts/embassy-9312dcb0ed774b29/b88dc13/embassy-time-queue-driver/src/lib.rs:44:14
Error: CPU halted unexpectedly.
error: test failed, to rerun pass `--test test`

Caused by:
  process didn't exit successfully: `probe-rs run --chip STM32H750IBKx /Users/dicklessgreat/Documents/Rust/stm32h750_embedded_test/target/thumbv7em-none-eabihf/debug/deps/test-459b163b2cf10477` (exit status: 1)
  • Pattern B: The test also panics before it starts. But another error message.
 WARN probe_rs::probe::stlink: send_jtag_command 242 failed: SwdApFault
 WARN probe_rs::debug::debug_info: UNWIND: Error while checking for exception context. The stack trace will not include the calling frames. : UNWIND: Error reading FrameDescriptorEntry at PC=134247133 : Do not have unwind info for the given address.
Frame 0: UNWIND: Error while checking for exception context. The stack trace will not include the calling frames. : UNWIND: Error reading FrameDescriptorEntry at PC=134247133 : Do not have unwind info for the given address. @ 0x08006cb4
Error: CPU halted unexpectedly.
error: test failed, to rerun pass `--test test`

Caused by:
  process didn't exit successfully: `probe-rs run --chip STM32H750IBKx /Users/dicklessgreat/Documents/Rust/stm32h750_embedded_test/target/thumbv7em-none-eabihf/debug/deps/test-459b163b2cf10477` (exit status: 1)

0.000000 INFO  tests available: [Test { name: "tests::first_test", function: 0x8001165, should_panic: false, ignored: false, timeout: None }]
└─ embedded_test::export::run_tests @ /Users/dicklessgreat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/embedded-test-0.4.0/src/fmt.rs:36  

  • Pattern C: The test passes successfully.
running 1 test
test tests::first_test ... 0.000000 INFO  Running test: Test { name: "tests::first_test", function: 0x8001165, should_panic: false, ignored: false, timeout: None }
└─ embedded_test::export::run_tests @ /Users/dicklessgreat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/embedded-test-0.4.0/src/fmt.rs:36  
0.000000 INFO  Test exited with () or Ok(..)
└─ embedded_test::export::check_outcome @ /Users/dicklessgreat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/embedded-test-0.4.0/src/fmt.rs:36  
ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.09s

To help with troubleshooting, I've created the simple sample project that reproduces the issue. You can find it here

TBH, I don't know what the error message really means, but if anyone has any ideas or suggestions for resolving this, I would greatly appreciate it.

@t-moe
Copy link
Contributor

t-moe commented Aug 19, 2024

Thanks for reporting this @Dicklessgreat in such detail. We have been observing issues with stm32 lately, but I havent gotten around to do any investigation yet.
I'll give my best do take a look and provide a solution before the year ends (sorry - busy times for me...).

cc @bugadani

@t-moe
Copy link
Contributor

t-moe commented Aug 19, 2024

(@Dicklessgreat which probe-rs version are you using? Just to rule out #34)

@Dicklessgreat
Copy link
Author

probe-rs --version

probe-rs 0.24.0 (git commit: 40b83ff1)

Yesterday, I did cargo install probe-rs-tools --git https://github.com/probe-rs/probe-rs --locked.
So it's "up to date", I think.

Please let me know if there's something I can do!!
Thanks.

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

No branches or pull requests

2 participants