Skip to content

Commit c425172

Browse files
bors[bot]burrbull
andauthored
Merge #676
676: test patched STM32 r=Emilgardis a=burrbull Co-authored-by: Andrey Zgarbul <[email protected]>
2 parents f187293 + 9235c84 commit c425172

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
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: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
11
set -euxo pipefail
22

33
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+
}
176

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
199
}
2010

2111
test_svd_for_target() {
2212
curl -L --output $td/input.svd $2
2313

2414
# NOTE we care about errors in svd2rust, but not about errors / warnings in rustfmt
2515
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
2717

2818
mv lib.rs src/lib.rs
2919

@@ -558,6 +548,25 @@ main() {
558548
# test_svd STM32L063x
559549
;;
560550

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+
561570
Toshiba)
562571
# BAD-SVD resetValue is bigger than the register size
563572
# test_svd M365

0 commit comments

Comments
 (0)