rpi-pico-usb-ramdisk/build.rs
Jakob Lechner cd44e736db Use RP2350
2025-03-10 21:59:58 +01:00

13 lines
429 B
Rust

use std::{fs::File, io::Write, path::PathBuf};
fn main() {
let out = PathBuf::from(std::env::var("OUT_DIR").unwrap());
println!("cargo:rustc-link-search={}", out.display());
let memory_x = include_bytes!("memory.x");
let mut f = File::create(out.join("memory.x")).unwrap();
f.write_all(memory_x).unwrap();
println!("cargo:rerun-if-changed=memory.x");
println!("cargo:rerun-if-changed=build.rs");
}