boot/stm32: autodetect thumbv6, remove cargo feature.
This commit is contained in:
@ -27,7 +27,6 @@ defmt = [
|
||||
"embassy-stm32/defmt",
|
||||
]
|
||||
debug = ["defmt-rtt"]
|
||||
thumbv6 = []
|
||||
|
||||
[profile.dev]
|
||||
debug = 2
|
||||
|
@ -24,4 +24,9 @@ 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");
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ impl<const PAGE_SIZE: usize> BootLoader<PAGE_SIZE> {
|
||||
trace!("Loading app at 0x{:x}", start);
|
||||
#[allow(unused_mut)]
|
||||
let mut p = cortex_m::Peripherals::steal();
|
||||
#[cfg(not(feature = "thumbv6"))]
|
||||
#[cfg(not(armv6m))]
|
||||
p.SCB.invalidate_icache();
|
||||
p.SCB.vtor.write(start as u32);
|
||||
|
||||
|
Reference in New Issue
Block a user