-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CANbus bootloader #5
Comments
Is 64k flash too limited for an UDS bootloader over CAN? For example https://github.com/LittleBasdart/UdsBootloader |
@OxygenLiu First issue is the drivers are made for Stm32L4 registers. Second it would need to be well integrated, for example SysTick needs to be either not used by delay.c or it should share this resource nicely. This is valid for any resource that is shared and becomes a little more complicated when a bootloader does more things than just loading the new program. |
👍 Hopefully it will support OTA upgrade using A/B partitions. The current firmware is about 29k bytes, seems a bit bulky. Assuming the bootloader takes 20k, the remaining 44k shall accomendate 20k A and 20K B partitions. |
I looked into the size stuff using this useful tool. Here is a report from mbed-os-linker-report Remarks:
I guess the solution to save ROM, if necessary, will be using Edit: Extra 1kB can be saved by storing both parameters and CalData in the same Page (separated by some offset) since I made it much smaller than it used to be. |
There is certainly some unnecessary code in |
Two interesting implementations of CAN bootloader for STM32F103,
|
CANbus programming shall be enabled by magic packet/on a specific CAN message id and when motor is not off (essentially when
A4950_Enabled == false
)Implementations:
https://github.com/feaser/openblt - has built in XCP, supports CAN dongles on the host, uses ST HAL
https://github.com/Arksine/CanBoot
https://github.com/UberLambda/CANnuccia
https://github.com/madprogrammer/stm32-can-bootloader
https://stackoverflow.com/questions/61243660/stm32103-custom-bootloader-jump-to-main-firmware-issue
Todo:
/firmware
.platformio run
) for the firmware and CAN uploading using pandaThe text was updated successfully, but these errors were encountered: