Put the implicit memory.x behind a memory_x
feature on embassy-stm32.
This commit is contained in:
@ -17,6 +17,11 @@ fn main() {
|
||||
//.write_all(include_bytes!("memory.x"))
|
||||
//.unwrap();
|
||||
|
||||
println!("HOWDY");
|
||||
|
||||
#[cfg(feature = "memory_x")]
|
||||
println!("cargo:rustc-link-search=src/chips/{}/memory_x/", _chip_name);
|
||||
|
||||
#[cfg(feature = "rt")]
|
||||
println!("cargo:rustc-link-search=src/chips/{}", _chip_name);
|
||||
|
||||
|
@ -773,7 +773,8 @@ fn gen_memory_x(out_dir: &PathBuf, chip: &Chip) {
|
||||
write!(memory_x, " RAM : ORIGIN = 0x{:x}, LENGTH = {}\n", ram_origin, ram_bytes).unwrap();
|
||||
write!(memory_x, "}}").unwrap();
|
||||
|
||||
let mut file = File::create(out_dir.join("memory.x")).unwrap();
|
||||
fs::create_dir_all(out_dir.join("memory_x")).unwrap();
|
||||
let mut file = File::create(out_dir.join("memory_x").join("memory.x")).unwrap();
|
||||
file.write_all( memory_x.as_bytes() ).unwrap();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user