From 96b60da055fc1b8a1001277f7224d55801c27ee0 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sat, 4 May 2024 22:41:56 +0200 Subject: [PATCH] Update to svd2rust 0.33.1 This improves the generated API in various minor ways. We cannot guarantee full backwards compatibility for downstream users but the changes should not be too disrupting. Most importantly, upstream svd2rust switched to a different case style for identifiers in 0.32.0. For now, this is disabled using `--ident-formats legacy` but we should consider following their suggestion at some point in the future. --- .github/workflows/ci.yml | 2 +- Makefile | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 287a637..47b0f70 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: uses: actions-rs/install@v0.1 with: crate: svd2rust - version: 0.28.0 + version: 0.33.1 - name: Install cargo-form if: steps.cache-cargo.outputs.cache-hit != 'true' uses: actions-rs/install@v0.1 diff --git a/Makefile b/Makefile index 78fee1f..9fe973c 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ svd/%.svd.patched: svd/%.svd .deps/%.d src/devices/%/mod.full.rs: svd/%.svd.patched @mkdir -p $(@D) @echo -e "\tSVD2RUST\t$*" - @cd $(@D); svd2rust --generic_mod --make_mod --target none -i $(realpath $<) + @cd $(@D); svd2rust --ident-formats-theme legacy --generic_mod --make_mod --target none -i $(realpath $<) @mv $(@D)/mod.rs $@ @mv $(@D)/generic.rs $(@D)/../../generic.rs diff --git a/README.md b/README.md index bb136b5..f3d908a 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ The version on `crates.io` is pre-built. The following is only necessary when t You need to have [atdf2svd][] (= 0.4.0), [svd2rust][] (= 0.28), [form][] (>= 0.8), [rustfmt][](for the *nightly* toolchain) and [svdtools][] (>= 0.1.9) installed: ```bash cargo install atdf2svd --version 0.4.0 -cargo install svd2rust --version 0.28.0 +cargo install svd2rust --version 0.33.1 cargo install form rustup component add --toolchain nightly rustfmt pip3 install --user svdtools