From f1f90b17b5c1c5cb56b6ac7722b5ef91b6cc3f2d Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Mon, 27 Jun 2022 14:24:19 +0200 Subject: [PATCH] Add build.rs to detect armv6 --- embassy-boot/stm32/build.rs | 11 +++++++++++ examples/boot/bootloader/stm32/build.rs | 5 ----- stm32-data | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 embassy-boot/stm32/build.rs diff --git a/embassy-boot/stm32/build.rs b/embassy-boot/stm32/build.rs new file mode 100644 index 000000000..03d0119fc --- /dev/null +++ b/embassy-boot/stm32/build.rs @@ -0,0 +1,11 @@ +use std::env; +use std::fs::File; +use std::io::Write; +use std::path::PathBuf; + +fn main() { + let target = env::var("TARGET").unwrap(); + if target.starts_with("thumbv6m-") { + println!("cargo:rustc-cfg=armv6m"); + } +} diff --git a/examples/boot/bootloader/stm32/build.rs b/examples/boot/bootloader/stm32/build.rs index 3997702f6..fd605991f 100644 --- a/examples/boot/bootloader/stm32/build.rs +++ b/examples/boot/bootloader/stm32/build.rs @@ -24,9 +24,4 @@ fn main() { if env::var("CARGO_FEATURE_DEFMT").is_ok() { println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); } - - let target = env::var("TARGET").unwrap(); - if target.starts_with("thumbv6m-") { - println!("cargo:rustc-cfg=armv6m"); - } } diff --git a/stm32-data b/stm32-data index fa294eae7..56d5b8b2a 160000 --- a/stm32-data +++ b/stm32-data @@ -1 +1 @@ -Subproject commit fa294eae79c0f33f4cde1e73b4e69db59f7429e3 +Subproject commit 56d5b8b2aee7026b4f9bcffc427bb8f9d48afeb5