David-OConnor / stm32-hal

This library provides access to STM32 peripherals in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

probe-run timeout error

kacper-cholewinski opened this issue · comments

Hi,
I try to flash quickstart code onto my NUCLEO - STM32F303K8T6, but it goes like this:

(HOST) INFO  flashing program (18 pages / 18.00 KiB)
(HOST) INFO  success!
Error: An error with the usage of the probe occurred

Caused by:
    Operation timed out
error: process didn't exit successfully: `probe-run --chip STM32F303K8Tx target\thumbv7em-none-eabihf\release\project_name` (exit code: 1)

I've updated .cargo/config.toml and memory.x, and generally did all things according to instructions.

Solutions will be appreciated :)

Are you able to connect using Stm32CubeProgrammer?

Hi, thanks for quick answer.

Yes, I can connect and flash program using Cube without problems.

Moreover, I've tried to flash old embassy-rs project to same board, using probe-run and it didn't work either. Few months ago I did it without any problems.

Weird! No idea. Is probe-run up to date? ie cargo update prob-run --force.

Unfortunately, it is. Is there a way to check what is exactly wrong with the flash? Or maybe I need to post issue at probe-run repo?

Ok, so I used verbose flag on probe-run and I got this:
couldn't find valid stack range, not placing stack canary
It looks like invalid memory.x file, but idk what is wrong with it.

Ok, but now I've updated hal to latest version and flashing works fine.

I assume that something changed in this release, or maybe rust compiler just hates me. :)

EDIT: and it looks like compiler exactly just hates me - now I specified older version of hal (1.5.3) and it works just fine too

Weird! Hopefully you and it have made ammends.

I've tested some more and my conclusion is - I made mistake in memory.x file at first and corrected it later, but there is need for cargo clean for changes in memory.x to take effect.

I hope at least it will help someone else.