Skip to content

Commit 7a7ce07

Browse files
committed
svdtools: install rust version
This change removes a dependency on python/pip and is more consistent with the installation of the other supporting tools.
1 parent 07f32b8 commit 7a7ce07

File tree

4 files changed

+8
-19
lines changed

4 files changed

+8
-19
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ jobs:
2020
with:
2121
toolchain: stable
2222

23-
# Python Dependencies
24-
- name: Install Python dependencies
25-
run: |
26-
pip3 install --user setuptools wheel
27-
pip3 install --user svdtools
28-
- name: Put pip binary directory into path
29-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
30-
3123
# Rust Dependencies
3224
- name: Cache Cargo installed binaries
3325
uses: actions/cache@v4
@@ -44,13 +36,17 @@ jobs:
4436
- name: Install atdf2svd
4537
if: steps.cache-cargo.outputs.cache-hit != 'true'
4638
run: cargo install atdf2svd --version 0.5.0 --locked
39+
- name: Install svdtools
40+
if: steps.cache-cargo.outputs.cache-hit != 'true'
41+
run: cargo install svdtools --version 0.3.21 --locked
4742
- name: Copy tools to cache directory
4843
if: steps.cache-cargo.outputs.cache-hit != 'true'
4944
run: |
5045
mkdir ~/cargo-bin
5146
cp ~/.cargo/bin/svd2rust ~/cargo-bin
5247
cp ~/.cargo/bin/form ~/cargo-bin
5348
cp ~/.cargo/bin/atdf2svd ~/cargo-bin
49+
cp ~/.cargo/bin/svdtools ~/cargo-bin
5450
- name: Put new cargo binary directory into path
5551
run: echo "$HOME/cargo-bin" >> $GITHUB_PATH
5652

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ svd/%.svd: vendor/%.atdf
2323
svd/%.svd.patched: svd/%.svd .deps/%.d patch/%.yaml
2424
@if [ -f patch/$*.yaml ] ; then \
2525
echo -e "\tPATCH\t\t$*"; \
26-
svd patch patch/$*.yaml; \
26+
svdtools patch patch/$*.yaml; \
2727
test -e $@; \
2828
else \
2929
echo -e "\t - No patches found for $*"; \
@@ -75,6 +75,6 @@ patch/%.yaml: .deps/%.d
7575
.deps/%.d: patch/%.yaml
7676
@mkdir -p .deps
7777
@echo -e "\tMAKEDEPS\t$*"
78-
@svd makedeps $< $@
78+
@svdtools makedeps $< $@
7979

8080
-include $(DEPS)

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,7 @@ cargo install atdf2svd --version 0.5.0 --locked
4646
cargo install svd2rust --version 0.28.0 --locked
4747
cargo install form
4848
rustup component add --toolchain nightly rustfmt
49-
pip3 install --user svdtools
50-
51-
# check svdtools
52-
svd --version
53-
# if a "command not found" error is printed instead of a version,
54-
# either svdtools is installed incorrectly, or its installation path is missing from the PATH variable.
55-
# Temporary solution to PATH variable issue is to manually add the path. Like so:
56-
export PATH=$PATH:~/.local/bin
49+
cargo install svdtools
5750
```
5851

5952
[atdf2svd]: https://github.com/Rahix/atdf2svd

gen-intr-lut.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ for intr_path in "$@"; do
1010
chip="$(basename "${intr_path%.svd.patched}")"
1111
echo " \"$chip\" => match intr {"
1212
# toupper() to be compliant with svd2rust interrupts name
13-
svd interrupts --no-gaps $intr_path | awk '{print " \""toupper(substr($2, 1, length($2)-1))"\"" " => Some(" $1"),"}'
13+
svdtools interrupts --no-gaps $intr_path | awk '{print " \""toupper(substr($2, 1, length($2)-1))"\"" " => Some(" $1"),"}'
1414
echo " _ => None,"
1515
echo " },"
1616
done

0 commit comments

Comments
 (0)