MarsRoverFirmware
MarsRoverFirmware copied to clipboard
Add functionality to do OTA firmware updates
Add ability to do updates over CanBus (may keep it somewhat abstract so it'd work over other interfaces?). this would involve customizing the bootloader and embedding some sort of board id into the flash of each board. This would allow us to iterate code faster (no need to fumble with flashing boards and stuff).
Honestly this is like super overkill, but i'm gonna do it as a pet side project. probs will make just a seperate script or program to execute the update based off git hash or smth.
No bootloader mods actually have to be done. https://www.st.com/resource/en/application_note/CD00167594-.pdf
can bootloader is already loaded: https://www.st.com/resource/en/application_note/cd00264321-can-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf
https://www.youtube.com/watch?v=cvKC-4tCRgw
Yes bootloader is present, we just need to be able to pull the boot0 pin in the right direction (if not already). Should tell EE to add a jumper for this if we need it to be configurable. @lwbantoto
Of note for the can bootloader:
Once initialized the CAN2 configuration is:
Baudrate 125 kbps, 11-bit identifier.
Note: CAN1 is clocked during CAN2
bootloader execution because in CAN1
manages the communication between
CAN2 and SRAM
It only works on CAN2.
@jetkov I dont think we want a jumper. The point of this issue would be to update firmware without needing to touch the boards at all(assume bad accessibility).
I think we can have smth to jump to the bootloader from app. Havent watched it yet, but pretty sure that video linked above has an example of how to do this nicely.