Skip to content

Commit 5166da8

Browse files
committed
Fix "log" feature flag for RM0455 parts, expand CI to cover this path
1 parent 32743c6 commit 5166da8

File tree

3 files changed

+56
-28
lines changed

3 files changed

+56
-28
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ jobs:
3232
- stm32h7b3
3333
- stm32h7b0
3434
- stm32h735
35-
env: # Peripheral Feature flags
36-
FLAGS: rt,xspi,sdmmc,sdmmc-fatfs,fmc,usb_hs,rtc,ethernet,ltdc,crc,rand,can,dsi,defmt
35+
env:
36+
FLAGS: rt,defmt,log
37+
PERIPHERAL: xspi,sdmmc,sdmmc-fatfs,fmc,usb_hs,rtc,ethernet,ltdc,crc,rand,can,dsi
3738

3839
steps:
3940
- uses: actions/checkout@v4
@@ -53,5 +54,5 @@ jobs:
5354
with:
5455
toolchain: ${{ matrix.rust }}
5556
targets: thumbv7em-none-eabihf
56-
- run: cargo build --verbose --release --examples --target thumbv7em-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }}
57-
- run: cargo test --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ env.FLAGS }}
57+
- run: cargo build --verbose --release --examples --target thumbv7em-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }},${{ env.PERIPHERAL }}
58+
- run: cargo test --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ env.FLAGS }},${{ env.PERIPHERAL }}

.github/workflows/nightly.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ jobs:
1818
- log-itm
1919
- log-semihost
2020
- log-rtt
21-
env: # Peripheral Feature flags
22-
FLAGS: rt,xspi,sdmmc,sdmmc-fatfs,fmc,usb_hs,rtc,ethernet,ltdc,crc,rand,can,dsi
21+
env:
22+
FLAGS: rt,log
23+
PERIPHERAL: xspi,sdmmc,sdmmc-fatfs,fmc,usb_hs,rtc,ethernet,ltdc,crc,rand,can,dsi
2324

2425
steps:
2526
- uses: actions/checkout@v4
@@ -38,5 +39,5 @@ jobs:
3839
- uses: dtolnay/rust-toolchain@nightly
3940
with:
4041
targets: thumbv7em-none-eabihf
41-
- run: cargo build --verbose --release --examples --target thumbv7em-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }},${{ matrix.logging }}
42-
- run: cargo test --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ env.FLAGS }}
42+
- run: cargo build --verbose --release --examples --target thumbv7em-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }},${{ env.PERIPHERAL }},${{ matrix.logging }}
43+
- run: cargo test --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ env.FLAGS }},${{ env.PERIPHERAL }}

src/rcc/mod.rs

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -985,26 +985,52 @@ impl Rcc {
985985
cfgr.sws().variant().unwrap()
986986
);
987987

988-
let d1cfgr = rcc.d1cfgr.read();
989-
debug!(
990-
"D1CFGR register: D1CPRE={:?} HPRE={:?} D1PPRE={:?}",
991-
d1cfgr.d1cpre().variant().unwrap(),
992-
d1cfgr.hpre().variant().unwrap(),
993-
d1cfgr.d1ppre().variant().unwrap(),
994-
);
995-
996-
let d2cfgr = rcc.d2cfgr.read();
997-
debug!(
998-
"D2CFGR register: D2PPRE1={:?} D2PPRE1={:?}",
999-
d2cfgr.d2ppre1().variant().unwrap(),
1000-
d2cfgr.d2ppre2().variant().unwrap(),
1001-
);
1002-
1003-
let d3cfgr = rcc.d3cfgr.read();
1004-
debug!(
1005-
"D3CFGR register: D3PPRE={:?}",
1006-
d3cfgr.d3ppre().variant().unwrap(),
1007-
);
988+
#[cfg(not(feature = "rm0455"))]
989+
{
990+
let d1cfgr = rcc.d1cfgr.read();
991+
debug!(
992+
"D1CFGR register: D1CPRE={:?} HPRE={:?} D1PPRE={:?}",
993+
d1cfgr.d1cpre().variant().unwrap(),
994+
d1cfgr.hpre().variant().unwrap(),
995+
d1cfgr.d1ppre().variant().unwrap(),
996+
);
997+
998+
let d2cfgr = rcc.d2cfgr.read();
999+
debug!(
1000+
"D2CFGR register: D2PPRE1={:?} D2PPRE1={:?}",
1001+
d2cfgr.d2ppre1().variant().unwrap(),
1002+
d2cfgr.d2ppre2().variant().unwrap(),
1003+
);
1004+
1005+
let d3cfgr = rcc.d3cfgr.read();
1006+
debug!(
1007+
"D3CFGR register: D3PPRE={:?}",
1008+
d3cfgr.d3ppre().variant().unwrap(),
1009+
);
1010+
}
1011+
#[cfg(feature = "rm0455")]
1012+
{
1013+
let cdcfgr1 = rcc.cdcfgr1.read();
1014+
debug!(
1015+
"CDCFGR1 register: CDCPRE={:?} HPRE={:?} CDPPRE={:?}",
1016+
cdcfgr1.cdcpre().variant().unwrap(),
1017+
cdcfgr1.hpre().variant().unwrap(),
1018+
cdcfgr1.cdppre().variant().unwrap(),
1019+
);
1020+
1021+
let cdcfgr2 = rcc.cdcfgr2.read();
1022+
debug!(
1023+
"CDCFGR2 register: CDPPRE1={:?} CDPPRE1={:?}",
1024+
cdcfgr2.cdppre1().variant().unwrap(),
1025+
cdcfgr2.cdppre2().variant().unwrap(),
1026+
);
1027+
1028+
let srdcfgr = rcc.srdcfgr.read();
1029+
debug!(
1030+
"SRDCFGR register: SRDPPRE={:?}",
1031+
srdcfgr.srdppre().bits(),
1032+
);
1033+
}
10081034

10091035
let pllckselr = rcc.pllckselr.read();
10101036
debug!(

0 commit comments

Comments
 (0)