mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-23 01:36:35 +11:00
Simplify uf2 flashing
This commit is contained in:
parent
2d1086915c
commit
9d539b0e7d
2 changed files with 11 additions and 10 deletions
|
@ -9,3 +9,4 @@ rustflags = [
|
||||||
"-C", "inline-threshold=5",
|
"-C", "inline-threshold=5",
|
||||||
"-C", "no-vectorize-loops",
|
"-C", "no-vectorize-loops",
|
||||||
]
|
]
|
||||||
|
runner = "elf2uf2-rs -d"
|
||||||
|
|
20
README.md
20
README.md
|
@ -75,22 +75,22 @@ For more examples, please refer to the [Documentation](https://github.com/rp-rs/
|
||||||
|
|
||||||
### Run examples
|
### Run examples
|
||||||
|
|
||||||
Install [`uf2conv`](https://github.com/sajattack/uf2conv-rs) and [`cargo-binutils`](https://github.com/rust-embedded/cargo-binutils) as well as the `llvm-tools-preview` component:
|
#### UF2
|
||||||
|
|
||||||
|
For boards with uf2 flashloaders like the raspberry pi pico. Install [`elf2uf2-rs`](https://github.com/JoNil/elf2uf2-rs):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo install uf2conv cargo-binutils
|
cargo install elf2uf2-rs
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
```
|
```
|
||||||
|
|
||||||
For boards with uf2 flashloaders you can use the following lines to run the examples:
|
Make sure .cargo/config contains the following (it should by default):
|
||||||
|
|
||||||
|
```toml
|
||||||
|
runner = "elf2uf2-rs -d"
|
||||||
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
export RPI_MOUNT_FOLDER=/media/RPI-RP2/
|
cargo run --example pico_pwm_blink # Run `cargo run --example` for more examples
|
||||||
export EXAMPLE=pico_blinky; # See `cargo check --example` for valid values
|
|
||||||
cargo check --example $EXAMPLE && \
|
|
||||||
cargo objcopy --release --example $EXAMPLE -- -O binary target/$EXAMPLE.bin && \
|
|
||||||
uf2conv target/$EXAMPLE.bin --base 0x10000000 --family 0xe48bff56 --output target/$EXAMPLE.uf2 && \
|
|
||||||
cp target/$EXAMPLE.uf2 $RPI_MOUNT_FOLDER
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- ROADMAP -->
|
<!-- ROADMAP -->
|
||||||
|
|
Loading…
Add table
Reference in a new issue