Configuring and installing CanBoot bootloader for USB
Overview
Katapult allows you to update your mainboard via USB, so no rebooting and rewiring is necessary. We recommend using Katapult for this additional convenience.
Install Katapult package
-
ssh into your klipper host console
-
Clone the Katapult firmware to your Klipper Host
cd ~/ git clone https://github.com/Arksine/katapult
-
From your Fluidd or Mainsail web UI Edit Moonraker.conf and add the following at the bottom to allow Moonraker to manage updates to Katapult.
[update_manager Katapult] type: git_repo path: ~/katapult origin: https://github.com/Arksine/katapult.git is_system_service: False
Compile Katapult firmware
-
cd to the Katapult directory
cd ~/katapult
-
Run make clean
make clean KCONFIG_CONFIG=config.d5
-
Open menuconfig
make menuconfig KCONFIG_CONFIG=config.d5
- Set the following settings
- Micro-controller Architecture (STMicroelectronics STM32)
- Processor model (STM32F072)
- Build Katapult deployment application (8KiB bootloader)
- Clock Reference (8 MHz crystal)
- Communication interface (USB (on PA11/PA12))
- Application start offset (8KiB offset)
- () GPIO pins to set on bootloader entry
- [*] Support bootloader entry on rapid double clip of reset button
- [ ] Enable bootloader entry on button (or gpio) state
-
[ ] Enable Status LED
-
Quit and save the configuration
-
Run the make command to compile the firmware
make KCONFIG_CONFIG=config.d5 -j4
- You should now have a katapult.bin file at ~/katapult/out/
Enter DFU Mode
Flash Katapult to the Fly-D5 MCU
make sure dfu-util is installed.
sudo apt install dfu-util -y
run lsusb to verify the board has been detected in DFU mode.
lsusb
Flash katapult
sudo make KCONFIG_CONFIG=config.d5 flash FLASH_DEVICE=0483:df11
This will flash the Katapult bootloader image and restart the Fly-D5.
run lsusb to verify the MCU has been discovered as a USB device
Continue to the Klipper for USB configuration section