Skip to content

Commit 01fc80f

Browse files
authored
Merge pull request #54 from dgarske/stm32wb
Fixes to config and documentation for STM32WB
2 parents c4c786d + 010d6de commit 01fc80f

5 files changed

Lines changed: 50 additions & 29 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
TARGET=stm32wb
2+
SIGN=ECC256
3+
HASH=SHA256
4+
WOLFBOOT_SECTOR_SIZE=0x1000
5+
WOLFBOOT_PARTITION_SIZE=0x7B800
6+
WOLFBOOT_PARTITION_BOOT_ADDRESS=0x08008000
7+
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x08083800
8+
WOLFBOOT_PARTITION_SWAP_ADDRESS=0x080FF000
9+
NVM_FLASH_WRITEONCE=1
10+
PKA=1

config/examples/stm32wb-small.config

Lines changed: 0 additions & 6 deletions
This file was deleted.

config/examples/stm32wb-tpm.config

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
TARGET=stm32wb
22
SIGN=ECC256
3-
HASH?=SHA256
4-
WOLFBOOT_SECTOR_SIZE?=0x20000
5-
WOLFBOOT_PARTITION_SIZE?=0x60000
6-
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x20000
7-
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x00000
8-
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x60000
3+
HASH=SHA256
4+
WOLFBOOT_SECTOR_SIZE=0x1000
5+
WOLFBOOT_PARTITION_SIZE=0x20000
6+
WOLFBOOT_PARTITION_BOOT_ADDRESS=0x08008000
7+
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x08028000
8+
WOLFBOOT_PARTITION_SWAP_ADDRESS=0x08048000
99
NVM_FLASH_WRITEONCE=1
1010
PKA=0
1111
WOLFTPM=1

config/examples/stm32wb.config

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
TARGET=stm32wb
22
SIGN=ECC256
3-
HASH?=SHA256
4-
WOLFBOOT_SECTOR_SIZE?=0x20000
5-
WOLFBOOT_PARTITION_SIZE?=0x60000
6-
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x20000
7-
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x00000
8-
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x60000
3+
HASH=SHA256
4+
WOLFBOOT_SECTOR_SIZE=0x1000
5+
WOLFBOOT_PARTITION_SIZE=0x20000
6+
WOLFBOOT_PARTITION_BOOT_ADDRESS=0x08008000
7+
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x08028000
8+
WOLFBOOT_PARTITION_SWAP_ADDRESS=0x08048000
99
NVM_FLASH_WRITEONCE=1
10-
PKA=1
10+
PKA=0

docs/Targets.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Example partitioning on Nucleo-68 board:
105105
#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x48000
106106
```
107107

108-
### Building
108+
### STM32WB55 Building
109109

110110
Use `make TARGET=stm32wb`.
111111

@@ -116,27 +116,44 @@ Compile with:
116116

117117
`make TARGET=stm32wb NVM_FLASH_WRITEONCE=1`
118118

119-
### Loading the firmware
119+
### STM32WB55 with OpenOCD
120120

121121
`openocd --file ./config/openocd/openocd_stm32wbx.cfg`
122122

123123
```
124124
telnet localhost 4444
125-
flash write_image unlock erase wolfboot.bin 0x08000000
126-
flash verify_bank 0 wolfboot.bin
127-
flash write_image unlock erase test-app/image_v1_signed.bin 0x080008000
128-
flash verify_bank 0 test-app/image_v1_signed.bin 0x080008000
125+
reset halt
126+
flash write_image unlock erase factory.bin 0x08000000
127+
flash verify_bank 0 factory.bin
129128
reset
130129
```
131130

132-
### Debugging
131+
### STM32WB55 with ST-Link
132+
133+
```
134+
git clone https://github.com/stlink-org/stlink.git
135+
cd stlink
136+
cmake .
137+
make
138+
sudo make install
139+
```
140+
141+
```
142+
st-flash write factory.bin 0x08000000
143+
144+
# Start GDB server
145+
st-util -p 3333
146+
```
147+
148+
### STM32WB55 Debugging
133149

134150
Use `make DEBUG=1` and reload firmware.
135151

152+
wolfBoot has a .gdbinit to configure
136153
```
137-
arm-none-eabi-gdb wolfboot.elf -ex "set remotetimeout 240" -ex "target extended-remote localhost:3333"
138-
(gdb) add-symbol-file test-app/image.elf 0x8000
139-
(gdb) add-symbol-file wolfboot.elf 0x0
154+
arm-none-eabi-gdb
155+
add-symbol-file test-app/image.elf 0x08008100
156+
mon reset init
140157
```
141158

142159

0 commit comments

Comments
 (0)