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 11set -euxo pipefail
22
33test_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
195}
206
217test_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
359}
3610
3711test_svd_for_target () {
3812 curl -L --output $td /input.svd $2
3913
4014 # NOTE we care about errors in svd2rust, but not about errors / warnings in rustfmt
4115 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
4317
4418 mv lib.rs src/lib.rs
4519
You can’t perform that action at this time.
0 commit comments