aboutsummaryrefslogtreecommitdiff
path: root/crates/cortex-m/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/cortex-m/build.rs')
-rw-r--r--crates/cortex-m/build.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/cortex-m/build.rs b/crates/cortex-m/build.rs
new file mode 100644
index 0000000..286e738
--- /dev/null
+++ b/crates/cortex-m/build.rs
@@ -0,0 +1,14 @@
+use std::{env, path};
+
+fn main() {
+ let out_dir = path::PathBuf::from(env::var("OUT_DIR").unwrap());
+ std::fs::write(
+ out_dir.join("weak-symbols.x"),
+ r#"
+PROVIDE(PendSV = PendSV_Handler);
+PROVIDE(SysTick = _tx_timer_interrupt);
+"#,
+ )
+ .unwrap();
+ println!("cargo::rustc-link-search={}", out_dir.display());
+}