mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2024-11-15 21:21:11 +00:00
12 lines
346 B
Rust
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(())
|
|
}
|