Skip to content

Commit d853428

Browse files
committed
Update documentation
1 parent f9e6f69 commit d853428

6 files changed

+46
-31
lines changed

Docs/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Documentation Overview
44

55
* [Graphic](stm32-secure-patching-bootloader-MultiSegment_rev1_Dec2021.pdf) describing MultiSegment feature in more detail.
6-
* [Quick Start Guide](stm32-secure-patching-bootloader-QSG_rev3_Nov2022.pdf) in PDF form with screenshots.
6+
* [Quick Start Guide](stm32-secure-patching-bootloader-QSG_rev4_Mar2023.pdf) in PDF form with screenshots.
77

88
## Quick Start Guide
99

@@ -16,7 +16,7 @@ Integrating the stm32-secure-patching-bootloader is a simple five step process:
1616

1717
Please refer to [stm32-secure-patching-bootloader-demoapp](https://github.com/firmwaremodules/stm32-secure-patching-bootloader-demoapp) repository for working projects already implementing these steps or to the STM32 Cube repositories we maintain that has the bootloader integrated with select reference projects at [here](https://github.com/orgs/firmwaremodules/repositories).
1818

19-
Also refer to this [Quick Start Guide](stm32-secure-patching-bootloader-QSG_rev3_Nov2022.pdf) PDF document for more details including images and screenshots.
19+
Also refer to this [Quick Start Guide](stm32-secure-patching-bootloader-QSG_rev4_Mar2023.pdf) PDF document for more details including images and screenshots.
2020

2121
1. Adding bootloader files to your project repository
2222

@@ -169,21 +169,22 @@ void SystemInit(void)
169169

170170
5. Generating your project's encryption and signing keys and machine.txt file.
171171

172-
Use the make_keys.bat script under Scripts to call a Python tool to generate the AES encryption key (firmware confidentiality) and the ECDSA public verification and private signing keys (firmware authenticity). Example on Windows systems to place keys in a Keys directory:
172+
Use the make_keys_v7m.bat script (for L0, F0, G0 targets use make_keys_v6m.bat) under Scripts to call a Python tool to generate the AES encryption key (firmware confidentiality) and the ECDSA public verification and private signing keys (firmware authenticity). Example on Windows systems to place keys in a Keys directory:
173173

174174
```
175-
c:\stm32-secure-patching-bootloader-demoapp\Bootloader\Scripts>make_keys.bat ..\..\App\Project\DemoApp\DISCO-F769I\STM32CubeIDE\Keys
175+
c:\stm32-secure-patching-bootloader-demoapp\Bootloader\Scripts>make_keys_v7m.bat ..\..\App\Project\DemoApp\DISCO-F769I\STM32CubeIDE\Keys
176176
177-
make_keys.bat : Generate new secure keys for stm32-secure-patching-bootloader
177+
make_keys_v7m.bat : Generate new secure keys for stm32-secure-patching-bootloader
178178
Making ..\..\App\Project\DemoApp\DISCO-F769I\STM32CubeIDE\Keys/Cipher_Key_AES_CBC.bin
179179
Making ..\..\App\Project\DemoApp\DISCO-F769I\STM32CubeIDE\Keys/Signing_PrivKey_ECC.txt
180+
Making ..\..\App\Project\DemoApp\DISCO-F769I\STM32CubeIDE\Keys/machine.txt
180181
```
181182

182-
Run `make_keys <path to directory to contain key files>`
183+
Run `make_keys_v7m <path to directory to contain key files>`
183184

184-
If you're not using Windows, then all you need to do is look inside make_keys.bat and run the Python scripts directly. The Keys directory is referenced by the postbuild.sh post-build command line in the IDE. This directory can be anywhere and called anything by adjusting the post-build command line.
185+
If you're not using Windows, then all you need to do is look inside make_keys_v7m.bat and run the Python scripts directly. The Keys directory is referenced by the postbuild.sh post-build command line in the IDE. This directory can be anywhere and called anything by adjusting the post-build command line.
185186

186-
Ensure there is a file called `machine.txt` in the `Keys` dir. Add one line to it: `V7M` for all targets unless you're using a cortex-M0, then add `V6M` instead. `make_keys.bat` may have already created this file.
187+
Ensure there is a file called `machine.txt` in the `Keys` dir. Add one line to it: `V7M` for all targets unless you're using a cortex-M0, then add `V6M` instead. `make_keys_vXm.bat` will have already created this file.
187188

188189
**Important Note**
189190

Binary file not shown.
Binary file not shown.

Linker/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,21 @@ _estack = 0x20005000; /* end of RAM specific to the device. */
2323
_Min_Heap_Size = 0x200; /* required amount of heap */
2424
_Min_Stack_Size = 0x400; /* required amount of stack */
2525
26-
INCLUDE stm32-secure-patching-bootloader-linker-gcc_<version>_<target>.ld
26+
INCLUDE stm32-secure-patching-bootloader-linker-gcc_<target>_<version>.ld
2727
2828
/* Specific ROM/RAM UserApp definition */
2929
APPLI_region_intvec_start__ = STM32_SECURE_PATCHING_BOOTLOADER_SLOT0_START + 0x200; /* Cortex-M7: 0x400, others: 0x200 */
3030
APPLI_region_ROM_start = STM32_SECURE_PATCHING_BOOTLOADER_SLOT0_START + VECTOR_SIZE + 0x200; /* Cortex-M7: 0x400, others: 0x200 */
3131
APPLI_region_ROM_length = STM32_SECURE_PATCHING_BOOTLOADER_SLOT0_END - APPLI_region_ROM_start + 1;
3232
APPLI_region_RAM_start = STM32_SECURE_PATCHING_BOOTLOADER_RAM_START;
33-
APPLI_region_RAM_length = 0x20005000 - APPLI_region_RAM_start;
33+
APPLI_region_RAM_length = _estack - APPLI_region_RAM_start;
3434
3535
/* Specify the memory areas */
3636
MEMORY
3737
{
3838
ISR_VECTOR (rx) : ORIGIN = APPLI_region_intvec_start__, LENGTH = VECTOR_SIZE
3939
APPLI_region_ROM : ORIGIN = APPLI_region_ROM_start, LENGTH = APPLI_region_ROM_length
4040
APPLI_region_RAM : ORIGIN = APPLI_region_RAM_start, LENGTH = APPLI_region_RAM_length
41-
QSPI (rx) : ORIGIN = APPLI_region_MULTISEG_start__, LENGTH = 64M
4241
}
4342
4443
/* Include the SECTIONS (not target-specific) */

README.md

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
## STM32 Secure Patching Bootloader
22

3-
*Don't forget to check out our [v1.4 preview](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/tree/v1.4-preview) branch with support for awesome new boards like the G0 and G4 series and the Nucleo-WL55*
4-
53
A Secure Patching Bootloader and Firmware Update System for all **STM32** MCUs.
64

75
The only bootloader and firmware update system you may ever need. Works with almost any STM32 MCU family using the [STM32CubeIDE](https://www.st.com/en/development-tools/stm32cubeide.html) development environment.
@@ -20,7 +18,7 @@ This unique solution is an easy way to get a secure and robust bootloader that o
2018
* Useful progress messages printed to UART.
2119
* Can deploy and update TouchGFX applications.
2220

23-
This secure patching bootloader and firmware update system is Apache and MIT licensed and free to use on any NUCLEO, DISCO or EVAL board we support here. If your NUCLEO, DISCO or EVAL board is missing, post an issue and we'll add it.
21+
This secure patching bootloader and firmware update system is licensed according to STMicroelectronics' Ultimate Liberty Software License Agreement (see [LICENSE](LICENSE.md)) and free to use on any NUCLEO, DISCO or EVAL board we support here. If your NUCLEO, DISCO or EVAL board is missing, post an issue and we'll add it.
2422

2523
The stm32-secure-patching-bootloader reserves between **40 - 80 KB** at the beginning of internal flash, depending on MCU and feature selected (support for USB flash loader, external flash / multisegment add to size).
2624
The bootloader also reserves about **5 KB** at the start of SRAM for the secure patching engine's stack and state, fully indepdenent of the application. This allows the application to perform in-application firmware updates and make other runtime requests of the bootloader (get firmware version, etc).
@@ -37,20 +35,25 @@ This list will grow over time as we work to support key STM32 NUCLEO, DISCO, EVA
3735

3836
| Family | Boards | Board Config | Reference Projects |
3937
| --- | --- | --- | --- |
40-
| STM32L0 | [NUCLEO-L073RZ](https://www.st.com/en/evaluation-tools/nucleo-l073rz.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-L073RZ/stm32-secure-patching-bootloader-README_NUCLEO-L073RZ_v1.3.0) |
41-
| | [B-L072Z-LRWAN1](https://www.st.com/en/evaluation-tools/b-l072z-lrwan1.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/B-L072Z-LRWAN1/stm32-secure-patching-bootloader-README_B-L072Z-LRWAN1_v1.3.0) |
42-
| STM32L4 | [NUCLEO-L412KB](https://www.st.com/en/evaluation-tools/nucleo-l412kb.html) |[README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-L412KB/stm32-secure-patching-bootloader-README_NUCLEO-L412KB_v1.3.0) |
43-
| | [NUCLEO-L452RE](https://www.st.com/en/evaluation-tools/nucleo-l452re.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-L452RE/stm32-secure-patching-bootloader-README_NUCLEO-L452RE_v1.3.0) |
44-
| | [NUCLEO-L496ZG](https://www.st.com/en/evaluation-tools/nucleo-l496zg.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-L496ZG/stm32-secure-patching-bootloader-README_NUCLEO-L496ZG_v1.3.0) |
45-
| | [DISCO-L476G](https://www.st.com/en/evaluation-tools/32l476gdiscovery.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-L476G/stm32-secure-patching-bootloader-README_DISCO-L476G_v1.3.0) |
46-
| | [DISCO-L496G](https://www.st.com/en/evaluation-tools/32l496gdiscovery.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-L496G/stm32-secure-patching-bootloader-README_DISCO-L496G_v1.3.0) |
47-
| STM32L4+ | [DISCO-L4R9I](https://www.st.com/en/evaluation-tools/32l4r9idiscovery.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-L4R9I/stm32-secure-patching-bootloader-README_DISCO-L4R9I_v1.3.0) | [FreeRTOS_LowPower IAP](https://github.com/firmwaremodules/STM32CubeL4/tree/master/Projects/32L4R9IDISCOVERY/Applications/FreeRTOS/FreeRTOS_LowPower) |
48-
| | [B-L4S5I-IOT01A](https://www.st.com/en/evaluation-tools/b-l4s5i-iot01a.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/B-L4S5I-IOT01A/stm32-secure-patching-bootloader-README_B-L4S5I-IOT01A_v1.3.0) |
49-
| STM32L5 | [DISCO-L562E](https://www.st.com/en/evaluation-tools/stm32l562e-dk.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-L562E/stm32-secure-patching-bootloader-README_DISCO-L562E_v1.3.0) |
50-
| STM32WL | [LORA-E5-DEV](https://www.seeedstudio.com/LoRa-E5-Dev-Kit-p-4868.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/LORA-E5-DEV/stm32-secure-patching-bootloader-README_LORA-E5-DEV_v1.3.0) |
38+
| STM32G0 | [NUCLEO-G0B1RE](https://www.st.com/en/evaluation-tools/nucleo-g0b1re.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-G0B1RE/stm32-secure-patching-bootloader-README_NUCLEO-G0B1RE_v1.4.0) |
39+
| STM32L0 | [NUCLEO-L073RZ](https://www.st.com/en/evaluation-tools/nucleo-l073rz.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-L073RZ/stm32-secure-patching-bootloader-README_NUCLEO-L073RZ_v1.4.0) |
40+
| | [B-L072Z-LRWAN1](https://www.st.com/en/evaluation-tools/b-l072z-lrwan1.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/B-L072Z-LRWAN1/stm32-secure-patching-bootloader-README_B-L072Z-LRWAN1_v1.4.0) |
41+
| STM32L4 | [NUCLEO-L412KB](https://www.st.com/en/evaluation-tools/nucleo-l412kb.html) |[README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-L412KB/stm32-secure-patching-bootloader-README_NUCLEO-L412KB_v1.4.0) |
42+
| | [NUCLEO-L452RE](https://www.st.com/en/evaluation-tools/nucleo-l452re.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-L452RE/stm32-secure-patching-bootloader-README_NUCLEO-L452RE_v1.4.0) |
43+
| | [NUCLEO-L476RG](https://www.st.com/en/evaluation-tools/nucleo-l476rg.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-L476RG/stm32-secure-patching-bootloader-README_NUCLEO-L476RG_v1.4.0) |
44+
| | [NUCLEO-L496ZG](https://www.st.com/en/evaluation-tools/nucleo-l496zg.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-L496ZG/stm32-secure-patching-bootloader-README_NUCLEO-L496ZG_v1.4.0) |
45+
| | [DISCO-L476G](https://www.st.com/en/evaluation-tools/32l476gdiscovery.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-L476G/stm32-secure-patching-bootloader-README_DISCO-L476G_v1.4.0) |
46+
| | [DISCO-L496G](https://www.st.com/en/evaluation-tools/32l496gdiscovery.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-L496G/stm32-secure-patching-bootloader-README_DISCO-L496G_v1.4.0) |
47+
| STM32L4+ | [DISCO-L4R9I](https://www.st.com/en/evaluation-tools/32l4r9idiscovery.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-L4R9I/stm32-secure-patching-bootloader-README_DISCO-L4R9I_v1.4.0) | [FreeRTOS_LowPower IAP](https://github.com/firmwaremodules/STM32CubeL4/tree/master/Projects/32L4R9IDISCOVERY/Applications/FreeRTOS/FreeRTOS_LowPower) |
48+
| | [B-L4S5I-IOT01A](https://www.st.com/en/evaluation-tools/b-l4s5i-iot01a.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/B-L4S5I-IOT01A/stm32-secure-patching-bootloader-README_B-L4S5I-IOT01A_v1.4.0) |
49+
| STM32L5 | [DISCO-L562E](https://www.st.com/en/evaluation-tools/stm32l562e-dk.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-L562E/stm32-secure-patching-bootloader-README_DISCO-L562E_v1.4.0) |
50+
| STM32WL | [NUCLEO-WL55JC](https://www.st.com/en/evaluation-tools/nucleo-wl55jc.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-WL55JC/stm32-secure-patching-bootloader-README_NUCLEO-WL55JC_v1.4.0) |
51+
| | [LORA-E5-DEV](https://www.seeedstudio.com/LoRa-E5-Dev-Kit-p-4868.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/LORA-E5-DEV/stm32-secure-patching-bootloader-README_LORA-E5-DEV_v1.4.0) |
5152
| | [LORA-E5-MINI](https://www.seeedstudio.com/LoRa-E5-mini-STM32WLE5JC-p-4869) (use DEV libs) |
52-
| STM32F4 | [NUCLEO-F429ZI](https://www.st.com/en/evaluation-tools/nucleo-f429zi.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-F429ZI/stm32-secure-patching-bootloader-README_NUCLEO-F429ZI_v1.3.0) | [Web Server IAP Update](https://github.com/firmwaremodules/STM32CubeF4/tree/master/Projects/STM32F429ZI-Nucleo/Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS)
53-
| STM32F7 | [DISCO-F769I](https://www.st.com/en/evaluation-tools/32f769idiscovery.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-F769I/stm32-secure-patching-bootloader-README_NUCLEO-F429ZI_v1.3.0) |
53+
| STM32F4 | [NUCLEO-F429ZI](https://www.st.com/en/evaluation-tools/nucleo-f429zi.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-F429ZI/stm32-secure-patching-bootloader-README_NUCLEO-F429ZI_v1.4.0) | [Web Server IAP Update](https://github.com/firmwaremodules/STM32CubeF4/tree/master/Projects/STM32F429ZI-Nucleo/Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS)
54+
| | [DISCO-F469I](https://www.st.com/en/evaluation-tools/32f469idiscovery.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-F469I/stm32-secure-patching-bootloader-README_DISCO-F469I_v1.4.0) |
55+
| STM32F7 | [DISCO-F769I](https://www.st.com/en/evaluation-tools/32f769idiscovery.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-F769I/stm32-secure-patching-bootloader-README_DISCO-F769I_v1.4.0) |
56+
| STM32H7 | [DISCO-H745I](https://www.st.com/en/evaluation-tools/stm32h745i-disco.html) | [README](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-H745I/stm32-secure-patching-bootloader-README_DISCO-H745I_v1.4.0) |
5457

5558

5659
Please post an issue if you'd like a particular board supported.
@@ -63,8 +66,8 @@ These reference designs can be adapted to any board that the stm32-secure-patchi
6366

6467
| Reference Project | Reference Board | Technique |
6568
| --- | --- | --- |
66-
| [FreeRTOS_LowPower IAP](https://github.com/firmwaremodules/STM32CubeL4/tree/master/Projects/32L4R9IDISCOVERY/Applications/FreeRTOS/FreeRTOS_LowPower) | [DISCO-L4R9I](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-L4R9I/stm32-secure-patching-bootloader-README_DISCO-L4R9I_v1.3.0) | YMODEM/UART interrupt mode |
67-
| [Web Server IAP Update](https://github.com/firmwaremodules/STM32CubeF4/tree/master/Projects/STM32F429ZI-Nucleo/Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS) | [NUCLEO-F429ZI](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-F429ZI/stm32-secure-patching-bootloader-README_NUCLEO-F429ZI_v1.3.0) | Ethernet / TCPIP/ multipart forms file upload |
69+
| [FreeRTOS_LowPower IAP](https://github.com/firmwaremodules/STM32CubeL4/tree/master/Projects/32L4R9IDISCOVERY/Applications/FreeRTOS/FreeRTOS_LowPower) | [DISCO-L4R9I](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/DISCO-L4R9I/stm32-secure-patching-bootloader-README_DISCO-L4R9I_v1.4.0) | YMODEM/UART interrupt mode |
70+
| [Web Server IAP Update](https://github.com/firmwaremodules/STM32CubeF4/tree/master/Projects/STM32F429ZI-Nucleo/Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS) | [NUCLEO-F429ZI](https://github.com/firmwaremodules/stm32-secure-patching-bootloader/main/Libs/NUCLEO-F429ZI/stm32-secure-patching-bootloader-README_NUCLEO-F429ZI_v1.4.0) | Ethernet / TCPIP/ multipart forms file upload |
6871

6972

7073

@@ -112,6 +115,17 @@ automatically set RDP Level 2 and write protect the bootloader flash area at sta
112115

113116
### Release Notes
114117

118+
**v1.4.0 - Mar 2023**
119+
120+
* Add support for new platforms and boards: G0 (NUCLEO-G0B1RE) H7 (DISCO-H745I) WL (NUCLEO-WL55JC) F4 (DISCO-F469I) L4 (NUCLEO-L476RG)
121+
* Prints size of binaries detected in each slot in diagnostic output.
122+
* Bootloader disables cache before launching application on all boards that use cache (prevents faulting when application tries to re-enable already enabled cache in some cases).
123+
* Fixes YMODEM load button trigger wrong state for NULEO-L452RE.
124+
* Optimization: greatly speeds up patching updates (3x or more) on large binaries utilizing external flash.
125+
* Optimization: removes one redundant header verification in virgin device or two redundant header verifications in devices that have undergone at least one update cycle. Saves between 50 - 2000 ms per header verification of bootup time depending on MCU capability.
126+
* Ensures hardware CRC is powered up when needed during SE_PATCH_Data() API calls.
127+
* Adds make_keys_vXm.bat scripts to automatically generate machine.txt file (often overlooked otherwise).
128+
115129
**v1.3.0 - Nov 2022**
116130

117131
* Now works with applications built using STM32CubeIDE 1.9 and later including version 1.10.1.

0 commit comments

Comments
 (0)