File tree Expand file tree Collapse file tree 1 file changed +3
-29
lines changed Expand file tree Collapse file tree 1 file changed +3
-29
lines changed Original file line number Diff line number Diff line change 1
1
set -euxo pipefail
2
2
3
3
test_svd () {
4
- (
5
- cd $td &&
6
- curl -LO \
7
- https://raw.githubusercontent.com/posborne/cmsis-svd/master/data/$VENDOR /${1} .svd
8
- )
9
-
10
- # NOTE we care about errors in svd2rust, but not about errors / warnings in rustfmt
11
- pushd $td
12
- RUST_BACKTRACE=1 svd2rust $options -i ${1} .svd
13
-
14
- mv lib.rs src/lib.rs
15
-
16
- popd
17
-
18
- cargo $COMMAND --manifest-path $td /Cargo.toml
4
+ test_svd_for_target cortex-m https://raw.githubusercontent.com/posborne/cmsis-svd/master/data/$VENDOR /${1} .svd
19
5
}
20
6
21
7
test_patched_stm32 () {
22
- (
23
- cd $td && curl -L https://stm32-rs.github.io/stm32-rs/${1} .svd.patched -o ${1} .svd
24
- )
25
-
26
- # NOTE we care about errors in svd2rust, but not about errors / warnings in rustfmt
27
- pushd $td
28
- RUST_BACKTRACE=1 svd2rust $options -i ${1} .svd
29
-
30
- mv lib.rs src/lib.rs
31
-
32
- popd
33
-
34
- cargo $COMMAND --manifest-path $td /Cargo.toml
8
+ test_svd_for_target cortex-m https://stm32-rs.github.io/stm32-rs/${1} .svd.patched
35
9
}
36
10
37
11
test_svd_for_target () {
38
12
curl -L --output $td /input.svd $2
39
13
40
14
# NOTE we care about errors in svd2rust, but not about errors / warnings in rustfmt
41
15
pushd $td
42
- RUST_BACKTRACE=1 svd2rust $options --target $1 -i input.svd
16
+ RUST_BACKTRACE=1 svd2rust $options --target $1 --source_type xml - i input.svd
43
17
44
18
mv lib.rs src/lib.rs
45
19
You can’t perform that action at this time.
0 commit comments