Skip to content
Ch 1214 / 37

Step 12.14 — Build Klipper firmware for the Leviathan

Step 14 of 37 · Chapter 12 — Software: Pi OS image, Klipper/Moonraker/Mainsail, firmware, printer.cfg

(no image — see text)

Parts: none.

Do: Stop Klipper so it releases the serial ports, then configure. KCONFIG_CONFIG= keeps this board's settings in ~/klipper/config.leviathan instead of the shared .config, so the toolboard build cannot overwrite them:

sudo systemctl stop klipper
cd ~/klipper
make KCONFIG_CONFIG=config.leviathan menuconfig

check Check

The screen shows Clock Reference (12 MHz crystal) or 25 MHz before you save. The build ends with Creating hex file out/klipper.bin, and config.leviathan sits beside printer.cfg in Mainsail.

What you're looking at

make menuconfig is a text-mode settings screen for the firmware build; it produces out/klipper.bin, the binary the mainboard will run. The bootloader offset is the field that bites: it tells the firmware to start further into flash and leave the first few kilobytes to the bootloader.

Set, for an F446 (V1.1/V1.2) board — the first line first, because Clock Reference only appears once it is ticked:

[*] Enable extra low-level configuration options
    Micro-controller Architecture: STMicroelectronics STM32
    Processor model:               STM32F446
    Bootloader offset:             32KiB bootloader
    Clock Reference:               12 MHz crystal
    Communication interface:       USB (on PA11/PA12)

or, for an H743 (V1.3) board:

[*] Enable extra low-level configuration options
    Micro-controller Architecture: STMicroelectronics STM32
    Processor model:               STM32H743
    Bootloader offset:             128KiB bootloader
    Clock Reference:               25 MHz crystal
    Communication interface:       USB (on PA11/PA12)

Q to quit, Y to save. Then:

make KCONFIG_CONFIG=config.leviathan clean
make KCONFIG_CONFIG=config.leviathan
cp config.leviathan ~/printer_data/config/

Caution

Rev D+ / LDO: the bootloader offset is dangerous: build with no offset and the Katapult flash wipes the bootloader, recoverable only through DFU at Step 12.16. The clock is the sneaky one: a wrong clock or processor flashes cleanly, then the board never returns as usb-Klipper_…. Double-click SW1 for usb-katapult_…, fix menuconfig, rebuild, re-flash. src · src · src

Source: LDO Leviathan V1.2 guide · LDO Leviathan V1.3 guide · Klipper docs § Building and flashing the micro-controller