Bootloaders are tricky. Unfortunately, there is still no comprehensive public demo of how to use Kocherga. One who is experienced in low-level programming should be able to get it going but otherwise, I expect it might be overwhelming. The following archive contains a greatly stripped-down application example I just made from a real proprietary application that relies on Kocherga. It won’t build because some of the components are missing, but I trust it should be still useful as an example. It has the components that are critical for integration with the bootloader: the linker script, the build script, the script that generates the image CRC (which is verified by the bootloader), and also it shows how to command the bootloader to begin the update procedure.
@kent.martin I’m having trouble getting a single can interface using CAN2 working (as opposed to CAN1 which works out of the box) on an STM32F415.
Would you mind sharing your modifications to the STM32 port?
Thanks,
Cameron
I’m rather new to the ecosystem and would like to use the bootloader for the UAVCAN protocol. Going through the python code, my impression is that the firmware file is the raw binary that will be padded and then CRC checked. The binary file then will be directly transferred to the flash and act as the app. So there isn’t any encryption of the firmware file? If so, is there any other option out there that work with UAVCAN protocol but encrypts the firmware? STM has an expansion package that does encrypt the firmware and has many security features built into it but does not support UAVCAN protocol. I rather not going down that road to develop on top of their code as I use them as an example for bad coding practice which is hard to read and expand.
What you are describing is outside of the scope of UAVCAN. If I understood your intent correctly, you can implement secure boot while supporting the current UAVCAN bootloader protocol.
Yes, I’m aware that secure bootloader is a totally independent thing from the UAVCAN. I was wondering if you know any secure bootloader that has implemented it which I guess the answer is no. You guys have made good libraries though, so I should just get libcanard to work in a secure bootloader.