@@ -18,6 +18,22 @@ test_svd() {
1818 cargo $COMMAND --manifest-path $td /Cargo.toml
1919}
2020
21+ 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
35+ }
36+
2137test_svd_for_target () {
2238 curl -L --output $td /input.svd $2
2339
@@ -558,6 +574,25 @@ main() {
558574 # test_svd STM32L063x
559575 ;;
560576
577+ STM32-patched)
578+ # OK
579+ test_patched_stm32 stm32f0x2
580+ test_patched_stm32 stm32f103
581+ test_patched_stm32 stm32f411
582+ test_patched_stm32 stm32f469
583+ test_patched_stm32 stm32f7x3
584+ test_patched_stm32 stm32g070
585+ test_patched_stm32 stm32g473
586+ test_patched_stm32 stm32h743
587+ test_patched_stm32 stm32l0x3
588+ test_patched_stm32 stm32l162
589+ test_patched_stm32 stm32l4x6
590+ test_patched_stm32 stm32l562
591+ test_patched_stm32 stm32mp157
592+ test_patched_stm32 stm32wb55
593+ test_patched_stm32 stm32wle5
594+ ;;
595+
561596 Toshiba)
562597 # BAD-SVD resetValue is bigger than the register size
563598 # test_svd M365
0 commit comments