diff options
| author | Ulf Lilleengen <[email protected]> | 2022-06-27 14:24:19 +0200 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2022-06-27 14:24:19 +0200 |
| commit | f1f90b17b5c1c5cb56b6ac7722b5ef91b6cc3f2d (patch) | |
| tree | 912f669ca14e4f952632eca2b6fea096e7fdeac0 | |
| parent | 776be79f7bb10b09e795e2ea93bb795a653c9b4c (diff) | |
Add build.rs to detect armv6
| -rw-r--r-- | embassy-boot/stm32/build.rs | 11 | ||||
| -rw-r--r-- | examples/boot/bootloader/stm32/build.rs | 5 | ||||
| m--------- | stm32-data | 0 |
3 files changed, 11 insertions, 5 deletions
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 @@ | |||
| 1 | use std::env; | ||
| 2 | use std::fs::File; | ||
| 3 | use std::io::Write; | ||
| 4 | use std::path::PathBuf; | ||
| 5 | |||
| 6 | fn main() { | ||
| 7 | let target = env::var("TARGET").unwrap(); | ||
| 8 | if target.starts_with("thumbv6m-") { | ||
| 9 | println!("cargo:rustc-cfg=armv6m"); | ||
| 10 | } | ||
| 11 | } | ||
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() { | |||
| 24 | if env::var("CARGO_FEATURE_DEFMT").is_ok() { | 24 | if env::var("CARGO_FEATURE_DEFMT").is_ok() { |
| 25 | println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); | 25 | println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); |
| 26 | } | 26 | } |
| 27 | |||
| 28 | let target = env::var("TARGET").unwrap(); | ||
| 29 | if target.starts_with("thumbv6m-") { | ||
| 30 | println!("cargo:rustc-cfg=armv6m"); | ||
| 31 | } | ||
| 32 | } | 27 | } |
diff --git a/stm32-data b/stm32-data | |||
| Subproject fa294eae79c0f33f4cde1e73b4e69db59f7429e | Subproject 56d5b8b2aee7026b4f9bcffc427bb8f9d48afeb | ||
