- Hossam Elwahsh (1055) -
- Ahmed Hisham (1023) -
- Ahmed Sakr (755) -
- Nada Salloum (1139) -
- Salma Faragalla (199) -
- Norhan Mohamed (764) -
This project provides a simple framework for performing firmware updates for STM32F103C8T6 microcontroller over the CAN bus.
A custom bootloader is responsible for switching between the 2 firmware versions using 2 buttons.
Update the initial firmware running on the STM32 that toggles the blue LED every 2 sec.
to a new firmware that toggles the blue LED every 1 sec.
ECU | APP | Build File | Description |
---|---|---|---|
1 | Custom Bootloader | hex | Handles switching between updates, Supports override mode by holding SW (1) to force boot into "main application" skipping loading updated app which is the default behavior if found. |
1 | Main Application | hex | Main firmware application handles CAN communication, checking for updates, OLED display step by step, Toggles an LED every 2 seconds in the background. |
2 | Update Server | hex | Runs on a separate ECU, Communicates over CAN, serves new updates to requesting ECUs |
- | Blink Update | hex | Updated application that blinks LED every 1 second |
APP | Address Range | Flash Size |
---|---|---|
Custom Bootloader | 0x0800 0000 - 0x0800 1800 | 6K |
Updated Application | 0x0800 1C00 - 0x0800 3800 | 7K |
Main Application | 0x0800 4C00 - 0x0800 AC00 | 24K |
- Convert updated firmware Bin file e.g. LED_Blink.bin to an array using this tool: https://notisrac.github.io/FileToCArray/
- Add Padding of
0xFF
if needed to keeparray_size % 8 = 0
to facilitate flashing - Make sure your data array won't exceed 7000 bytes [per design - updated will be refused]
- Update app2_data.h
APP_UPDATE_SIZE
with the new array size - Update app2_data.c with the new array contents
- Re-compile and flash
- Bootloader automatically checks if there's a new version flashed, if yes it will boot to the new updated version directly.
- Bootloader behavior can be overridden by holding (SW-1) or (SW-2) during boot to force entry of Application 1 (main app) or Application 2 (update) respectively.