Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Remove the need to use nightly for pico and stm32 builds #3097

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ jobs:
buildDirectory: ${{ runner.workspace }}/examples/build
buildWithCMakeArgs: '--config Release'

# test to compile the mcu backend with nightly and for the armv6 target (no_std)
# test to compile the mcu backend for the armv6 target (no_std)
mcu:
env:
SLINT_EMBED_GLYPHS: 1
Expand All @@ -278,7 +278,6 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-rust
with:
toolchain: nightly
target: thumbv6m-none-eabi
- name: Check
run: cargo check --target=thumbv6m-none-eabi -p printerdemo_mcu --no-default-features --features=mcu-board-support/pico-st7789
Expand Down
11 changes: 3 additions & 8 deletions examples/mcu-board-support/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ cargo run -p printerdemo_mcu --features=simulator --release

### On the Raspberry Pi Pico

You need nightly rust because that's the only way to get an allocator.

Build the demo with:

```sh
cargo +nightly build -p printerdemo_mcu --no-default-features --features=mcu-board-support/pico-st7789 --target=thumbv6m-none-eabi --release
cargo build -p printerdemo_mcu --no-default-features --features=mcu-board-support/pico-st7789 --target=thumbv6m-none-eabi --release
```

The resulting file can be flashed conveniently with [elf2uf2-rs](https://github.com/jonil/elf2uf2-rs). Install it using `cargo install`:
Expand Down Expand Up @@ -82,7 +80,7 @@ and to connect the pico via a probe (for example another pico running the probe)
Then you can simply run with `cargo run`

```sh
CARGO_TARGET_THUMBV6M_NONE_EABI_LINKER="flip-link" CARGO_TARGET_THUMBV6M_NONE_EABI_RUNNER="probe-run --chip RP2040" cargo +nightly run -p printerdemo_mcu --no-default-features --features=mcu-board-support/pico-st7789 --target=thumbv6m-none-eabi --release
CARGO_TARGET_THUMBV6M_NONE_EABI_LINKER="flip-link" CARGO_TARGET_THUMBV6M_NONE_EABI_RUNNER="probe-run --chip RP2040" cargo run -p printerdemo_mcu --no-default-features --features=mcu-board-support/pico-st7789 --target=thumbv6m-none-eabi --release
```

#### Flashing and Debugging the Pico with `probe-rs`'s VSCode Plugin
Expand All @@ -97,9 +95,6 @@ Add this build task to your `.vscode/tasks.json`:
{
"type": "cargo",
"command": "build",
"env": {
"RUSTUP_TOOLCHAIN": "nightly"
},
"args": [
"--package=printerdemo_mcu",
"--features=mcu-pico-st7789",
Expand Down Expand Up @@ -164,7 +159,7 @@ This was tested using a second Raspberry Pi Pico programmed as a probe with [Dap
Using [probe-run](https://github.com/knurling-rs/probe-run) (`cargo install probe-run`)

```sh
CARGO_TARGET_THUMBV7EM_NONE_EABIHF_RUNNER="probe-run --chip STM32H735IGKx" cargo +nightly run -p printerdemo_mcu --no-default-features --features=mcu-board-support/stm32h735g --target=thumbv7em-none-eabihf --release
CARGO_TARGET_THUMBV7EM_NONE_EABIHF_RUNNER="probe-run --chip STM32H735IGKx" cargo run -p printerdemo_mcu --no-default-features --features=mcu-board-support/stm32h735g --target=thumbv7em-none-eabihf --release
```

### ESP32
Expand Down