Skip to content

Commit 39e7caa

Browse files
committed
Change memory to support multiple variants
1 parent a7dbd68 commit 39e7caa

File tree

4 files changed

+332
-319
lines changed

4 files changed

+332
-319
lines changed

stm32-data-gen/src/chips.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -808,14 +808,14 @@ fn process_chip(
808808
) -> Result<(), anyhow::Error> {
809809
let chip = chips.get(chip_name).unwrap();
810810
let docs = docs.documents_for(chip_name);
811-
let mut chip = stm32_data_serde::Chip {
811+
let chip = stm32_data_serde::Chip {
812812
name: chip_name.to_string(),
813813
family: group.family.clone().unwrap(),
814814
line: group.line.clone().unwrap(),
815815
die: group.die.clone().unwrap(),
816816
device_id: u16::from_str_radix(&group.die.as_ref().unwrap()[3..], 16).unwrap(),
817817
packages: chip.packages.clone(),
818-
memory: memory::get(chip_name, false).unwrap(),
818+
memory: memory::get(chip_name),
819819
docs,
820820
cores: cores.to_vec(),
821821
};
@@ -825,13 +825,6 @@ fn process_chip(
825825
let dump = serde_json::to_string_pretty(&chip)?;
826826
std::fs::write(format!("build/data/chips/{chip_name}.json"), dump)?;
827827

828-
if let Some(dbank_memory) = memory::get(chip_name, true) {
829-
chip.memory = dbank_memory;
830-
crate::check::check(&chip);
831-
832-
let dump = serde_json::to_string_pretty(&chip)?;
833-
std::fs::write(format!("build/data/chips/{chip_name}_dual-bank.json"), dump)?;
834-
}
835828
Ok(())
836829
}
837830

0 commit comments

Comments
 (0)