embassy icon indicating copy to clipboard operation
embassy copied to clipboard

Unable to get Nucelo-H723ZG board to run blinky.

Open Will-Dale-19 opened this issue 2 years ago • 8 comments

The board's communication LED blinks while the program attempts to run, but after a short while it panics and exits with error code 22. The message I receive is pasted below. Any help to getting atbleast blinky to work would be appreciated, thanks!

cargo run --bin blinky --release Finished release [optimized + debuginfo] target(s) in 0.37s Running probe-run --chip STM32H723ZGTx target\thumbv7em-none-eabihf\release\blinky (HOST) INFO flashing program (16 pages / 16.00 KiB) (HOST) INFO success! ──────────────────────────────────────────────────────────────────────────────── ──────────────────────────────────────────────────────────────────────────────── stack backtrace: 0: HardFaultTrampoline (HOST) ERROR error occurred during backtrace creation: An error with the usage of the probe occurred

Caused by: 0: An error specific to a probe type occurred 1: Command failed with status SwdApFault the backtrace may be incomplete. (HOST) ERROR the program panicked error: process didn't exit successfully: probe-run --chip STM32H723ZGTx target\thumbv7em-none-eabihf\release\blinky (exit code: 22)

Will-Dale-19 avatar Feb 07 '23 00:02 Will-Dale-19

I had similar behavior when trying to get the blinky example running on a Nucleo-STM32L053. I noticed the chip name was also referenced in features for embassy-stm32 inside of Cargo.toml. Once I made sure the chip name in both .cargo/config.toml and Config.toml matched, everything started working. The docs weren't clear on this so it was just trial and error.

gridbox avatar Feb 08 '23 14:02 gridbox

My embassy-stm32 has "stm32h723zg", which should be supported as it it is in the embassy-stm32 cargo.toml, were there any other values you needed to change?

Will-Dale-19 avatar Feb 08 '23 19:02 Will-Dale-19

My embassy-stm32 has "stm32h723zg", which should be supported as it it is in the embassy-stm32 cargo.toml, were there any other values you needed to change?

No. That was the only thing I changed.

gridbox avatar Feb 10 '23 15:02 gridbox

I have the exact same issue but I'm using a STM31F411RE. My runner line in config.toml is runner = "probe-run --chip STM32F411RETx"

I am able to flash and debug the example blink project that is provided by ST with the STM32CubeIDE.

MarkHerhold avatar Mar 25 '23 14:03 MarkHerhold

I wanted to run blinky on the NUCLEO-F746ZG and have a similar Issue. Sadly I am a noob to Rust but I am willing learn and help with testing if you have some suggestions.

I needed to change the Cargo.toml file and delete the can.rs and usart_dma.rs file because of not matching PINs. I am using the "stm32f746zg" feature flag option.
EDIT: I have checked in all changes I made: https://github.com/Schafwolle/embassy/tree/blinky-not-working-stm32f746zg

I have tested it with Windows and Linux.

I will now try if an older main works.

I hope that helps to help me fix my Issue to.

Schafwolle avatar Jan 06 '24 11:01 Schafwolle

I am experiencing the same problem. I'm using a NUCLEO-F756ZGT and it should be supported by both probe-rs and embassy. When running the examples the compilation succeeds and probe-rs start to flash the board, the Erasing and Programming phases work but after the "Finished" message the stlink led (LD4) keeps blinking without ending.

I also tried to flash the board using stlink by converting the elf file to binary, in this case the board is flashed correctly but the program, Blinky in this case doesn't produce effects and all examples don't work. (The boards has no issues.)

I'm willing to help with testing.

LorenzoCucchi avatar Jan 28 '24 21:01 LorenzoCucchi

this is all that happens whenever I try to run blinky:

Running `probe-rs run --chip STM32H723ZGTx target/thumbv7em-none-eabihf/release/blinky`
      Erasing ✔ [00:00:01] [############################################################] 128.00 KiB/128.00 KiB @ 68.96 KiB/s (eta 0s )
  Programming ✔ [00:00:00] [##############################################################] 28.00 KiB/28.00 KiB @ 58.33 KiB/s (eta 0s )    
Finished in 2.345s`

no debugging info or anything like what is shown in the documentation, I then ctrl+c to get back to terminal

MCU: h723zg OS: ubuntu 24.04

probe-rs list shows my board connected, and I've updated the stm32h7/Cargo.toml file to show the right board

any idea what's preventing the blinking?

the LD4 LED is blinking green/red so the board is for sure communicating with the PC

edit: I also tried the same on my macOS m1 and produced the same result

gilroy34 avatar Jun 04 '24 11:06 gilroy34