aboutsummaryrefslogtreecommitdiff
path: root/crates/cortex-m
diff options
context:
space:
mode:
authorIan McIntyre <me@mciantyre.dev>2026-08-03 07:46:10 -0400
committerIan McIntyre <me@mciantyre.dev>2026-08-03 07:46:10 -0400
commit7ffc62ab8613b097485b2c664093e649907dc2a1 (patch)
tree428e6e958af00e1022e663676fffe9c19f0174a6 /crates/cortex-m
First commit
Diffstat (limited to 'crates/cortex-m')
-rw-r--r--crates/cortex-m/Cargo.toml7
-rw-r--r--crates/cortex-m/build.rs14
-rw-r--r--crates/cortex-m/src/lib.rs1
3 files changed, 22 insertions, 0 deletions
diff --git a/crates/cortex-m/Cargo.toml b/crates/cortex-m/Cargo.toml
new file mode 100644
index 0000000..9f18dd2
--- /dev/null
+++ b/crates/cortex-m/Cargo.toml
@@ -0,0 +1,7 @@
+[package]
+name = "rust-threadx-cortex-m"
+version = "0.1.0"
+edition = "2024"
+publish = false
+
+[dependencies]
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());
+}
diff --git a/crates/cortex-m/src/lib.rs b/crates/cortex-m/src/lib.rs
new file mode 100644
index 0000000..0c9ac1a
--- /dev/null
+++ b/crates/cortex-m/src/lib.rs
@@ -0,0 +1 @@
+#![no_std]