9 releases (breaking)
✓ Uses Rust 2018 edition
|0.8.0||Jun 29, 2020|
|0.6.0||Mar 30, 2020|
|0.2.0||Oct 23, 2019|
#40 in Embedded development
111 downloads per month
This crate provides a cargo subcommand to flash ELF binaries onto ARM chips.
Various chip families including but not limited to nRF5x, STM32 and LPC800 can be flashed using DAPLink, ST-Link or J-Link. To check if your specific chip is supported, use
cargo flash --list-chips
You can install this utility with cargo:
cargo install cargo-flash
You can use it like any cargo command would be used
cargo flash <args>
which will then build your binary and download the contents onto the connected target.
cargo flash --chip nrf58122
cargo flash --release --chip nRF51822 --target thumbv6m-none-eabi --example gpio_hal_blinky
cargo flash --release --chip-description-path nRF51822.yaml --target thumbv6m-none-eabi --example gpio_hal_blinky
To manually select a chip, you can use the
--chip <chip name> argument. The chip name is an identifier such as
STM32F042. Capitalization does not matter; Special characters do matter.
You can add a temporary chip family description by using the
--chip-description-path <chip description file path> or
-c argument. You need to pass it the path to a valid yaml family description. All the targets of the family will then be added to the registry temporarily and will override existing variants with the same name. You can use this feature to tinker with a chip family description until it works and then submit it to upstream for inclusion.
You can extract the family description file by running target-gen on a
.pack file with
cargo run -- file.pack out_dir. You can obtain the pack from ARM for example. Their online registry is a good start :) You can also reference to an already unziped
pack directory instead of the
file.pack archive file.
If you have a chip you want to flash, feel free to contribute to probe-rs.