- Boot Manager for controlling jumping to Bootloader or App/Bootloader Updater based on shared flags and some integrity checks
- BootLoader for communicating with BCM to get App with both capabilities ( Normal Update / Delta Update )
- BootLoader Updater ( Silent / Communicative ) for updating BootLoader
- Application
- Boot manager Maximum Size must be <= 12.5% of the total flash size
- BootLoader Maximum Size must be <= 18.75% of the total flash size
- Application or Bootloader Updater Maximum Size must be <= 68.75% of the total flash size (they share the same memory area)
The goal is to reduce the number of bytes that are being delivered to:
- Reduce the download time – The new software needs to quickly get to the car’s gateway (e.g., head-unit) in order to start the update process
- Decrease the amount of needed memory – After the new version is delivered, there needs to be room to store it before the update is started
- Decrease the transport time between the gateway and the target ECU – In case of ECU update, the new version needs to go through the CAN/Ethernet bus, which is limited in bandwidth
- Reduce the update time – The update time depends in some cases on the amount of changes that exist in the new version
The used algorithm is JojoDiff, you can find more info about it here
To generate patch files you'll need to build JojoDiff or JDiff.js.
-
Install a recent version of Node.js.
-
Install JDiff.js:
>> npm install jdiff-js -g
-
Generate a patch file via:
>> jdiff old_SW.bin new_SW.bin old_to_new_SW.patch
- STM32 CubeIDE 1.11.0
- STM32 St-Link Utility
- Ubuntu WSL
- Python 3.10.8
- Cppcheck
- Jenkins
- STM32F439zi (Nucleo-144)
- USB To TTL Module
- Micro SD Card Adapter Module
- Micro SDHC 8 GB
- Tx of Module connected to RX of Microcontroller( pin PC11 )
- Rx of Module connected to TX of Microcontroller( pin PA0 )
- Common Ground
- ( pin PA5 ) : SPI SCK
- ( pin PA6 ) : SPI MISO
- ( pin PB5 ) : SPI MOSI
- ( pin PC0 ) : SPI CS
- VCC
- Common Ground
- Flash the boot manager manually (just for first time) using STM32 St-Link Utility
- Flash bootloader manually (just for first time) using STM32 St-Link Utility
- Run BCM python Script by
>> cd BCM
>> python.exe BCM.py
- Use Serial Port that used by "USB To TTL Module"
- Enjoy Communicating with Bootloader / APP / Bootloader Updater
- Bootloader Design for Microcontrollers in Embedded Systems Link
- Tutorial: An SD card over SPI using STM32CubeIDE and FatFS Link
- JojoDiff Alternative Patch library Link
- Bootloader
- BOOT Manager
- Normal update
- Silent Bootloader Updater
- Communicative Bootloader Updater
- Delta patching update for Application
- CI
- SECURE BOOT
- Doxygen Documentation