mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-12-01 11:12:26 +00:00
18 lines
602 B
Rust
18 lines
602 B
Rust
use std::error::Error;
|
|
use std::path::PathBuf;
|
|
use std::{env, fs};
|
|
|
|
fn main() -> Result<(), Box<dyn Error>> {
|
|
let out = PathBuf::from(env::var("OUT_DIR").unwrap());
|
|
fs::write(out.join("link_ram.x"), include_bytes!("../link_ram_cortex_m.x")).unwrap();
|
|
println!("cargo:rustc-link-search={}", out.display());
|
|
println!("cargo:rerun-if-changed=link_ram.x");
|
|
|
|
println!("cargo:rustc-link-arg-bins=--nmagic");
|
|
println!("cargo:rustc-link-arg-bins=-Tlink_ram.x");
|
|
println!("cargo:rustc-link-arg-bins=-Tdefmt.x");
|
|
println!("cargo:rustc-link-arg-bins=-Tteleprobe.x");
|
|
|
|
Ok(())
|
|
}
|