|
|
||
|---|---|---|
| Automatic MCU script update | ||
| files-used | ||
| firmware-backups | ||
| images | ||
| pico-thermistor | ||
| SV08 TMC 2209 accurate technical settings | ||
| usbmount | ||
| LICENSE | ||
| README.md | ||
Sovol-SV08-Mainline
USE THE MAIN REPO FOR STABILITY >>> Rappetor/Sovol-SV08-Mainline
Getting the Sovol SV08 onto mainline Klipper
This repository will describe installing mainline/regular klipper (via KIAUH) on your Sovol SV08 with the BTT CB1 image.
Run it from either eMMC or SD card, you choose.
TL;DR: make a backup of klipper config, remove the eMMC from the printer, write CB1 image to eMMC, change BoardEnv.txt and system.cfg, put the eMMC back in the printer, install KIAUH; klipper, moonraker, and mainsail (and optional extras), create firmware(s), flash the tool head MCU and board MCU. DONE!
READ ME FIRST!
Video Guides can be out of date. Please always refer to this repo as the main source for up to date information.
WE ARE NOT RESPONSIBLE FOR DAMAGE TO YOUR PRINTER.
That being said, all steps have been thoroughly tested by multiple people in the community. Please follow the steps exactly and carefully and you will have a good working printer at the end. If you get stuck at some point or have any questions please create an issue or find support on the Sovol (official and unofficial) Discord.
This guide uses color codes to showcase important info.
Caution
If you see text inside a red box, you NEED to read what is in the box.
Important
If you see text inside the purple box, it's an important piece of information.
Note
If you see text inside a blue box, this info is typically a helpful tip or a useful note.
Ok, now you can continue.
WORK IN PROGRESS
Note
This is a work in progress, and some work needs to be done. You are the guinea pig ;)
Found something that doesn't work (properly), please share and contribute!
INDEX
- Prerequisites
- STEP 1 - Removing The eMMC From The Printer
- STEP 2 - Flashing Media
- STEP 3 - Changes To The BOARDENV.TXT & Setup WI-FI
- STEP 4 - Install Mainline Klipper
- STEP 5 - Configure Printer/Klipper & Addons
- STEP 6 - Stock Firmware Backup
- STEP 7 - Flash Katapult Bootloader
- STEP 8 - Flash Klipper Firmware On MCUs
- Big Thanks & Contribute
- Disclaimer
PREREQUISITES
- First, create a backup of all the config files on your original Sovol SV08. You can do this in the web/mainsail interface -> Machine -> Select all files/folders -> Download.
- You WILL need the printer.cfg later in this process (for the /dev/serial/by-id/usb-Klipperstm32f103xe serials).
- You need either a 'Makerbase MKS EMMC-ADAPTER V2 USB 3.0' USB adapter or 'Makerbase MKS MICROSD TO EMMC ADAPTER' to be able to read/write the eMMC. (Do note it's also possible without an eMMC adapter, but this involves writing the image to the SD card and then writing from the SD card to the eMMC, see 'method 2'. But you need to know how to clear the eMMC partitions from ssh/Linux).
- It is recommended to get yourself a separate eMMC module (MKS eMMC Module) on which you install the new OS Image and mainline klipper. This way you always have a backup (eMMC) of a stock/working printer.
- If you go for the 'method 2' you need a big enough MicroSD card, it's also possible to run everything from the SD card and not use an eMMC.
- You will need an ST-Link V2 (Mini) with the STM32CubeProgrammer software installed to be able to update/flash the MCU firmware.
- The files used for this guide can now be found together in the GitHub folder
/files-used/HERE - To edit the different files during this guide please use a text editor like Notepad++ (or use
nanofrom ssh). This way we can make sure the files stay in a proper format with proper (Linux style) line endings and work as intended. When using the default Windows Notepad this is not always the case!
EMMC Sellers
Note
Depending on which model you purchase you may also need a MicroSD card reader, follow the guide but when we mention the USB adapter you will need to use your MicroSD card reader along with the 'MICROSD TO EMMC ADAPTER'
STEP 1 - REMOVING THE eMMC FROM THE PRINTER
Caution
POWER OFF AND UNPLUG THE PRINTER FROM THE OUTLET.
-
Put the printer on its back, so you have access to the underside of the printer.
-
Remove the metal plate by removing the 6 screws.
-
You can now see the eMMC module on the board, remove the 2 screws that are holding it in, and carefully remove the eMMC module.
- Take note of the direction of the eMMC module (hint; you can also see an arrow on the board which way the module goes)
STEP 2 - FLASHING MEDIA
Caution
DO NOT USE V3.0.0 OR HIGHER. PLEASE USE V2.3.4
WE ARE STILL TESTING V3.0.0..
First, download the BIGTREETECH CB1 Linux image (the original Sovol SV08 image was also based on this): https://github.com/bigtreetech/CB1
Note
Regardless of the medium (SD card or eMMC) or the size the BIGTREETECH CB1 Linux image will expand the size of the image to the full size of the card being used.
Here we can use 3 methods:
Method 1: Write the CB1 image directly to the eMMC and use it that way
Method 2: Write the CB1 image to an SD card and use that to get the CB1 image on the eMMC.
Method 3: Choose to run everything from the SD card and stop at Method 2.2
Tip
Some people get an error while booting, or it doesn't want to boot at all, after writing the image with Balena Etcher. Some have had success writing the image with the
Raspberry Pi Imagerinstead.
METHOD 1: WRITE IMAGE DIRECTLY TO eMMC
- Download the MINIMAL BIGTREETECH image. Careful, there's also a full image that has an unknown version of Klipper already installed. Go to: https://github.com/bigtreetech/CB1/releases/tag/V2.3.4
- Used in this example: CB1_Debian11_minimal_kernel5.16_20240319.img.xz
- Put the eMMC module in the USB adapter (again, mind the direction of the module, there is an arrow on the adapter) and put the USB adapter in your computer.
- You can use this moment to back-up
/home/sovol/printer_data/config/for later. (For example theprinter.cfgfor the/dev/serial/by-id/usb-Klipper_stm32f103xeserials, do you have a serial like/dev/ttyACM1here no worries, we will find the full serial in Step 8). - Use BalenaEtcher to write the image to the eMMC
- Used in this example: balenaEtcher-win32-x64-1.19.21.zip (portable, so doesn't need an installer)
- Open Balena Etcher
-> Choose "Flash from file", browse and choose the downloaded CB1 image
-> Select the eMMC drive (e.g. Generic USB STORAGE DEVICE USB device)
-> Flash! (this will erase everything on the eMMC!)
- After the flash is complete you can close BalenaEtcher. If everything is alright you now see a FAT drive called 'BOOT' (if not, eject the USB adapter and put it back in)
You can now continue to STEP 3
METHOD 2: WRITE IMAGE TO SD -> eMMC
-
Write the image to the eMMC chip
- Used in this example: CB1_Debian11_minimal_kernel5.16_20240319.img.xz
-
Use BalenaEtcher to write the image to the SD card
- Used in this example: balenaEtcher-win32-x64-1.19.21.zip (portable, so doesn't need an installer)
- Open Balena Etcher
-> Choose "Flash from file", browse and choose the downloaded CB1 image
-> Select the SD card
-> Flash! (this will erase everything on the SD card!)
Note
Sidenote here: you could, if you choose here, run the printer from the SD card and skip the whole eMMC. Just so you know ;-)
-
Put the eMMC module in the USB adapter (again, mind the direction of the module, there is an arrow on the adapter) and put the USB adapter in your computer.
-
You can use this moment to back-up
/home/sovol/printer_data/config/for later. (For example theprinter.cfgfor the/dev/serial/by-id/usb-Klipper_stm32f103xeserials, do you have a serial like/dev/ttyACM1here no worries, we will find the full serial in Step 8) -
We need to clear all the partitions from the eMMC (this will erase everything on the eMMC!) :
- In Windows open the command prompt (Win-R -> cmd) and run
diskpart(be careful with diskpart, we don't want to erase the wrong disk here!) - In diskpart do
list diskand see what disk is your eMMC - In diskpart run
select disk <nr>where is the number of your eMMC. Please make sure this is the correct disk before you continue! - In diskpart run
cleanand it will erase everything/all partitions from the eMMC disk. - In diskpart run
exitto exit
- In Windows open the command prompt (Win-R -> cmd) and run
Please continue to STEP 3 and then come back here!
- If everything is ok you should have booted from the SD card, and it's time to copy all the contents to the eMMC and make it bootable.
- First, check if the eMMC is recognized and available:
- Run the command
fdisk -land you should see some storage devices including the eMMC (e.g. /dev/mmcblk1 for the SD card and /dev/mmcblk2 for the eMMC).
- Run the command
- Run the command
sudo nand-sata-install:- Choose the option 'Boot from eMMC - system on eMMC'.
- It will now create and format a partition (ext4) on the eMMC, and it will copy all its contents from the SD card to the eMMC.
- When it's done power off the SV08, remove the SD card, and boot from the eMMC. If everything has gone correctly you should now boot from the eMMC and can continue with STEP 4.
- First, check if the eMMC is recognized and available:
STEP 3 - CHANGES TO THE BOARDENV.TXT & SETUP WI-FI
To make the CB1 image setup correctly we need to copy a file and make a few changes to the BoardEnv.txt. Also, we need to set up Wi-Fi credentials (if not connected via ethernet) in the system.cfg
- Please copy the
sun50i-h616-sovol-emmc.dtbfile from the/files-used/dtb-files/GitHub folder HERE to your 'BOOT' drive/dtb/allwinner/folder. - Go to the 'BOOT' drive and make a BACKUP of 'BoardEnv.txt' on your hard disk just in case.
- Open 'BoardEnv.txt' in your favourite text editor.
- Replace the content ABOVE the
#--------#line (we KEEP what is under there) with the following items (see picture below, green = copy/pasted, red = don't touch and keep as it is):
It will now look something like this:bootlogo=false overlay_prefix=sun50i-h616 fdtfile=sun50i-h616-sovol-emmc console=display overlays=uart3 overlays=ws2812 overlays=spidev1_1

Note
NOTE 1: by setting bootlogo=false you get the Linux boot messages on the HDMI display, if you set bootlogo=true you only see them when connecting a keyboard and pressing a key.
NOTE 2:fdtfile=sun50i-h616-sovol-emmcsupports both eMMC and SD cards but will, obviously, only boot from one (according to the BTT CB1 docs the SD card has priority over eMMC but there have been reports of it being the other way around; if it boots from eMMC and not the SD card please check note 3 below or make sure the eMMC is empty or non-bootable or just remove it from the printer).
NOTE 3: When usingfdtfile=sun50i-h616-sovol-emmcwith an SD card it seems to always boot from the SD card but (seemingly randomly) either use the data partition from the eMMC or the SD card. You can check this by looking atlsblkand see if both/bootand/are used from the SD card or not. Otherwise poweroff and restart and check again. You can also usefdtfile=sun50i-h616-biqu-sdto force the use of the SD card, but you will lose eMMC support.
- Save your changed BoardEnv.txt!
- Change the Wi-Fi credentials in the 'system.cfg'
Note
If you have the special character
$in you wifi password, it is recommended that you escape the character (with a\in front). The bash process of reading the system.cfg reads the$and converts it. For example, a WIFI_PASSWD of1$234should be saved in the system.cfg as1\$234.
- Optional: uncomment the hostname and set the hostname to e.g. "SV08"
- Save changes to the system.cfg
Important
if you are using an HDMI screen you will need to set the screen rotation to "inverted"
- Eject the USB adapter from your computer then put the eMMC (and SD card in case of method 2) back into the printer and boot it, then:
- SSH into the printer (find the IP address on your router or use the configured hostname), username/password: biqu/biqu
- If everything is ok your printer will boot nicely, you can SSH into the printer, and you are done with this step and ready to install mainline Klipper. You can also continue Method 2, point 5, and finalize writing the system to eMMC!
Note
The 'system booting..' message on the LCD is just a splashscreen/image, not an actual status the system is still booting. Only when the LCD screen is properly initialized by Klipper this message/image will go away. But since we just put a fresh image without Klipper on there, let alone the LCD config, this will never happen and the screen keeps showing it's booting. Check your router to see if an ip-address is assigned to the printer or use an hdmi screen to check the output and see if it has indeed booted.
STEP 4 - INSTALL MAINLINE KLIPPER
Time for the fun stuff! Now we shall install KIAUH, Klipper, Moonraker, etc. Please SSH (biqu/biqu) into your printer and then do the steps below.
Please note this needs a stable connection since it will be downloading everything.
Important
Since the CB1 image is already quite old we need to change the APT (Advanced Package Tool) sources.list to allow for the latest updates, please do:
sudo nano /etc/apt/sources.listReplace the contents with the following:
deb http://archive.debian.org/debian bullseye-backports main contrib non-free #deb http://deb.debian.org/debian bullseye main contrib non-free #deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free deb http://deb.debian.org/debian bullseye main contrib non-free #deb-src http://deb.debian.org/debian bullseye main contrib non-free deb http://deb.debian.org/debian bullseye-updates main contrib non-free #deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free deb http://archive.debian.org/debian bullseye-backports main contrib non-free #deb http://deb.debian.org/debian bullseye-backports main contrib non-free #deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free deb http://deb.debian.org/debian-security bullseye-security main contrib non-free #deb-src http://deb.debian.org/debian-security bullseye-security main contrib non-freeCTRL-X (
Yes, <enter>) to save. Now continue with the steps below.
-
First, we will update the OS:
sudo apt update && sudo apt upgrade -
Then install git (which might already be installed) and KIAUH with the following commands:
sudo apt-get update && sudo apt-get install git -ycd ~ && git clone https://github.com/dw-0/kiauh.git -
Start KIAUH with the following command :
./kiauh/kiauh.sh -
Install Klipper, Moonraker, Mainsail, and Crowsnest (in this order, also check tip below) via KIAUH.
- So run KIAUH and choose: option '1) [Install]' and install those items (using default options, download recommended macros; Yes).
- Crowsnest install asks to reboot the printer, please do so now (unless you have an HDMI screen and want to use KlipperScreen, you can install that first too before rebooting).
Important
At the time of 2025-04-28 there appears to be a dependency error when installing Klipper. Does your Klipper installation fail with a
[ERROR] Error installing Python requirements: Installing Python requirements failed! [ERROR] Klipper installation failed!please follow the next steps as a workaround and continue like normal:
- Install Klipper like normal with KIAUH and let it finish with the above error.
- Quit KIAUH and run the following commands:
rm -rf ~/.cache ~/klippy-env/bin/pip3 install pyserial aenum wrapt pycparser markupsafe greenlet python-can Jinja2 cffi
- Then (re)install Klipper with KIAUH; when asked to clone the repository and overwrite choose Yes, when asked to
Virtualenv already exists. Re-create?choose No. It should now install without errors..- After this when installing Moonraker and you get a DEPRECATED error and incomplete Moonraker install; just re-install it again with KIAUH (overwrite everything) and it should succeed the second time.
-
Install Numpy (needed for input shaping) (OR new! With KIAUH v6 (alpha) instead of installing it manually as below do this and continue to 6; KIAUH main menu -> Advanced -> Extra Dependencies: -> [Input Shaper])
sudo apt update sudo apt install python3-numpy python3-matplotlib libatlas-base-dev libopenblas-dev ~/klippy-env/bin/pip install -v numpy -
Install Moonraker-timelapse
- See https://github.com/mainsail-crew/moonraker-timelapse for detailed information.
- First install moonraker-timelapse:
cd ~/ git clone https://github.com/mainsail-crew/moonraker-timelapse.git cd ~/moonraker-timelapse make install- Then edit your
~/printer_data/config/moonraker.confand add the following lines:
[update_manager timelapse] type: git_repo primary_branch: main path: ~/moonraker-timelapse origin: https://github.com/mainsail-crew/moonraker-timelapse.git managed_services: klipper moonraker [timelapse] ## Following basic configuration is default to most images and don't need ## to be changed in most scenarios. Only uncomment and change it if your ## Image differ from standart installations. In most common scenarios ## a User only need [timelapse] in their configuration. output_path: ~/timelapse/ ## Directory where the generated video will be saved frame_path: /tmp/timelapse/ ## Directory where the temporary frames are saved ffmpeg_binary_path: /usr/bin/ffmpeg ## Directory where ffmpeg is installed- After this you can configure the timelapse in your Mainsail Interface Settings.
- Check your slicer (e.g. Orca Slicer), your printer profile should have the timelapse frame g-code. You will find this under:
-> Printer settings
-> Machine G-Code
-> 'Before layer change G-code'
-> If not in there, add:TIMELAPSE_TAKE_FRAME
-
You have now installed mainline Klipper with the Mainsail web interface (and addons)! But there is more to be done to get it all working properly..
- If you haven't rebooted after installing Crowsnest:
sudo reboot - After the board has rebooted, in your browser go to the Mainsail web interface (via the IP address or hostname) and check if it's running.
- It will give an error since we still have to put our backed-up printer.cfg back.
- If you haven't rebooted after installing Crowsnest:
STEP 5 - CONFIGURE PRINTER/KLIPPER & ADDONS
Next, we have to configure our printer and put back some addons Sovol has added (probe_pressure and z_offset_calibration) and get the basics working.
Please use the files provided HERE in the /files-used/ GitHub folder. Some items (like the 'z_offset_calibration' script) have been fixed to work with the newest version of Klipper and other items in the printer.cfg have been changed/improved e.g. for a more silent and cooler (motor) running printer.
-
RESTORE THE SOVOL ADDONS (from the
/files-used/sovol-addons/github directory) HERE:- Use an SFTP program (like WinSCP) to connect to the printer (IP address or hostname, port: 22, username/password: biqu/biqu)
- Put the files
'probe_pressure.py'and'z_offset_calibration.py'into the'~/klipper/klippy/extras/'folder.
-
GRAB BASE PRINTER CONFIGURATION (from the
/files-used/config/github directory) HERE:-
Copy the entire config folder to the printer
~/printer_data/configfolder. -
this folder contains the following
options\*
printer.cfg
sovol-macros.cfg
saved_variables.cfg
crowsnest.conf -
OPTIONAL: Open your backup of your printer.cfg and copy the correct serials under [mcu] and [mcu extra_mcu] (only when your serial looks like
/dev/serial/by-id/usb-Klipper_stm32f103xe_xxxx) to your new printer.cfg, this might save you some time later..
Do your serials look like/dev/serial/by-id/ttyACM0or/dev/serial/by-id/ttyACM1then you can also skip this, we will find the correct full serials in STEP 8.
-
-
Do a firmware_restart (or reboot the whole printer) and you should have a working SV08.
-
Update the slicer start g-code. The START_PRINT macro has been updated/improved: uses your actual bed temperature for meshing etc., does a QGL with home Z, and can do a Z_OFFSET_CALIBRATION before each print.
-
Go to OrcaSlicer/PrusaSlicer and edit the printer settings :
-> Machine G-code
-> Machine start G-code
-> For OrcaSlicer, change your 'START_PRINT' line to this:START_PRINT EXTRUDER_TEMP=[nozzle_temperature_initial_layer] BED_TEMP=[bed_temperature_initial_layer_single]-> For PrusaSlicer, change your 'START_PRINT' line to this:
START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]
-
-
Want to use some heatsoak time before each print (heatsoaking in itself is enabled but the time set to 0 by default), please change the global variable
variable_heat_soak_time: 0(to e.g.variable_heat_soak_time: 10for a 10 minute heatsoak) under[gcode_macro _global_var]in the 'sovol-macros.cfg'. If you want to skip heatsoaking for a print just addHEATSOAK=0to the START_PRINT gcode as shown in the previous point (and useHEATSOAK=1to enable it again from the slicer).
- Now you can print and use the sovol presets like before!
Note
NOTE 1: all the .sh scripts in the macros have been commented out and there is a basic but reduced version of the sovol menu. It has all the basics to get you going.
NOTE 2: the [adxl345] and [resonance_tester] configs have been commented out at this point, the tool head MCU needs a new firmware for this. You uncomment/enable them again after Step 8.
STEP 6 - STOCK FIRMWARE BACKUP
Important
When connecting the ST-Link to the printer, make sure the printer is powered OFF. The MCU will be powered by the ST-Link.
It's important to make a backup of the current (stock) firmware. This way you can always revert to this stock configuration. These steps apply to both the tool head MCU and mainboard MCU.
-
First, make sure you have a properly installed ST-Link with the STM32CubeProgrammer software.
- Download the STM32CubeProgrammer software here: https://www.st.com/en/development-tools/stm32cubeprog.html#st-get-software
- Install the software and make sure the ST-Link is also properly installed; the software should show the serial of your ST-Link just below the CONNECT button (if not you can click on the little refresh button)
Tip
Does your (clone) ST-Link not work with STM32CubeProgrammer and e.g. only has a single digit serial number? Try the older version of the flashing program instead, you can find it here: https://www.st.com/en/development-tools/stsw-link004.html. The steps below explain the STM32CubeProgrammer but it should be mostly the same for the old program but with a different interface.
Tip
Are you using STM32CubeProgrammer on Linux? If you can't connect to your ST-Link, you may have to manually fix a common installation bug following these instructions.
-
Turn the printer OFF and remove the ST-Link from your computer, next connect the ST-Link to your board (either tool head or mainboard).
- MAKE SURE YOU WIRE THIS CORRECTLY, the pinout on the boards is (SV08 -> ST-Link Mini):
- 3V3 -> 3.3V
- IO -> SWDIO
- CK -> SWCLK
- G -> GND
- Refer to your ST-Link manual for the pinout on the adapter (not all ST-Links have the exact same pinout)!
- MAKE SURE YOU WIRE THIS CORRECTLY, the pinout on the boards is (SV08 -> ST-Link Mini):
Caution
Mind the orientation of the boards in pictures below, refer to the markings on the mainboard/toolhead!
Mainboard ST-Link pins location:
Toolhead ST-Link pins location:
- Insert the ST-Link into your computer (printer stays off), open the STM32CubeProgrammer software, and press CONNECT. It should now connect and populate the middle screen with memory stuff.
- Please select
Read allfrom theReadmenu, this will read everything and set the correct size (to save).
- Please select
Save As ..from theReadmenu and save the current firmware (e.g. toolhead_original_firmware.bin or mainboard_original_firmware.bin).
Caution
Make sure the firmware backup file is at least 128k for the toolhead, 512k for the mainboard. If it is just 1 Kilobyte it is too small, and you won't be able to return to your old firmware. In case that already happened here are some provided firmware backups of both the toolhead and mainboard (printer delivered to the EU on 2024-06-28). Use on your own risk.
STEP 7 - FLASH KATAPULT BOOTLOADER
Important
When connecting the ST-Link to the printer, make sure the printer is powered OFF. The MCU will be powered by the ST-Link.
Also make sure your ST-Link has the latest firmware, use the STM32CubeProgrammer application 'Firmware upgrade' button for this.
Note
After flashing the Katapult firmware the printer will start up silently; no fans, no light, and no display during boot. Don't be alarmed, this is normal. We will enable these functions again in step 8.
To make life easier in the future we are going to flash Katapult to our MCUs (we flash Katapult on both the mainboard MCU and the toolhead MCU). This is a bootloader that makes it possible to flash Klipper firmware without the ST-Link via CANBus, USB or UART by the Host.
-
Switch the printer on, SSH (biqu/biqu) into the printer, and install Katapult:
- Run this command to install Katapult:
cd ~ && git clone https://github.com/Arksine/katapult- Install pyserial with (we need this later to flash the firmware)
pip3 install pyserial - Run this command to install Katapult:
-
When it's done, do
cd ~/katapult && make menuconfig -
Press Q to quit and save changes.
-
Run the commands to build the firmware (katapult.bin):
make clean make -
Grab the file
~/katapult/out/katapult.bin(e.g. with an SFTP program like WinSCP) and store it on the computer. You can use this Katapult firmware for both the tool head and the mainboard. -
Turn OFF the printer again and after it's off insert the ST Link again into the computer and start the STM32CubeProgrammer software and CONNECT.
-
Once connected, on the left side of the software go to the tab 'Erasing & Programming' and execute a manual (not only automatic mode)
Full chip erase
- Time to flash! Go back to the 'Memory & File editing' tab, click 'Open file', and select the
katapult.bin, then press the 'Download' button to write the firmware.
Alternatively you can write the firmware from the 'Erasing & Programming' tab by using 'Browse' to select thekatapult.binfile and then press 'Start Programming' to write the firmware.
Done! The Katapult bootloader is on the MCU! Please click on 'Disconnect' and then remove the ST-Link from the computer and the board. Do this for both the tool head MCU and the mainboard MCU.
STEP 8 - FLASH KLIPPER FIRMWARE on MCUs
Note
The standard Klipper firmware works on both the toolhead MCU and the mainboard MCU. Originally Sovol made multiple changes to the
stm32f1.csource for the firmware but they are not mandatory. Only now, the printer starts up silently; no fans, no light, and no display during boot. You CAN get some of this functionality back by enabling GPIO pins during startup, see notes below make menuconfig.
Tip
For future Klipper firmware updates, after completing the steps below, you only have to run the script at step
8.7.
It's time to create and flash the Klipper firmware! In the future, you only have to do this step when you need to update your Klipper firmware. This section assumes you already have Katapult flashed and pyserial (step 7.1) installed.
-
Switch on the printer and SSH (biqu/biqu) into the printer.
-
Open the file printer.cfg. Look at the
[mcu]and[extra_mcu]sections, and copy-paste only the section circled in red for each MCU, we will need it later:
- If you have this in your printer.cfg:
You have to replace each ID to have the same pattern as above. To do that, find the correct serial name for the MCU with the command. AND READ THE WARNING BELOW!
ls -la /dev/serial/by-id/
You will have this :
Copy the blue part to replace ttyACM0 or ttyACM1 in your printer.cfg (case sensitive). At the end, you should have this (with your digits):
Warning
WARNING: When you accidently switch the
mcuandextra_mcuserials bad things can happen. THE HEATER WILL TURN ON FULL BLAST! This is bad, you don't want this.
Also DON'T use ttyACM0 and ttyACM1 as serials, they are not fixed and can switch and give this dangerous effect as well. There is a reason we want you to use the long (and fixed/static) serial.
To be 100% sure you have the correct serial linked to the correct MCU please check your serials withls /dev/serial/by-id/and disconnect the USB plug from the toolhead (see image below). Do als /dev/serial/by-id/again and see what serial is still there (this is yourmcuserial) and what serial disappeared (this is yourextra_mcuserial). Plug the connector back in and do anotherls /dev/serial/by-id/to confirm you have indeed the correctmcuandextra_mcuserials.
Note
The correct serial for our MCU's in the printer.cfg always begins with
usb-Klipper_stm32f103xe_(note: case sensitive). If you only found serials that start withusb-Katapult_stm32f103xe_when doingls /dev/serial/by-id/please replaceKatapultwithKlipperfor the serials in your printer.cfg. It is possible your serials only containusb-Katapult_stm32f103xe_at the moment because the MCU is already in DFU mode, ready to receive the Klipper firmware. After flashing the Klipper firmware it will becomeusb-Klipper_stm32f103xe_.
-
Download the script Automatic MCU script update and copy it in your
~/klipperfolder on the printer. -
Edit it with nano to change the ID of each MCU with what you have copied at 2:
sudo nano ~/klipper/update_klipper_mcus_sv08.sh
- Replace XXXXXXX with the
[mcu]serial ID, and YYYYYYY with the[extra mcu]serial ID :
update_klipper_mcus_sv08.sh
#Replace each XXXXXXXX and YYYYYYYY serial number with the one you find in your printer.cfg file (we only need the part after 'usb-Klipper_stm32f103xe_')
#HOSTSERIAL is found under [mcu]
#TOOLHEADSERIAL is found under [extra mcu]
# I'm a string, so I look like: HOSTSERIAL='XXXXXXXX'
HOSTSERIAL='XXXXXXXX'
# I'm an array so I look like: TOOLHEADSERIAL=('YYYYYYY')
# For multiple serials/toolheads use (mind the space in between items!): TOOLHEADSERIAL=('YYYYYYYY1' 'YYYYYYYY2' 'YYYYYYY3')
TOOLHEADSERIAL=('YYYYYYY')
- You should now have this in the script :
#Replace each XXXXXXXX and YYYYYYYY serial number with the one you find in your printer.cfg file (we only need the part after 'usb-Klipper_stm32f103xe_')
#HOSTSERIAL is found under [mcu]
#TOOLHEADSERIAL is found under [extra mcu]
# I'm a string, so I look like: HOSTSERIAL='XXXXXXXX'
HOSTSERIAL='32FFD9054747363035861857-if00'
# I'm an array so I look like: TOOLHEADSERIAL=('YYYYYYY')
# For multiple serials/toolheads use (mind the space in between items!): TOOLHEADSERIAL=('YYYYYYYY1' 'YYYYYYYY2' 'YYYYYYY3')
TOOLHEADSERIAL=('50FF6C068367515511180667-if00')
-
Save the file with
Ctrl + X -
Make the script executable :
chmod +x ~/klipper/update_klipper_mcus_sv08.sh
- You can now use the script with :
cd "$HOME/klipper" && ./update_klipper_mcus_sv08.sh
Note
Some users have reported to make sure nothing is keeping Klipper busy (like an open web session to Mainsail/Fluidd or some app using Klipper) or it might get stuck on 'Attempting to connect to bootloader' when flashing. So if you want the best chance of success; close mainsail or any other things that might keep the printer/Klipper busy, maybe even reboot before you want to flash and run the automatic update script.
- In the MCU updater menu choose option 1 'HOST MCU'. In the menuconfig screen for the
HOST,choose the following option(s) and addPA1,PA3on the last line (GPIO pins , if you want MCU fan and light during boot), when ready press Q to quit & save. Continue to follow instructions and flash the HOST MCU.
Note
Because we are using Katapult as the bootloader, make sure you set the 8 KiB bootloader offset.
- In the MCU updater menu choose option 2 'TOOLHEAD MCU(S)'. In the menuconfig screen for the
TOOLHEAD,choose the following option(s) and addPA6on the last line (GPIO pins , if you want hotend fan enabled during boot), when ready press Q to quit & save. Continue to follow instructions and flash the TOOLHEAD MCU.
Note
Because we are using Katapult as the bootloader, make sure you set the 8 KiB bootloader offset.
-
Done! The Klipper firmware on both MCU has been updated.
-
Restart the printer :
sudo shutdown -r now
-
After the restart, you can uncomment the
[adxl345]and[resonance_tester]parts in your printer.cfg to have those functional again; you can also initialize the webcam through the Mainsail settings (Settings > Webcams > Add Webcam). -
Enjoy mainline Klipper!
BIG THANKS & CONTRIBUTE
Big thanks to all the people on the Sovol discords (both official and unofficial) who have helped or participated in this project in any way. Special thanks go out to: ss1gohan13, michrech, Zappes, cluless, Haagel, Froh - you guys rock!
Do you feel like contributing to this project/guide? That would be awesome! Please make a pull request or issue and then it can be added to the guide!
Disclaimer
This guide and all changes have been made with the best intentions but in the end, it's your responsibility and only your responsibility to apply those changes and modifications to your printer. Neither the author, contributors nor Sovol is responsible if things go bad, break, catch fire, or start WW3. You do this at your own risk!


















