Skip to content

Commit 35c1cd9

Browse files
committed
some more fixes and tweaks
1 parent 0d9f1b7 commit 35c1cd9

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,17 @@ jobs:
7777
- { rust: stable, vendor: Nuvoton, options: "-- --atomics" }
7878
- { rust: stable, vendor: NXP }
7979
- { rust: stable, vendor: NXP, options: "-- --strict --atomics" }
80-
- { rust: stable, vendor: RISC-V }
81-
- { rust: stable, vendor: RISC-V, options: "-- --strict --atomics" }
80+
- { rust: stable, vendor: SiFive }
81+
- { rust: stable, vendor: SiFive, options: "-- --strict --atomics" }
8282
- { rust: stable, vendor: SiliconLabs, options: "" }
8383
- { rust: stable, vendor: SiliconLabs, options: "-- --strict --atomics" }
8484
- { rust: stable, vendor: Spansion }
8585
- { rust: stable, vendor: Spansion, options: "-- --strict --atomics" }
86-
- { rust: stable, vendor: STMico }
87-
- { rust: stable, vendor: STMico, options: "-- --atomics" }
88-
- { rust: stable, vendor: STMico, options: "-- --strict -f enum_value::p: --max-cluster-size --atomics --atomics-feature atomics --impl-debug --impl-defmt defmt" }
89-
- { rust: stable, vendor: Toschiba }
90-
- { rust: stable, vendor: Toschiba, options: "-- --strict --atomics" }
86+
- { rust: stable, vendor: STMicro }
87+
- { rust: stable, vendor: STMicro, options: "-- --atomics" }
88+
- { rust: stable, vendor: STMicro, options: "-- --strict -f enum_value::p: --max-cluster-size --atomics --atomics-feature atomics --impl-debug --impl-defmt defmt" }
89+
- { rust: stable, vendor: Toshiba }
90+
- { rust: stable, vendor: Toshiba, options: "-- --strict --atomics" }
9191
- { rust: stable, vendor: TexasInstruments }
9292
- { rust: stable, vendor: TexasInstruments, options: "-- --atomics" }
9393
- { rust: stable, vendor: Espressif }

ci/svd2rust-regress/src/svd_test.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const CRATES_MIPS: &[&str] = &["mips-mcu = \"0.1.0\""];
2424
const PROFILE_ALL: &[&str] = &["[profile.dev]", "incremental = false"];
2525
const FEATURES_ALL: &[&str] = &["[features]"];
2626
const FEATURES_CORTEX_M: &[&str] = &["rt = [\"cortex-m-rt/device\"]"];
27+
const FEATURES_XTENSA_LX: &[&str] = &["rt = []"];
2728
const WORKSPACE_EXCLUDE: &[&str] = &["[workspace]"];
2829

2930
fn path_helper_base(base: &Path, input: &[&str]) -> PathBuf {
@@ -305,11 +306,8 @@ impl TestCase {
305306
}
306307

307308
fn prepare_rust_toolchain_file(&self, chip_dir: &Path) -> Result<(), TestError> {
308-
let channel = match self.arch {
309-
Target::XtensaLX => Some("esp"),
310-
Target::Msp430 => Some("nightly-2025-02-02"),
311-
_ => None,
312-
};
309+
// Could be extended to let cargo install and use a specific toolchain.
310+
let channel: Option<String> = None;
313311

314312
if let Some(channel) = channel {
315313
let toolchain_file = path_helper_base(chip_dir, &["rust-toolchain.toml"]);
@@ -349,7 +347,7 @@ impl TestCase {
349347
Target::None => unreachable!(),
350348
})
351349
.chain(if let Some(opts) = opts {
352-
if opts.iter().find(|v| v.contains("atomics")).is_some() {
350+
if opts.iter().any(|v| v.contains("atomics")) {
353351
CRATES_ATOMICS.iter()
354352
} else {
355353
[].iter()
@@ -361,6 +359,7 @@ impl TestCase {
361359
.chain(FEATURES_ALL.iter())
362360
.chain(match &self.arch {
363361
Target::CortexM => FEATURES_CORTEX_M.iter(),
362+
Target::XtensaLX => FEATURES_XTENSA_LX.iter(),
364363
_ => [].iter(),
365364
})
366365
.chain(WORKSPACE_EXCLUDE.iter());

0 commit comments

Comments
 (0)