Async version of portenta-h7 which makes use of embassy to provide examples for the Arduino Portenta-H7 board written in Rust. The entry point address for the application is located at 0x08040000 to which the Arduino bootloader jumps. The software can be flashed on the target either with USB (DFU), or with a debug probe (JLink, ST-Link). Flashing with Arduino IDE is not supported.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add thumbv7em-none-eabihf
cargo install cargo-embed cargo-binutils
To build an example, run the following command:
cargo <example_name> [--release]
For instance, to build blinky
:
cargo blinky
- Install dfu-utils on your system.
- Connect USB to Portenta.
- Set the Portenta in bootloader mode by pressing the reset button twice.
- Generate the target binary by running the following command:
For example, to generate the target binary for
cargo <example_name>-bin
blinky
, run the following command:cargo blinky-bin
- Flash the binary to the target by running the following command:
For example, to flash
dfu-util -a 0 -d 2341:035b --dfuse-address=0x08040000:leave -D <binary_path>
blinky
, run the following command:dfu-util -a 0 -d 2341:035b --dfuse-address=0x08040000:leave -D target/thumbv7em-none-eabihf/release/examples/blinky.bin
- Connect the probe to the JTAG port of the breakout board.
- Run the following command:
For example, to flash
cargo <example_name>-probe [--release]
blinky
, run the following command:cargo blinky-probe