Skip to content

Commit e0e886d

Browse files
committed
test patched STM32
1 parent f187293 commit e0e886d

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ jobs:
6868
- { rust: stable, vendor: SiliconLabs, options: "" }
6969
- { rust: stable, vendor: Spansion, options: "" }
7070
- { rust: stable, vendor: STMicro, options: "" }
71+
- { rust: stable, vendor: STM32-patched, options: "--strict --const_generic --derive_more --pascal_enum_values --max_cluster_size" }
7172
- { rust: stable, vendor: Toshiba, options: all }
7273
- { rust: stable, vendor: Toshiba, options: "" }
7374
# Test MSRV

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
- Test patched STM32
1011
- simplify ci strategy
1112

1213
## [v0.27.1] - 2022-10-25

ci/script.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
2137
test_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

Comments
 (0)