From 5514ab7c675b994cb6eac6f6265dc80a2c1dedf5 Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sun, 8 Dec 2024 14:12:35 +1100 Subject: [PATCH 1/4] Allow clippy::needless_lifetimes until svd2rust is fixed --- .github/workflows/clippy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 0f7a6c4..b9b9c87 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -4,7 +4,7 @@ jobs: clippy-check-arm: runs-on: ubuntu-20.04 env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -Aclippy::needless_lifetimes" steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -15,7 +15,7 @@ jobs: clippy-check-riscv: runs-on: ubuntu-20.04 env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -Aclippy::needless_lifetimes" steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable From aeba58c343ddd586e38cd201837c420e9073578b Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:53:30 +1100 Subject: [PATCH 2/4] Use locked versions of build dependencies --- update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index c29bb53..da57fe5 100755 --- a/update.sh +++ b/update.sh @@ -6,11 +6,11 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) set -exuo pipefail -cargo install --version 0.33.4 svd2rust -cargo install --version 0.12.1 form +cargo install --version 0.33.4 svd2rust --locked +cargo install --version 0.12.1 form --locked rustup component add rustfmt if [ "$SVDTOOLS" == "svdtools" ]; then - cargo install --version 0.3.17 svdtools + cargo install --version 0.3.17 svdtools --locked else python3 -mvenv --clear .venv source .venv/bin/activate From 35d0c641cb6f98df5036710dc66c9e2ba9733637 Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sun, 8 Dec 2024 18:10:52 +1100 Subject: [PATCH 3/4] Correctly indent multiline string In the YAML spec, it is required to indent any multiline string. The library used by svdtools is now more strict, and will throw "invalid indentation in quoted scalar" errors without this change. --- svd/RP2350.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/svd/RP2350.yaml b/svd/RP2350.yaml index 473c74e..9d8adb5 100644 --- a/svd/RP2350.yaml +++ b/svd/RP2350.yaml @@ -5,22 +5,22 @@ DMA: _modify: "CHAIN_TO": description: "When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. \\n - Reset value is 0, which means for channels 1 and above the default will be to chain to channel 0 - set this field to avoid this behaviour." + Reset value is 0, which means for channels 1 and above the default will be to chain to channel 0 - set this field to avoid this behaviour." CH0_AL1_CTRL: _modify: "CHAIN_TO": description: "When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. \\n - Reset value is 0, which means for channels 1 and above the default will be to chain to channel 0 - set this field to avoid this behaviour." + Reset value is 0, which means for channels 1 and above the default will be to chain to channel 0 - set this field to avoid this behaviour." CH0_AL2_CTRL: _modify: "CHAIN_TO": description: "When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. \\n - Reset value is 0, which means for channels 1 and above the default will be to chain to channel 0 - set this field to avoid this behaviour." + Reset value is 0, which means for channels 1 and above the default will be to chain to channel 0 - set this field to avoid this behaviour." CH0_AL3_CTRL: _modify: "CHAIN_TO": description: "When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. \\n - Reset value is 0, which means for channels 1 and above the default will be to chain to channel 0 - set this field to avoid this behaviour." + Reset value is 0, which means for channels 1 and above the default will be to chain to channel 0 - set this field to avoid this behaviour." "CH*_CTRL*": "TREQ_SEL": From 9d3748c279a653f8e9a7ae2531840e49d5e6e9fb Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sun, 8 Dec 2024 18:15:51 +1100 Subject: [PATCH 4/4] Update svdtools to 0.3.20 to avoid type inference error --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index da57fe5..1825a50 100755 --- a/update.sh +++ b/update.sh @@ -10,7 +10,7 @@ cargo install --version 0.33.4 svd2rust --locked cargo install --version 0.12.1 form --locked rustup component add rustfmt if [ "$SVDTOOLS" == "svdtools" ]; then - cargo install --version 0.3.17 svdtools --locked + cargo install --version 0.3.20 svdtools --locked else python3 -mvenv --clear .venv source .venv/bin/activate