Emit a default memory.x alongside device.x from metapac.

This commit is contained in:
Bob McWhirter
2021-07-30 14:06:10 -04:00
parent c458ad52e6
commit f6c5f039c8
8 changed files with 50 additions and 68 deletions

View File

@ -9,6 +9,14 @@ fn main() {
.unwrap()
.to_ascii_lowercase();
// Put `memory.x` in our output directory and ensure it's
// on the linker search path.
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
//File::create(out.join("memory.x"))
//.unwrap()
//.write_all(include_bytes!("memory.x"))
//.unwrap();
#[cfg(feature = "rt")]
println!("cargo:rustc-link-search=src/chips/{}", _chip_name);