9 lines
356 B
Rust
9 lines
356 B
Rust
//! Put memory.x where the linker finds it (cortex-m-rt's link.x includes it).
|
|
use std::{env, fs, path::PathBuf};
|
|
|
|
fn main() {
|
|
let out = PathBuf::from(env::var_os("OUT_DIR").unwrap());
|
|
fs::copy("memory.x", out.join("memory.x")).unwrap();
|
|
println!("cargo:rustc-link-search={}", out.display());
|
|
println!("cargo:rerun-if-changed=memory.x");
|
|
}
|