mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-27 12:20:56 +00:00

* s/esp-radio-preempt-baremetal/esp-preempt/g esp-preempt will hopefully one day be more useful than just a scheduler for esp-radio, therefore I've removed the radio prefix for that future goal. I also felt that baremetal didn't really add much other than noise, so I've removed that postfix too. * fix xtask * remove test code * fixups
20 lines
653 B
Rust
20 lines
653 B
Rust
use std::error::Error;
|
|
|
|
use esp_config::generate_config_from_yaml_definition;
|
|
|
|
fn main() -> Result<(), Box<dyn Error>> {
|
|
// Ensure that exactly one chip has been specified:
|
|
let chip = esp_metadata_generated::Chip::from_cargo_feature()?;
|
|
|
|
// Define all necessary configuration symbols for the configured device:
|
|
chip.define_cfgs();
|
|
|
|
// emit config
|
|
println!("cargo:rerun-if-changed=./esp_config.yml");
|
|
let cfg_yaml = std::fs::read_to_string("./esp_config.yml")
|
|
.expect("Failed to read esp_config.yml for esp-preempt");
|
|
generate_config_from_yaml_definition(&cfg_yaml, true, true, Some(chip)).unwrap();
|
|
|
|
Ok(())
|
|
}
|