use std::error::Error; use esp_build::assert_unique_used_features; fn main() -> Result<(), Box> { assert_unique_used_features!("esp32c6"); // NOTE: update when adding new device support! // Determine the name of the configured device: let device_name = "esp32c6"; // Define all necessary configuration symbols for the configured device: println!("cargo:rustc-cfg={}", device_name); // Put the linker script somewhere the linker can find it: // let out = PathBuf::from(env::var_os("OUT_DIR").unwrap()); // println!("cargo:rustc-link-search={}", out.display()); // Copy the required linker script to the `out` directory: // fs::copy("lp-core/ld/link.x", out.join("link.x"))?; // println!("cargo:rerun-if-changed=lp-core/ld/link.x"); println!("cargo:rustc-link-arg=-Tlp-core/ld/link.x"); // // Done! Ok(()) }