aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2022-04-26 18:33:09 +0200
committerUlf Lilleengen <[email protected]>2022-04-27 15:17:18 +0200
commitda61611f8f57410a87106961efd24d80e6a8f63e (patch)
tree81bf5f96a052be8cc74fa4f513592adf1f4bb1db /examples
parent484e0acc638c27366e19275c32db9c8487ea8fba (diff)
Add bootloader to CI
Diffstat (limited to 'examples')
-rw-r--r--examples/boot/nrf/.cargo/config.toml6
-rw-r--r--examples/boot/nrf/Cargo.toml2
-rw-r--r--examples/boot/nrf/README.md8
-rw-r--r--examples/boot/stm32l0/Cargo.toml2
-rw-r--r--examples/boot/stm32l0/README.md2
-rw-r--r--examples/boot/stm32l0/memory.x8
-rw-r--r--examples/boot/stm32l1/Cargo.toml2
-rw-r--r--examples/boot/stm32l1/README.md2
-rw-r--r--examples/boot/stm32l1/memory.x8
-rw-r--r--examples/boot/stm32l4/Cargo.toml2
-rw-r--r--examples/boot/stm32l4/README.md2
-rw-r--r--examples/boot/stm32l4/memory.x10
-rw-r--r--examples/boot/stm32wl/Cargo.toml2
-rw-r--r--examples/boot/stm32wl/README.md2
-rw-r--r--examples/boot/stm32wl/memory.x8
-rw-r--r--examples/boot/stm32wl/src/bin/a.rs8
-rw-r--r--examples/stm32l0/src/bin/flash.rs2
-rw-r--r--examples/stm32l1/src/bin/flash.rs2
-rw-r--r--examples/stm32wl/src/bin/flash.rs2
19 files changed, 44 insertions, 36 deletions
diff --git a/examples/boot/nrf/.cargo/config.toml b/examples/boot/nrf/.cargo/config.toml
new file mode 100644
index 000000000..c75b5c539
--- /dev/null
+++ b/examples/boot/nrf/.cargo/config.toml
@@ -0,0 +1,6 @@
1[target.'cfg(all(target_arch = "arm", target_os = "none"))']
2# replace nRF82840_xxAA with your chip as listed in `probe-run --list-chips`
3runner = "probe-run --chip nRF52840_xxAA"
4
5[build]
6target = "thumbv7em-none-eabi"
diff --git a/examples/boot/nrf/Cargo.toml b/examples/boot/nrf/Cargo.toml
index 0a5bb8f9d..da8333b7c 100644
--- a/examples/boot/nrf/Cargo.toml
+++ b/examples/boot/nrf/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6 6
7[dependencies] 7[dependencies]
8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] } 8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
9embassy-nrf = { version = "0.1.0", path = "../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly"] } 9embassy-nrf = { version = "0.1.0", path = "../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly", "nrf52840"] }
10embassy-boot-nrf = { version = "0.1.0", path = "../../../embassy-boot/nrf" } 10embassy-boot-nrf = { version = "0.1.0", path = "../../../embassy-boot/nrf" }
11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" } 11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
12 12
diff --git a/examples/boot/nrf/README.md b/examples/boot/nrf/README.md
index b97513a9d..453df7f31 100644
--- a/examples/boot/nrf/README.md
+++ b/examples/boot/nrf/README.md
@@ -17,15 +17,15 @@ application.
17 17
18``` 18```
19# Flash bootloader 19# Flash bootloader
20cargo flash --manifest-path ../../embassy-boot/nrf/Cargo.toml --release --features embassy-nrf/nrf52840 --chip nRF52840_xxAA 20cargo flash --manifest-path ../../../embassy-boot/nrf/Cargo.toml --features embassy-nrf/nrf52840 --release --chip nRF52840_xxAA
21# Build 'b' 21# Build 'b'
22cargo build --release --features embassy-nrf/nrf52840 --bin b 22cargo build --release --bin b
23# Generate binary for 'b' 23# Generate binary for 'b'
24cargo objcopy --release --features embassy-nrf/nrf52840 --bin b -- -O binary b.bin 24cargo objcopy --release --bin b -- -O binary b.bin
25``` 25```
26 26
27# Flash `a` (which includes b.bin) 27# Flash `a` (which includes b.bin)
28 28
29``` 29```
30cargo flash --release --features embassy-nrf/nrf52840 --bin a --chip nRF52840_xxAA 30cargo flash --release --bin a --chip nRF52840_xxAA
31``` 31```
diff --git a/examples/boot/stm32l0/Cargo.toml b/examples/boot/stm32l0/Cargo.toml
index 2e093d771..5cb1add5b 100644
--- a/examples/boot/stm32l0/Cargo.toml
+++ b/examples/boot/stm32l0/Cargo.toml
@@ -7,7 +7,7 @@ version = "0.1.0"
7[dependencies] 7[dependencies]
8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] } 8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
9embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] } 9embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] }
10embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32", features = ["flash-128", "invert-erase", "thumbv6"] } 10embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32", features = ["thumbv6"] }
11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" } 11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
12 12
13defmt = { version = "0.3", optional = true } 13defmt = { version = "0.3", optional = true }
diff --git a/examples/boot/stm32l0/README.md b/examples/boot/stm32l0/README.md
index 9c8660821..b498fdc2d 100644
--- a/examples/boot/stm32l0/README.md
+++ b/examples/boot/stm32l0/README.md
@@ -15,7 +15,7 @@ application.
15 15
16``` 16```
17# Flash bootloader 17# Flash bootloader
18cargo flash --manifest-path ../../../embassy-boot/stm32/Cargo.toml --release --features embassy-stm32/stm32l072cz,flash-128,invert-erase,thumbv6 --chip STM32L072CZTx 18cargo flash --manifest-path ../../../embassy-boot/stm32/Cargo.toml --release --features embassy-stm32/stm32l072cz,thumbv6 --chip STM32L072CZTx
19# Build 'b' 19# Build 'b'
20cargo build --release --bin b 20cargo build --release --bin b
21# Generate binary for 'b' 21# Generate binary for 'b'
diff --git a/examples/boot/stm32l0/memory.x b/examples/boot/stm32l0/memory.x
index fd5bf1a5d..d0d2bd7bb 100644
--- a/examples/boot/stm32l0/memory.x
+++ b/examples/boot/stm32l0/memory.x
@@ -8,8 +8,8 @@ MEMORY
8 RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 16K 8 RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 16K
9} 9}
10 10
11__bootloader_state_start = ORIGIN(BOOTLOADER_STATE); 11__bootloader_state_start = ORIGIN(BOOTLOADER_STATE) - ORIGIN(BOOTLOADER);
12__bootloader_state_end = ORIGIN(BOOTLOADER_STATE) + LENGTH(BOOTLOADER_STATE); 12__bootloader_state_end = ORIGIN(BOOTLOADER_STATE) + LENGTH(BOOTLOADER_STATE) - ORIGIN(BOOTLOADER);
13 13
14__bootloader_dfu_start = ORIGIN(DFU); 14__bootloader_dfu_start = ORIGIN(DFU) - ORIGIN(BOOTLOADER);
15__bootloader_dfu_end = ORIGIN(DFU) + LENGTH(DFU); 15__bootloader_dfu_end = ORIGIN(DFU) + LENGTH(DFU) - ORIGIN(BOOTLOADER);
diff --git a/examples/boot/stm32l1/Cargo.toml b/examples/boot/stm32l1/Cargo.toml
index ec396bef2..9f97462f6 100644
--- a/examples/boot/stm32l1/Cargo.toml
+++ b/examples/boot/stm32l1/Cargo.toml
@@ -7,7 +7,7 @@ version = "0.1.0"
7[dependencies] 7[dependencies]
8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] } 8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
9embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] } 9embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] }
10embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32", features = ["flash-256", "invert-erase"] } 10embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32" }
11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" } 11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
12 12
13defmt = { version = "0.3", optional = true } 13defmt = { version = "0.3", optional = true }
diff --git a/examples/boot/stm32l1/README.md b/examples/boot/stm32l1/README.md
index 1a9e85a75..0d4accbff 100644
--- a/examples/boot/stm32l1/README.md
+++ b/examples/boot/stm32l1/README.md
@@ -15,7 +15,7 @@ application.
15 15
16``` 16```
17# Flash bootloader 17# Flash bootloader
18cargo flash --manifest-path ../../../embassy-boot/stm32/Cargo.toml --release --features embassy-stm32/stm32l151cb-a,flash-256,invert-erase --chip STM32L151CBxxA 18cargo flash --manifest-path ../../../embassy-boot/stm32/Cargo.toml --release --features embassy-stm32/stm32l151cb-a --chip STM32L151CBxxA
19# Build 'b' 19# Build 'b'
20cargo build --release --bin b 20cargo build --release --bin b
21# Generate binary for 'b' 21# Generate binary for 'b'
diff --git a/examples/boot/stm32l1/memory.x b/examples/boot/stm32l1/memory.x
index fd5bf1a5d..d0d2bd7bb 100644
--- a/examples/boot/stm32l1/memory.x
+++ b/examples/boot/stm32l1/memory.x
@@ -8,8 +8,8 @@ MEMORY
8 RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 16K 8 RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 16K
9} 9}
10 10
11__bootloader_state_start = ORIGIN(BOOTLOADER_STATE); 11__bootloader_state_start = ORIGIN(BOOTLOADER_STATE) - ORIGIN(BOOTLOADER);
12__bootloader_state_end = ORIGIN(BOOTLOADER_STATE) + LENGTH(BOOTLOADER_STATE); 12__bootloader_state_end = ORIGIN(BOOTLOADER_STATE) + LENGTH(BOOTLOADER_STATE) - ORIGIN(BOOTLOADER);
13 13
14__bootloader_dfu_start = ORIGIN(DFU); 14__bootloader_dfu_start = ORIGIN(DFU) - ORIGIN(BOOTLOADER);
15__bootloader_dfu_end = ORIGIN(DFU) + LENGTH(DFU); 15__bootloader_dfu_end = ORIGIN(DFU) + LENGTH(DFU) - ORIGIN(BOOTLOADER);
diff --git a/examples/boot/stm32l4/Cargo.toml b/examples/boot/stm32l4/Cargo.toml
index 394f26a12..53424a666 100644
--- a/examples/boot/stm32l4/Cargo.toml
+++ b/examples/boot/stm32l4/Cargo.toml
@@ -7,7 +7,7 @@ version = "0.1.0"
7[dependencies] 7[dependencies]
8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] } 8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
9embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] } 9embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] }
10embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32", features = ["flash-2k"] } 10embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32" }
11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" } 11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
12 12
13defmt = { version = "0.3", optional = true } 13defmt = { version = "0.3", optional = true }
diff --git a/examples/boot/stm32l4/README.md b/examples/boot/stm32l4/README.md
index 09e09d6ef..8966c2fb5 100644
--- a/examples/boot/stm32l4/README.md
+++ b/examples/boot/stm32l4/README.md
@@ -15,7 +15,7 @@ application.
15 15
16``` 16```
17# Flash bootloader 17# Flash bootloader
18cargo flash --manifest-path ../../../embassy-boot/stm32/Cargo.toml --release --features embassy-stm32/stm32l475vg,flash-2k --chip STM32L475VG 18cargo flash --manifest-path ../../../embassy-boot/stm32/Cargo.toml --release --features embassy-stm32/stm32l475vg --chip STM32L475VG
19# Build 'b' 19# Build 'b'
20cargo build --release --bin b 20cargo build --release --bin b
21# Generate binary for 'b' 21# Generate binary for 'b'
diff --git a/examples/boot/stm32l4/memory.x b/examples/boot/stm32l4/memory.x
index fd5bf1a5d..14b2a2c9f 100644
--- a/examples/boot/stm32l4/memory.x
+++ b/examples/boot/stm32l4/memory.x
@@ -5,11 +5,11 @@ MEMORY
5 BOOTLOADER_STATE : ORIGIN = 0x08006000, LENGTH = 4K 5 BOOTLOADER_STATE : ORIGIN = 0x08006000, LENGTH = 4K
6 FLASH : ORIGIN = 0x08008000, LENGTH = 32K 6 FLASH : ORIGIN = 0x08008000, LENGTH = 32K
7 DFU : ORIGIN = 0x08010000, LENGTH = 36K 7 DFU : ORIGIN = 0x08010000, LENGTH = 36K
8 RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 16K 8 RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 32K
9} 9}
10 10
11__bootloader_state_start = ORIGIN(BOOTLOADER_STATE); 11__bootloader_state_start = ORIGIN(BOOTLOADER_STATE) - ORIGIN(BOOTLOADER);
12__bootloader_state_end = ORIGIN(BOOTLOADER_STATE) + LENGTH(BOOTLOADER_STATE); 12__bootloader_state_end = ORIGIN(BOOTLOADER_STATE) + LENGTH(BOOTLOADER_STATE) - ORIGIN(BOOTLOADER);
13 13
14__bootloader_dfu_start = ORIGIN(DFU); 14__bootloader_dfu_start = ORIGIN(DFU) - ORIGIN(BOOTLOADER);
15__bootloader_dfu_end = ORIGIN(DFU) + LENGTH(DFU); 15__bootloader_dfu_end = ORIGIN(DFU) + LENGTH(DFU) - ORIGIN(BOOTLOADER);
diff --git a/examples/boot/stm32wl/Cargo.toml b/examples/boot/stm32wl/Cargo.toml
index 9c69f4a65..fb64886e6 100644
--- a/examples/boot/stm32wl/Cargo.toml
+++ b/examples/boot/stm32wl/Cargo.toml
@@ -7,7 +7,7 @@ version = "0.1.0"
7[dependencies] 7[dependencies]
8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] } 8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
9embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] } 9embassy-stm32 = { version = "0.1.0", path = "../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] }
10embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32", features = ["flash-2k"] } 10embassy-boot-stm32 = { version = "0.1.0", path = "../../../embassy-boot/stm32" }
11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" } 11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
12 12
13defmt = { version = "0.3", optional = true } 13defmt = { version = "0.3", optional = true }
diff --git a/examples/boot/stm32wl/README.md b/examples/boot/stm32wl/README.md
index a26a23852..edcdacf91 100644
--- a/examples/boot/stm32wl/README.md
+++ b/examples/boot/stm32wl/README.md
@@ -15,7 +15,7 @@ application.
15 15
16``` 16```
17# Flash bootloader 17# Flash bootloader
18cargo flash --manifest-path ../../../embassy-boot/stm32/Cargo.toml --release --features embassy-stm32/stm32wl55jc-cm4,flash-2k --chip STM32WLE5JCIx 18cargo flash --manifest-path ../../../embassy-boot/stm32/Cargo.toml --release --features embassy-stm32/stm32wl55jc-cm4 --chip STM32WLE5JCIx
19# Build 'b' 19# Build 'b'
20cargo build --release --bin b 20cargo build --release --bin b
21# Generate binary for 'b' 21# Generate binary for 'b'
diff --git a/examples/boot/stm32wl/memory.x b/examples/boot/stm32wl/memory.x
index 78dd69c35..14b2a2c9f 100644
--- a/examples/boot/stm32wl/memory.x
+++ b/examples/boot/stm32wl/memory.x
@@ -8,8 +8,8 @@ MEMORY
8 RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 32K 8 RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 32K
9} 9}
10 10
11__bootloader_state_start = ORIGIN(BOOTLOADER_STATE); 11__bootloader_state_start = ORIGIN(BOOTLOADER_STATE) - ORIGIN(BOOTLOADER);
12__bootloader_state_end = ORIGIN(BOOTLOADER_STATE) + LENGTH(BOOTLOADER_STATE); 12__bootloader_state_end = ORIGIN(BOOTLOADER_STATE) + LENGTH(BOOTLOADER_STATE) - ORIGIN(BOOTLOADER);
13 13
14__bootloader_dfu_start = ORIGIN(DFU); 14__bootloader_dfu_start = ORIGIN(DFU) - ORIGIN(BOOTLOADER);
15__bootloader_dfu_end = ORIGIN(DFU) + LENGTH(DFU); 15__bootloader_dfu_end = ORIGIN(DFU) + LENGTH(DFU) - ORIGIN(BOOTLOADER);
diff --git a/examples/boot/stm32wl/src/bin/a.rs b/examples/boot/stm32wl/src/bin/a.rs
index b1f4a4a03..d01a72f2d 100644
--- a/examples/boot/stm32wl/src/bin/a.rs
+++ b/examples/boot/stm32wl/src/bin/a.rs
@@ -17,16 +17,18 @@ static APP_B: &[u8] = include_bytes!("../../b.bin");
17 17
18#[embassy::main] 18#[embassy::main]
19async fn main(_s: embassy::executor::Spawner, p: Peripherals) { 19async fn main(_s: embassy::executor::Spawner, p: Peripherals) {
20 let flash = Flash::new(p.FLASH); 20 let flash = Flash::unlock(p.FLASH);
21 let mut flash = BlockingAsync::new(flash); 21 let mut flash = BlockingAsync::new(flash);
22 22
23 let button = Input::new(p.PA0, Pull::Up); 23 let button = Input::new(p.PA0, Pull::Up);
24 let mut button = ExtiInput::new(button, p.EXTI0); 24 let mut button = ExtiInput::new(button, p.EXTI0);
25 25
26 let mut led = Output::new(p.PB9, Level::Low, Speed::Low); 26 let mut led = Output::new(p.PB9, Level::Low, Speed::Low);
27 led.set_high();
27 28
28 let mut updater = FirmwareUpdater::default(); 29 let mut updater = FirmwareUpdater::default();
29 button.wait_for_falling_edge().await; 30 button.wait_for_falling_edge().await;
31 //defmt::info!("Starting update");
30 let mut offset = 0; 32 let mut offset = 0;
31 for chunk in APP_B.chunks(2048) { 33 for chunk in APP_B.chunks(2048) {
32 let mut buf: [u8; 2048] = [0; 2048]; 34 let mut buf: [u8; 2048] = [0; 2048];
@@ -39,7 +41,7 @@ async fn main(_s: embassy::executor::Spawner, p: Peripherals) {
39 offset += chunk.len(); 41 offset += chunk.len();
40 } 42 }
41 updater.mark_update(&mut flash).await.unwrap(); 43 updater.mark_update(&mut flash).await.unwrap();
42 // defmt::info!("Marked as updated"); 44 //defmt::info!("Marked as updated");
43 led.set_high(); 45 led.set_low();
44 cortex_m::peripheral::SCB::sys_reset(); 46 cortex_m::peripheral::SCB::sys_reset();
45} 47}
diff --git a/examples/stm32l0/src/bin/flash.rs b/examples/stm32l0/src/bin/flash.rs
index 0ab7b133b..c2ccb5b69 100644
--- a/examples/stm32l0/src/bin/flash.rs
+++ b/examples/stm32l0/src/bin/flash.rs
@@ -15,7 +15,7 @@ use panic_probe as _;
15async fn main(_spawner: Spawner, p: Peripherals) { 15async fn main(_spawner: Spawner, p: Peripherals) {
16 info!("Hello Flash!"); 16 info!("Hello Flash!");
17 17
18 const ADDR: u32 = 0x8026000; 18 const ADDR: u32 = 0x26000;
19 19
20 let mut f = Flash::unlock(p.FLASH); 20 let mut f = Flash::unlock(p.FLASH);
21 21
diff --git a/examples/stm32l1/src/bin/flash.rs b/examples/stm32l1/src/bin/flash.rs
index b234289af..eea838cba 100644
--- a/examples/stm32l1/src/bin/flash.rs
+++ b/examples/stm32l1/src/bin/flash.rs
@@ -15,7 +15,7 @@ use panic_probe as _;
15async fn main(_spawner: Spawner, p: Peripherals) { 15async fn main(_spawner: Spawner, p: Peripherals) {
16 info!("Hello Flash!"); 16 info!("Hello Flash!");
17 17
18 const ADDR: u32 = 0x8026000; 18 const ADDR: u32 = 0x26000;
19 19
20 let mut f = Flash::unlock(p.FLASH); 20 let mut f = Flash::unlock(p.FLASH);
21 21
diff --git a/examples/stm32wl/src/bin/flash.rs b/examples/stm32wl/src/bin/flash.rs
index 9e13c702a..f84818224 100644
--- a/examples/stm32wl/src/bin/flash.rs
+++ b/examples/stm32wl/src/bin/flash.rs
@@ -15,7 +15,7 @@ use panic_probe as _;
15async fn main(_spawner: Spawner, p: Peripherals) { 15async fn main(_spawner: Spawner, p: Peripherals) {
16 info!("Hello Flash!"); 16 info!("Hello Flash!");
17 17
18 const ADDR: u32 = 0x8036000; 18 const ADDR: u32 = 0x36000;
19 19
20 let mut f = Flash::unlock(p.FLASH); 20 let mut f = Flash::unlock(p.FLASH);
21 21