|
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 |
| 4 | + test_svd_for_target cortex-m https://raw.githubusercontent.com/posborne/cmsis-svd/master/data/$VENDOR/${1}.svd |
| 5 | +} |
17 | 6 |
|
18 | | - cargo $COMMAND --manifest-path $td/Cargo.toml |
| 7 | +test_patched_stm32() { |
| 8 | + test_svd_for_target cortex-m https://stm32-rs.github.io/stm32-rs/${1}.svd.patched |
19 | 9 | } |
20 | 10 |
|
21 | 11 | test_svd_for_target() { |
22 | 12 | curl -L --output $td/input.svd $2 |
23 | 13 |
|
24 | 14 | # NOTE we care about errors in svd2rust, but not about errors / warnings in rustfmt |
25 | 15 | pushd $td |
26 | | - RUST_BACKTRACE=1 svd2rust $options --target $1 -i input.svd |
| 16 | + RUST_BACKTRACE=1 svd2rust $options --target $1 --source_type xml -i input.svd |
27 | 17 |
|
28 | 18 | mv lib.rs src/lib.rs |
29 | 19 |
|
@@ -558,6 +548,25 @@ main() { |
558 | 548 | # test_svd STM32L063x |
559 | 549 | ;; |
560 | 550 |
|
| 551 | + STM32-patched) |
| 552 | + # OK |
| 553 | + test_patched_stm32 stm32f0x2 |
| 554 | + test_patched_stm32 stm32f103 |
| 555 | + test_patched_stm32 stm32f411 |
| 556 | + test_patched_stm32 stm32f469 |
| 557 | + test_patched_stm32 stm32f7x3 |
| 558 | + test_patched_stm32 stm32g070 |
| 559 | + test_patched_stm32 stm32g473 |
| 560 | + test_patched_stm32 stm32h743 |
| 561 | + test_patched_stm32 stm32l0x3 |
| 562 | + test_patched_stm32 stm32l162 |
| 563 | + test_patched_stm32 stm32l4x6 |
| 564 | + test_patched_stm32 stm32l562 |
| 565 | + test_patched_stm32 stm32mp157 |
| 566 | + test_patched_stm32 stm32wb55 |
| 567 | + test_patched_stm32 stm32wle5 |
| 568 | + ;; |
| 569 | + |
561 | 570 | Toshiba) |
562 | 571 | # BAD-SVD resetValue is bigger than the register size |
563 | 572 | # test_svd M365 |
|
0 commit comments