Address reviews

This commit is contained in:
Kaitlyn Kenwell
2023-12-14 09:36:22 -05:00
committed by Dario Nieuwenhuis
parent 686ee2cb14
commit 4757257ac0
19 changed files with 307 additions and 41 deletions

View File

@ -1,9 +0,0 @@
[unstable]
build-std = ["core"]
build-std-features = ["panic_immediate_abort"]
[build]
target = "thumbv7em-none-eabi"
[env]
DEFMT_LOG = "trace"

View File

@ -25,6 +25,7 @@ cortex-m-rt = "0.7.0"
[features]
defmt = [
"dep:defmt",
"dep:defmt-rtt",
"embassy-stm32/defmt",
"embassy-boot-stm32/defmt",
"embassy-sync/defmt",

View File

@ -26,13 +26,12 @@ fn main() -> ! {
config.rcc = WPAN_DEFAULT;
let p = embassy_stm32::init(config);
// Uncomment this if you are debugging the bootloader with debugger/RTT attached,
// as it prevents a hard fault when accessing flash 'too early' after boot.
/*
for i in 0..10000000 {
cortex_m::asm::nop();
}
*/
// Prevent a hard fault when accessing flash 'too early' after boot.
#[cfg(feature = "defmt")]
for _ in 0..10000000 {
cortex_m::asm::nop();
}
let layout = Flash::new_blocking(p.FLASH).into_blocking_regions();
let flash = Mutex::new(RefCell::new(layout.bank1_region));