CAN Firmware Compilation
Start Compiling
- A host computer with the
klipper
service installed is required Connect via SSH over the network - And the device is connected to the host computer
- Note: Please use a regular host computer, such as Raspberry Pi FLY. If it is a modified host computer (such as a WiFi stick, Redmi, etc.), due to too many issues, we cannot provide technical support
- FlyOS-Armbian system and general system notes
- FlyOS-FAST system notes
- Notes on
FlyOS-Armbian
system and general system- Ordinary host computer systems such as Raspberry Pi, FLY are viewed in this category
- Do not use the
ROOT
user for any operations on these host computers - Please use a normal user for operations
- To switch users, for
FlyOS-Armbian
system use thesu fly
command to switch to a normal user - For other systems, use the
su <your host computer username>
command to switch to a normal user
su <your host computer username>
- Notes on
FlyOS-FAST
system- The default username for
FAST system
isroot
, password ismellow
- Compiling firmware can only be done using the
root
user - And
FAST system
only hasROOT
user, you don't need to switch users!!!
- The default username for
::: 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
Enter
or spacebarSpace
is used to check the menu or enter a sub-menu. - The exit key
ESC
is used to return to the previous menu. - The
Q
key is used to exit the Klipper firmware configuration page. - When exiting the Klipper firmware configuration page and there is a prompt, press the
Y
key 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
-
Among them,
rm -rf ~/klipper/.config && rm -rf ~/klipper/out
is to delete previous compilation data and firmware,make menuconfig
is to compile the firmware, after execution, the following interface should appear: -
Select Enable extra low-level configuration options and press Enter
-
Enter the menu Micro-controller Architecture then select Raspberry Pi RP2040/RP235x and press Enter
-
Select Bootloader offset, select: 16KiB bootloader
-
Select Communication interface, select: CAN bus
- Select GPIO pins to set at micro-controller startup, enter: gpio17
- Press the
Q
key, Save configuration appears, then pressY
key - Now the configuration should be saved and return to the command line interface
- Enter the following command to start compiling, it takes some time
make -j4

-
If the following content is output, the compilation is successful
Linking out/klipper.elf
Creating bin file out/klipper.bin
Wiring
- Connect the tool board to UTOC or a mainboard with bridging firmware using an XT30 data cable before flashing the firmware. The following is a reference wiring diagram
- Please ensure that the resistance of CAN H and CAN L is around
60Ω
when powered off, if it is120Ω
, connect the120Ω
jumper, if it is around40Ω
, remove the jumper - After connecting the tool board to UTOR or a mainboard with USB bridge CAN using an XT30 data cable, there will be LED blinking on the mainboard.
- If there is no LED blinking, re-flash the katapult firmware: Flash katapult firmware
- If there is no LED blinking, proceed to the next step after flashing the katapult firmware
Search for Devices
- Now that you have successfully logged into the host computer, you can enter
lsusb
to search for devices. You may encounter one of the following situations:- If entering
lsusb
prompts that thels
command 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:606f
appears:
- If entering
1d50:606f
is the device you will use in this instance.- If multiple
1d50:606f
devices 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 onboardUTOC
and 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.
Search ID and Flash
- It's recommended not to search for IDs or flash firmware during printing
- The CAN firmware ID of the same mainboard or toolboard Katapult is exactly the same as the Klipper CAN firmware ID
- Please ensure that the host computer's CAN network has been configured
- The command to search for
CAN ID
can only be used if1d50:606f
appears after running lsusb - The CAN speed of the toolboard must match the host computer, otherwise the
ID
cannot be found or flashed
-
Run the following command to query the CANBus UUID:
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
Use this command to search for
CAN_ID
onfast
systemspython ~/klipper/scripts/canbus_query.py can0
-
After entering the command, several situations might occur depending on your machine, as follows (for reference only):
- First case: A mainboard with bridging firmware flashed, one ID appears and
Application: Klipper
is prompted - Second case: A mainboard with bridging firmware flashed, paired with a toolboard needing firmware flashing, two IDs appear
- Third case: Using
UTOC
paired with a toolboard needing flashing - Tip:
UTOC
will not display an ID - Fourth case: No ID is prompted, usually because it is occupied by Klipper, the CAN0 speed of the host computer is incorrect, or there is a wiring issue
- First case: A mainboard with bridging firmware flashed, one ID appears and
-
Under normal circumstances, if the toolboard that needs flashing is in CANBOOT mode,
Application: CanBoot
will be prompted and the corresponding firmware light will blink. At this time, you need to flash the Klipper firmware, otherwise it will not connect!!! -
Tip: If it is a Klipper firmware and you have already filled in the ID in the configuration, the ID will no longer be displayed and will be occupied by Klipper. You need to comment out the corresponding ID and completely power off and restart the mainboard.
-
- If the UUID cannot be found, please refer to the document below
- CAN Issues Collection
Firmware Flashing
-
Replace
241696050c56
in the command below with the UUID found using the query UUID command. Please note there is a space after-u
python3 ~/klipper/lib/canboot/flash_can.py -u 241696050c56
-
As shown in the figure below, if
CAN Flash Success
appears, the flashing was successful
Firmware Update
- If you need to update the firmware, simply re-run the flashing command after compiling the new firmware
- However, please ensure that the corresponding ID can be found or that Klipper is already connected
python3 ~/klipper/lib/canboot/flash_can.py -u <MCU ID>
Confirm Firmware is Running
- If the firmware starts normally, the LED will light up