summaryrefslogtreecommitdiff
path: root/examples/stm32u5
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32u5')
-rw-r--r--examples/stm32u5/.cargo/config.toml12
-rw-r--r--examples/stm32u5/build.rs5
2 files changed, 5 insertions, 12 deletions
diff --git a/examples/stm32u5/.cargo/config.toml b/examples/stm32u5/.cargo/config.toml
index 7f488700..ba3ef1dc 100644
--- a/examples/stm32u5/.cargo/config.toml
+++ b/examples/stm32u5/.cargo/config.toml
@@ -2,17 +2,5 @@
# replace STM32F429ZITx with your chip as listed in `probe-run --list-chips`
runner = "probe-run --chip STM32U585AIIx"
-rustflags = [
- # LLD (shipped with the Rust toolchain) is used as the default linker
- "-C", "link-arg=--nmagic",
- "-C", "link-arg=-Tlink.x",
- "-C", "link-arg=-Tdefmt.x",
-
- # Code-size optimizations.
- "-Z", "trap-unreachable=no",
- "-C", "inline-threshold=5",
- "-C", "no-vectorize-loops",
-]
-
[build]
target = "thumbv7em-none-eabi"
diff --git a/examples/stm32u5/build.rs b/examples/stm32u5/build.rs
new file mode 100644
index 00000000..8cd32d7e
--- /dev/null
+++ b/examples/stm32u5/build.rs
@@ -0,0 +1,5 @@
+fn main() {
+ println!("cargo:rustc-link-arg-bins=--nmagic");
+ println!("cargo:rustc-link-arg-bins=-Tlink.x");
+ println!("cargo:rustc-link-arg-bins=-Tdefmt.x");
+}