8a9136e4e4
inline assembly is supported since rust 1.59, we're way past that. enabling this makes the compiled code more compact, and on rp2040 even decreses memory usage by not needing thunks in sram. |
||
---|---|---|
.. | ||
.cargo | ||
src/bin | ||
build.rs | ||
Cargo.toml | ||
memory.x | ||
README.md |
Examples using bootloader
Example for Raspberry Pi Pico demonstrating the bootloader. The example consists of application binaries, 'a' which waits for 5 seconds before flashing the 'b' binary, which blinks the LED.
NOTE: The 'b' binary does not mark the new binary as active, so if you reset the device, it will roll back to the 'a' binary before automatically updating it again.
Prerequisites
cargo-binutils
cargo-flash
embassy-boot-rp
Usage
# Flash bootloader
cargo flash --manifest-path ../../bootloader/rp/Cargo.toml --release --chip RP2040
# Build 'b'
cargo build --release --bin b
# Generate binary for 'b'
cargo objcopy --release --bin b -- -O binary b.bin
# Flash `a` (which includes b.bin)
cargo flash --release --bin a --chip RP2040