USB Bridge CAN Firmware Flashing
Start Compilation
- A host computer with the
klipperservice installed Connect via SSH over network - And the device should be properly connected to the host computer
- Note: Please use a standard host computer, such as Raspberry Pi, FLY board, etc. If it is a modified host computer (e.g., WiFi dongle, Redmi devices), we cannot provide technical support due to numerous issues with such hosts
- Firmware Compilation Guide for Standard Host
- FAST System Firmware Compilation Guide
- Applies to standard host computers running systems like Raspberry Pi, FLY board, etc.
- Do not use the
ROOTuser for any operations on such hosts - Please perform operations using a regular user account
- To switch users, for the
FlyOS-Armbiansystem, please use the commandsu flyto switch to the regular user - For other systems, use the command
su <your host username>to switch to the regular user
su <your host username>
- Notes for the
FlyOS-FASTsystem- The default username for the
FAST systemisroot, and the password ismellow - Firmware compilation must be performed using the
rootuser - The
FAST systemonly has theROOTuser—you do not need to switch users!!!
- The default username for the
::: tip
- Please ensure that the host machine can connect to the network normally.
- Before compiling the firmware, use SSH to log in to the host machine via the network.
- Do not use a serial port tool to log in to the host machine.
:::
Klipper Firmware Compilation and Configuration Page Operation Instructions
::: tip
Please make sure that the keyboard input method is in half-width mode, i.e., English mode.
:::
- The key
↑(up arrow) and↓(down arrow) on the keyboard are used to move the cursor up and down to select menu items. - The confirm key
Enteror spacebarSpaceis used to check the menu or enter a sub-menu. - The exit key
ESCis used to return to the previous menu. - The
Qkey is used to exit the Klipper firmware configuration page. - When exiting the Klipper firmware configuration page and there is a prompt, press the
Ykey to save the configuration file.
::: warning
If there are fewer options in the configuration page, please first check [ ] Enable extra low-level configuration options to display some hidden options.
:::
Below is the introduction on how to compile the firmware:
-
After connecting to SSH, enter the following command and press Enter:
cd ~/klipper && rm -rf ~/klipper/.config && rm -rf ~/klipper/out && make menuconfig -
Where
rm -rf ~/klipper/.config && rm -rf ~/klipper/outis to delete previous compilation data and firmware,make menuconfigis to compile the firmware, after execution, the following interface should appearLoading... -
Select Enable extra low-level configuration options and press Enter
Loading... -
Enter the menu Micro-controller Architecture then select STMicroelectronics STM32 and press Enter
Loading... -
Enter the menu Processor model, select STM32H723 and press Enter
Loading... -
Select Bootloader offset, select: 128KiB bootloader
Loading... -
Select Clock Reference (8 MHz crystal), select: 25 MHz crystal
Loading... -
Select Communication interface, select: USB to CAN bus bridge (USB on PA11/PA12)
Loading...
- Press the
Qkey, when Save configuration appears, then press theYkey.Loading... - The configuration should now be saved, and you should have exited to the command line interface.
- Enter the command below to start compilation. It will take some time.
make -j4
- Compilation is successful if the following content is output at the end.
- Due to Klipper version differences, as long as
out/klipper.binappears, it indicates success.Linking out/klipper.elf
Creating bin file out/klipper.bin
Confirm Entry into Flashing Mode
- After connecting the mainboard to the host computer using a Type-C data cable, double-click the reset button. At this point, an LED on the mainboard should flash.
- If the LED does not flash, please re-flash the katapult firmware: Flash katapult firmware
- If the LED does not flash, after flashing the katapult firmware, proceed to the next step.
Search for Devices
- Now that you have successfully logged into the host computer, you can enter
lsusbto search for devices. You may encounter one of the following situations:- If entering
lsusbprompts that thelscommand is not found, you can install the required utility by entering the following command:sudo apt-get install usbutils - If there is no response after entering
lsusb, this is a system issue and cannot be resolved here. You will need to change the system or use a known working system. - If information like that shown in the image below appears, please note that this is only a reference. You only need to confirm that
1d50:606fappears:Loading...
- If entering
1d50:606fis the device you will use in this instance.- If multiple
1d50:606fdevices appear, one must be excluded, as multiple entries may affect subsequent flashing and firmware connection. For example, withFLY MINI PAD, it is recommended to use the onboardUTOCand avoid using other CAN bridges. - If the device does not appear, please check whether the data cable is properly connected and whether the correct firmware has been flashed.
You can proceed to search for the CAN ID only when 1d50:606f appears.
Flash the Firmware
- Internet connection is required when installing the flashing plugin. Please ensure your host computer is properly connected to the internet.
- If already installed, no need to install again.
Start Flashing
-
Non-FLY host computers must execute the following code to install the firmware flashing dependency package! Otherwise, the firmware cannot be flashed!
- Default Repository
- Domestic Repository
cd && git clone https://github.com/Arksine/katapult.gitcd && git clone https://gitee.com/MrCakeFuck/katapult.gitLoading...
-
Use the command below to search for your device ID. It should show an ID as shown in the following image (Note: The ID shown in the image is for reference only; each mainboard has a different ID).
ls /dev/serial/by-id/*Loading... -
Use the code below to flash the firmware. Ensure the firmware has been compiled. Replace
<Your Mainboard ID>with the ID found in the previous step.
- Fly-Armbian and General Host Flashing Method
- Fly-FAST Flashing Method
~/klippy-env/bin/python ~/katapult/scripts/flashtool.py -d /dev/serial/by-id/<Your Mainboard ID>
python ~/katapult/scripts/flashtool.py -d /dev/serial/by-id/<Your Mainboard ID>
-
Reference below:
Loading... -
Flashing completion reference:
Loading...
Firmware Update
- USB Firmware Update
- Bridged CAN Firmware Update
-
Use the command below to search for your mainboard ID. It should show an ID as shown in the following image (Note: The ID shown in the image is for reference only; each mainboard has a different ID).
ls /dev/serial/by-id/*
In the image below, /dev/serial/by-id/usb-katapult_rp2040_E662549553642032-if00 is the mainboard ID.
-
To update the USB firmware, after compiling the latest firmware, enter the command below to update. Replace
<Your Mainboard ID>with the ID found in the previous step.cd ~/klipper/ && make flash FLASH_DEVICE=<Your Mainboard ID>Loading...
- To update the USB-bridged CAN firmware, after compiling the latest firmware, enter the command below to reset into Katapult. (As shown in the image below, the ID in the image is for reference only; please use the ID from your configuration file.)
<Your Mainboard ID>is the CANBUS UUID of the mainboard in your printer.cfg configuration file.
- Fly-Armbian and General Host Reset to Flashing Method
- Fly-FAST Reset to Flashing Method
- Replace
<Your Mainboard ID>with the ID found in the previous step.~/klippy-env/bin/python3 ~/katapult/scripts/flashtool.py -i can0 -r -u <Your Mainboard ID>
- Replace
<Your Mainboard ID>with the ID found in the previous step.python3 ~/katapult/scripts/flashtool.py -i can0 -r -u <Your Mainboard ID>
- In the image below,
f95cee90e1f9is the mainboard's CANBUS UUID.
-
After resetting into Katapult, use the command below to search for your mainboard ID. It should show an ID as shown in the following image (Note: The ID shown in the image is for reference only; each mainboard has a different ID).
ls /dev/serial/by-id/*
In the image below, /dev/serial/by-id/usb-Klipper_stm32f072xb_43002C000951324757373520-if00 is the mainboard ID.
-
Ensure the new firmware is compiled before executing the flashing. Replace
<Your Mainboard ID>with the ID found in the previous step.cd ~/klipper/ && make flash FLASH_DEVICE=<Your Mainboard ID>Loading...
Solution for Flashing Wrong Firmware
- Power off the mainboard, then power it on again and quickly double-click the reset button to re-enter flashing mode.
- Or re-flash the katapult firmware Flash katapult firmware