embedded-trainings-2020/boards/dk/build.rs
Jorge Aparicio 53d10f9a4a squashed
2020-06-09 11:58:27 +02:00

12 lines
346 B
Rust

use std::{env, error::Error, fs, path::PathBuf};
fn main() -> Result<(), Box<dyn Error>> {
let out_dir = PathBuf::from(env::var("OUT_DIR")?);
// put memory layout (linker script) in the linker search path
fs::copy("memory.x", out_dir.join("memory.x"))?;
println!("cargo:rustc-link-search={}", out_dir.display());
Ok(())
}