aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxoviat <[email protected]>2023-05-11 16:45:42 -0500
committerxoviat <[email protected]>2023-05-11 16:45:42 -0500
commit8a620fd59ca2ad958aad279eb55a1c97ef100e86 (patch)
tree81f14f45f5a59df2a73af51644b394d23bece5f0
parent007f45292762ab27291dd54bd0cfdeb23e390de4 (diff)
stm32/ble: fix tests and add instructions to run example
-rw-r--r--.vscode/.gitignore3
-rw-r--r--examples/stm32wb/.cargo/config.toml3
-rw-r--r--examples/stm32wb/memory.x19
-rw-r--r--examples/stm32wb/src/bin/tl_mbox.rs23
-rw-r--r--tests/stm32/Cargo.toml2
5 files changed, 44 insertions, 6 deletions
diff --git a/.vscode/.gitignore b/.vscode/.gitignore
new file mode 100644
index 000000000..9fbb9ec95
--- /dev/null
+++ b/.vscode/.gitignore
@@ -0,0 +1,3 @@
1*.cortex-debug.*.json
2launch.json
3tasks.json \ No newline at end of file
diff --git a/examples/stm32wb/.cargo/config.toml b/examples/stm32wb/.cargo/config.toml
index 5d78d79e5..d23fdc513 100644
--- a/examples/stm32wb/.cargo/config.toml
+++ b/examples/stm32wb/.cargo/config.toml
@@ -1,6 +1,7 @@
1[target.'cfg(all(target_arch = "arm", target_os = "none"))'] 1[target.'cfg(all(target_arch = "arm", target_os = "none"))']
2# replace STM32WB55CCUx with your chip as listed in `probe-rs-cli chip list` 2# replace STM32WB55CCUx with your chip as listed in `probe-rs-cli chip list`
3runner = "probe-rs-cli run --chip STM32WB55CCUx --speed 1000 --connect-under-reset" 3# runner = "probe-rs-cli run --chip STM32WB55CCUx --speed 1000 --connect-under-reset"
4runner = "teleprobe local run --chip STM32WB55RG --elf"
4 5
5[build] 6[build]
6target = "thumbv7em-none-eabihf" 7target = "thumbv7em-none-eabihf"
diff --git a/examples/stm32wb/memory.x b/examples/stm32wb/memory.x
index c75d07352..75bb74466 100644
--- a/examples/stm32wb/memory.x
+++ b/examples/stm32wb/memory.x
@@ -1,14 +1,25 @@
1/* 1/*
2 The size of this file must be exactly the same as in other memory_xx.x files. 2 The size of this file must be exactly the same as in other memory_xx.x files.
3 Memory size for STM32WB55xC with 256K FLASH 3 Memory size for STM32WB55xC with 256K FLASH
4*/
5 4
6MEMORY 5 MEMORY
7{ 6 {
8 FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 256K 7 FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 256K
9 RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K 8 RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
10 RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K 9 RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K
11} 10 }
11*/
12
13/*
14 Memory size for STM32WB55xC with 512K FLASH
15
16 MEMORY
17 {
18 FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
19 RAM (xrw) : ORIGIN = 0x20000008, LENGTH = 0x2FFF8
20 RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K
21 }
22*/
12 23
13/* Place stack at the end of SRAM1 */ 24/* Place stack at the end of SRAM1 */
14_stack_start = ORIGIN(RAM) + LENGTH(RAM); 25_stack_start = ORIGIN(RAM) + LENGTH(RAM);
diff --git a/examples/stm32wb/src/bin/tl_mbox.rs b/examples/stm32wb/src/bin/tl_mbox.rs
index fadeb0d22..340235520 100644
--- a/examples/stm32wb/src/bin/tl_mbox.rs
+++ b/examples/stm32wb/src/bin/tl_mbox.rs
@@ -11,6 +11,29 @@ use {defmt_rtt as _, panic_probe as _};
11 11
12#[embassy_executor::main] 12#[embassy_executor::main]
13async fn main(_spawner: Spawner) { 13async fn main(_spawner: Spawner) {
14 /*
15 How to make this work:
16
17 - Obtain a NUCLEO-STM32WB55 from your preferred supplier.
18 - Download and Install STM32CubeProgrammer.
19 - Download stm32wb5x_FUS_fw.bin, stm32wb5x_BLE_Stack_full_fw.bin, and Release_Notes.html from
20 gh:STMicroelectronics/STM32CubeWB@2234d97/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x
21 - Open STM32CubeProgrammer
22 - On the right-hand pane, click "firmware upgrade" to upgrade the st-link firmware.
23 - Once complete, click connect to connect to the device.
24 - On the left hand pane, click the RSS signal icon to open "Firmware Upgrade Services".
25 - In the Release_Notes.html, find the memory address that corresponds to your device for the stm32wb5x_FUS_fw.bin file
26 - Select that file, the memory address, "verify download", and then "Firmware Upgrade".
27 - Once complete, in the Release_Notes.html, find the memory address that corresponds to your device for the
28 stm32wb5x_BLE_Stack_full_fw.bin file. It should not be the same memory address.
29 - Select that file, the memory address, "verify download", and then "Firmware Upgrade".
30 - Disconnect from the device.
31 - In the examples folder for stm32wb, modify the memory.x file to match your target device.
32 - Run this example.
33
34 Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name.
35 */
36
14 let p = embassy_stm32::init(Default::default()); 37 let p = embassy_stm32::init(Default::default());
15 info!("Hello World!"); 38 info!("Hello World!");
16 39
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml
index 03ddd3d0e..868d60093 100644
--- a/tests/stm32/Cargo.toml
+++ b/tests/stm32/Cargo.toml
@@ -11,7 +11,7 @@ stm32g071rb = ["embassy-stm32/stm32g071rb", "not-gpdma"] # Nucleo
11stm32c031c6 = ["embassy-stm32/stm32c031c6", "not-gpdma"] # Nucleo 11stm32c031c6 = ["embassy-stm32/stm32c031c6", "not-gpdma"] # Nucleo
12stm32g491re = ["embassy-stm32/stm32g491re", "not-gpdma"] # Nucleo 12stm32g491re = ["embassy-stm32/stm32g491re", "not-gpdma"] # Nucleo
13stm32h755zi = ["embassy-stm32/stm32h755zi-cm7", "not-gpdma"] # Nucleo 13stm32h755zi = ["embassy-stm32/stm32h755zi-cm7", "not-gpdma"] # Nucleo
14stm32wb55rg = ["embassy-stm32/stm32wb55rg", "ble", "not-gpdma"] # Nucleo 14stm32wb55rg = ["embassy-stm32/stm32wb55rg", "not-gpdma"] # Nucleo
15stm32h563zi = ["embassy-stm32/stm32h563zi"] # Nucleo 15stm32h563zi = ["embassy-stm32/stm32h563zi"] # Nucleo
16stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board 16stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board
17 17