We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c96499e + 9ddcccf commit 05ccb45Copy full SHA for 05ccb45
build.rs
@@ -0,0 +1,17 @@
1
+use std::env;
2
+use std::fs::File;
3
+use std::io::Write;
4
+use std::path::PathBuf;
5
+
6
+fn main() {
7
+ // Put the linker script somewhere the linker can find it
8
+ let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
9
+ File::create(out.join("memory.x"))
10
+ .unwrap()
11
+ .write_all(include_bytes!("memory.x"))
12
+ .unwrap();
13
+ println!("cargo:rustc-link-search={}", out.display());
14
15
+ println!("cargo:rerun-if-changed=build.rs");
16
+ println!("cargo:rerun-if-changed=memory.x");
17
+}
0 commit comments