CAN Bootloader
Table of Contents
Introduction
The purpose of this project is to implement OTA firmware updates for our CAN peripheral boards. The OTA firmware update would be driven by the DroneCAN bus master, such as ArduPilot. This will allow us to continue to update our boards' firmware even after harnessing and physical assembly is complete without having to remove the board for programming.
DroneCAN Bootloader
The OTA firmware update will be done through a uavcan.protocol.file.BeginFirmwareUpdate
message (see 7. List of standard data types - DroneCAN ). We can use uavcan.protocol.file.GetInfo
to compare current firmware version to the one available on the ArduPilot file server and decide if a firmware update is necessary.
Scope
Must have: |
|
---|---|
Nice to have: |
|
Not in scope: |
Bus master (flight controller) receives image from missionplanner
Bus master sends CAN message to peripherals, will trigger an interrupt
Peripheral will jump to bootloader
Bus master then sends image and to peripherals in bunches of bytes
Bootloader has 1 slot for staging, 1 slot for the application
Bootloader will write the bytes into the staging slot as it receives bytes
Once all bytes are received, copy all bytes into the application slot
Application will run again with updated code
Resources
General Overview of Bootloaders https://docs.google.com/presentation/d/1WROrBgtScqSAwv7jyZRWJu2i6OKUqjP9z1lWTtEoaTY/edit?slide=id.g3148c1739df_0_5#slide=id.g3148c1739df_0_5