Skip to content

Commit

Permalink
Pin to Rust 1.77.0
Browse files Browse the repository at this point in the history
This is needed to be able to build some of the dependencies.

Signed-off-by: Petr Horacek <[email protected]>
  • Loading branch information
phoracek committed Sep 7, 2024
1 parent 84666fc commit e9add48
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
uses: actions-rs/toolchain@v1
with:
target: x86_64-unknown-linux-gnu
toolchain: 1.76.0
toolchain: 1.77.0
default: true
override: true
components: rustfmt, clippy
- name: Install ARM Rust toolchain
uses: actions-rs/toolchain@v1
with:
target: thumbv7em-none-eabihf
toolchain: 1.76.0
toolchain: 1.77.0
override: true
components: rustfmt, clippy
- name: Install cargo-make
Expand Down
40 changes: 20 additions & 20 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ Install tooling of the embedded Rust target for Cortex-M7F. It is necessary to
use an older version of Rust, since newer version bloat the firmware:

```sh
rustup install 1.76.0
rustup +1.76.0 target add thumbv7em-none-eabihf
rustup install 1.77.0
rustup +1.77.0 target add thumbv7em-none-eabihf
```

This project utilizes [cargo make](https://github.com/sagiegurari/cargo-make):

```sh
cargo +1.76.0 install cargo-make
cargo +1.77.0 install cargo-make
```

Furthermore, the embedded part of the project uses [flip
link](https://github.com/knurling-rs/flip-link):

```sh
cargo +1.76.0 install flip-link
cargo +1.77.0 install flip-link
```

## Formatting, linting, unit tests

Run formatting, linter and unit tests:

```sh
cargo +1.76.0 make
cargo +1.77.0 make
```

## DSP benchmark
Expand All @@ -39,7 +39,7 @@ Run the benchmark:

``` sh
cd dsp
cargo +1.76.0 bench --bench bench
cargo +1.77.0 bench --bench bench
```

Use a profiler to analyze the results:
Expand All @@ -48,7 +48,7 @@ Use a profiler to analyze the results:
cd dsp
rm -f target/release/deps/bench-*
rm -f callgrind.out.*
RUSTFLAGS="-g" cargo +1.76.0 bench --bench bench --no-run
RUSTFLAGS="-g" cargo +1.77.0 bench --bench bench --no-run
BENCH=$(find target/release/deps -type f -executable -name 'bench-*')
valgrind \
--tool=callgrind \
Expand Down Expand Up @@ -80,20 +80,20 @@ started](https://probe.rs/docs/getting-started/probe-setup/) to learn how.
Then install Rust dependencies of probe-rs:

```sh
cargo +1.76.0 install probe-run
cargo +1.76.0 install flip-link
cargo +1.77.0 install probe-run
cargo +1.77.0 install flip-link
```

To flash the project, call this make target:

```sh
cargo +1.76.0 make flash
cargo +1.77.0 make flash
```

Logging level can be set using an environment variable:

```sh
DEFMT_LOG=info cargo +1.76.0 make flash
DEFMT_LOG=info cargo +1.77.0 make flash
```

## Flash via DFU
Expand All @@ -107,15 +107,15 @@ On Fedora, this can be done by calling:

```sh
sudo dnf install dfu-util
cargo +1.76.0 install cargo-binutils
cargo +1.77.0 install cargo-binutils
rustup component add llvm-tools-preview
```

Click the RESET button while holding the BOOT button of the Daisy Patch SM to
enter the bootloader. Then call this make target:

```sh
cargo +1.76.0 make flash-dfu
cargo +1.77.0 make flash-dfu
```

## Embedded tests
Expand All @@ -128,7 +128,7 @@ given in [Flash via ST-Link](#flash-via-st-link).
To run one of the integration tests kept under `firmware/tests`:

```sh
cargo +1.76.0 make test-embedded button
cargo +1.77.0 make test-embedded button
```

## Embedded benchmark
Expand All @@ -142,7 +142,7 @@ Before running a benchmark, first make sure to go through the guidance given in
To run one of the benchmarks kept under `benches/src/bin`:

```sh
cargo +1.76.0 make bench oversampling
cargo +1.77.0 make bench oversampling
```

## Firmware size
Expand All @@ -153,16 +153,16 @@ the firmware size stays slim and no bloat gets in.
Install needed tooling:

```sh
cargo +1.76.0 install cargo-bloat
cargo +1.76.0 install cargo-binutils
rustup +1.76.0 component add llvm-tools-preview
cargo +1.77.0 install cargo-bloat
cargo +1.77.0 install cargo-binutils
rustup +1.77.0 component add llvm-tools-preview
```

Run the following command often to make sure no unnecessary heavy dependencies
are brought in:

```sh
cargo +1.76.0 make bloat
cargo +1.77.0 make bloat
```

## Manual
Expand All @@ -178,7 +178,7 @@ sudo dnf install inkscape texlive-latex texlive-ec texlive-microtype texlive-pag
To build the manual:

```sh
cargo +1.76.0 make manual
cargo +1.77.0 make manual
```

The built PDF is then available in `manual/user/manual.pdf`.
Expand Down

0 comments on commit e9add48

Please sign in to comment.