knurling-rs / probe-run

Run embedded programs just like native ones
Apache License 2.0
644 stars 75 forks source link

Add option to disable double buffering while loading firmware #305

Closed berkowski closed 2 years ago

berkowski commented 2 years ago

probe-rs/probe-rs#1030 exposes an option to disable double-buffering when downloading firmware, which seems required currently for the STM32L071x family of chips (probe-rs/probe-rs#883). This PR allows use of that option for probe-run

This won't compile now as Cargo.toml is using the released 0.12 verson of probe-rs. I've tested it locally by adding the following patch:

# Cargo.toml
[patch."crates-io"]
probe-rs = {git = "https://github.com/probe-rs/probe-rs", version = "0.12"}
probe-rs-rtt = {git = "https://github.com/probe-rs/probe-rs", version = "0.12"}
japaric commented 2 years ago

thanks for the PR. evaluating this will need to wait until there is a new probe-rs release on crates.io (0.13.0 I guess as there are breaking changes in the API).

berkowski commented 2 years ago

No problem on the delay -- mostly wanted to get it up here so I wouldn't forget myself and maybe it helps someone else. Still working fine for me with a local build and the [patch] section.

Thanks for all the effort you've been putting into rust on stm32. It's been interesting to watch it over the last couple of years.

Urhengulas commented 2 years ago

@berkowski I've rebased the PR. Are we good to merge?

berkowski commented 2 years ago

Seems to work for me. I successfully flashed my STM32L07x based project using this rebased PR and the --disable-double-buffering argument. Defmt logs come through fine.

Urhengulas commented 2 years ago

It also works for me on the nrf52840-dk. Thank you for your effort! 👍🏾

bors r+

berkowski commented 2 years ago

Awesome, looking forward to the capability making it into a release!

bors[bot] commented 2 years ago

Build succeeded: