Add support for OpenBLT Bootloader.#7204
Add support for OpenBLT Bootloader.#7204matt-alencar wants to merge 2 commits intoKlipper3d:masterfrom
Conversation
|
Silly question, why use the OpenBLT bootloader if there is Katapult already available, for, I think, all of the supported platforms? Cheers, |
Thanks for asking :) |
…tor-table-cs-offset helper, that prints BOOT_FLASH_VECTOR_TABLE_CS_OFFSET value for OpenBLT bootloader.
|
Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html There are some steps that you can take now:
Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available. Best regards, PS: I'm just an automated script, not a human being. |
Support for OpenBLT Bootloader by adding the checksum pattern right after the interrupt vector table, this is required by the bootloader to ensure that a valid firmware is present on the flash memory and be able to jump to the app code.
On the bootloader's code you will have to adjust the BOOT_FLASH_VECTOR_TABLE_CS_OFFSET to match your specific build, use the following command to check where your isr vector table finishes, as it's build dynamically by a script.
arm-none-eabi-objdump -s -j .text out/klipper.elf | grep ee11aa5580070e0 ee11aa55 4ff0000c 0849094a 8b6810b4 ...UO....I.J.h..
-> 0x08007000 is the app start address (28KB bootloader size, 0x7000 offset)
-> 0x080070e0 is where the checksum are located, right after ISR vector table, so the BOOT_FLASH_VECTOR_TABLE_CS_OFFSET is 0xE0 in this case.
Convert the compiled Klipper firmware to .srec format using:
arm-none-eabi-objcopy -I binary -O srec --change-addresses 0x08007000 out/klipper.bin out/firmware.srecFor the app firmware be accepted by the bootloader, it must be in .srec format, then you can put it to a SD card or upload using serial port, ModBus RTU, CAN or USB HID as the OpenBLT has support for all of this protocols.
Note that the "--change-addresses" parameter must match your bootloader size, for 28KB the app start address are 0x08007000.