mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-28 12:50:53 +00:00

* Make esp-config's structs de-serialization friendly * Simplify ConfigOption's constructor * CHANGELOG.md * Make sure `esp-wifi/build.rs` formats correctly * Typo * Run tests, again * Tests
27 lines
753 B
Rust
27 lines
753 B
Rust
use esp_build::assert_unique_used_features;
|
|
use esp_config::{ConfigOption, generate_config};
|
|
|
|
fn main() {
|
|
// Ensure that only a single chip is specified:
|
|
let _ = esp_metadata::Chip::from_cargo_feature().unwrap();
|
|
|
|
// Ensure that exactly a backend is selected:
|
|
assert_unique_used_features!("defmt", "println");
|
|
|
|
if cfg!(feature = "custom-halt") && cfg!(feature = "halt-cores") {
|
|
panic!("Only one of `custom-halt` and `halt-cores` can be enabled");
|
|
}
|
|
|
|
// emit config
|
|
generate_config(
|
|
"esp_backtrace",
|
|
&[ConfigOption::new(
|
|
"backtrace-frames",
|
|
"The maximum number of frames that will be printed in a backtrace",
|
|
10,
|
|
)],
|
|
true,
|
|
true,
|
|
);
|
|
}
|