mirror of
https://github.com/LegitCamper/picocalc-os-rs.git
synced 2025-12-27 07:45:28 +00:00
add pimoroni2w support
This commit is contained in:
@@ -13,13 +13,18 @@ use std::fs::File;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[cfg(all(feature = "rp235x", not(feature = "pimoroni2w")))]
|
||||
const MEMORY: &'static [u8] = include_bytes!("rp2350.x");
|
||||
#[cfg(feature = "pimoroni2w")]
|
||||
const MEMORY: &'static [u8] = include_bytes!("rp2350.x");
|
||||
|
||||
fn main() {
|
||||
// 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"))
|
||||
.write_all(MEMORY)
|
||||
.unwrap();
|
||||
println!("cargo:rustc-link-search={}", out.display());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user