Skip to content
Ch 12Before you start

Before you start Chapter 12

Before you start · Chapter 12 — Software: Pi OS image, Klipper/Moonraker/Mainsail, firmware, printer.cfg

Images the Raspberry Pi, flashes Klipper onto both MCUs, and installs a printer.cfg that is correct for a 350 mm Rev D+ — so that Ch 13 can power up a machine that already knows its own geometry.

What you're building in this chapter. The printer's software comes in layers, and keeping them apart makes everything below easier. Klipper is the firmware, and it is split in two: a host process on the Raspberry Pi that does all the planning and arithmetic, and a thin MCU firmware on each microcontroller — the Leviathan mainboard in the bay and the Nitehawk-SB V2 toolboard on the printhead — that does nothing but execute precisely timed pin changes. Moonraker is the API service sitting in front of Klipper so other programs can talk to it, and Mainsail (in a browser) and KlipperScreen (on the front panel) are two such programs — two windows onto the same machine. You will image the Pi with MainsailOS, which ships all of that pre-installed; compile and flash both MCU firmwares from the exact host version; and then write printer.cfg, the single text file that tells Klipper what this machine is — its pins, its 350 mm dimensions, its heaters, probe, fans and macros. Nothing moves and nothing heats until Ch 13.

Revali watching a console
Nothing moves this chapter. The machine is reading its own manual, slowly, and will not be rushed.

Time: 2.0–3.0 h hands-on, first build (survey §7.2). Add ~30 min if you have to reinstall Katapult on either board.

Sessions: 9 × ~30 min (Pause segments below; every minute figure in this chapter is a first-build estimate derived from the Time range and the step count).

Prerequisites:

  • Ch 10 — Electronics bay wiring, complete, with LDO Checkpoint #1 passed (multimeter, unplugged) and the PSU powered on once at Step 10.23. The cord has been out since then; it goes back in at Step 12.11, which is the first time the Leviathan, the Pi and the toolboard are energised — with the same hand-on-switch drill as 10.23. Both MCUs must be powered and connected to the Pi over USB before Steps 12.11 onward.
  • The Pi-side half (Steps 12.1–12.10) has no hardware prerequisite and can be bench-done on day one — power the Pi from its own USB-C supply instead of the Leviathan's Pi rail (survey §5.1, P12: "the whole flash+install can be bench-done on day one").
  • Ch 11 Part A comes after this chapter's Part 2, not before: the bay stays open through Steps 12.11–12.37 (index rows 24–26). The touchscreen module is already built and its DSI ribbon latched at both ends (Ch 10 Step 10.50), so 12.11 is the first time the panel is seen.
  • Printed parts: none. No print batch gates this chapter.
  • Do not start Ch 13 until Checkpoint 12 below passes.

Tools

  • Laptop with an SD card reader
  • Raspberry Pi Imager (download from raspberrypi.com/software)
  • Ethernet cable (use wired for the flashing session; Wi-Fi is the fallback)
  • USB cable, Pi ↔ Leviathan (supplied with the kit; connector type (verify on bench))
  • A USB-C 5 V/3 A supply if you are bench-doing the Pi half before the bay is live

Consumables: the supplied 32 GB microSD card. Nothing else.

Printed parts

STL Qty Colour
— none — 0 —

Hardware (chapter totals)

Fastener / part Qty Note
— none — 0 Software only. The Pi was fitted in Ch 09; the touchscreen module was built and its DSI ribbon latched at both ends at Ch 10 Step 10.50 (Ch 11 Steps 11.5–11.6 run from there); the module is bolted into the skirt ring at Ch 11 Step 11.7, after this chapter

Read first

  • Use leviathan-printer-rev-d-sbv2.cfg, never leviathan-printer-rev-d.cfg. The Rev D wiring guide links the wrong one. Every nhk: pin differs because the toolboard MCU changed family. Klipper checks every pin name against the board it is sent to, so the V1 file does not mis-drive anything — it refuses to start at Step 12.37 with Pin 'gpio23' is not a valid pin name on mcu 'nhk'. The one-line identity check is grep -c gpio printer.cfg: 0 on the V2 file, 20 on the V1 file (survey §4.1 ①).
  • The toolboard is an STM32G0B1, not an RP2040. The wiring guide's sentence "The Nitehawk uses an RP2040 MCU" is stale. Its USB ID will read usb-Klipper_stm32g0b1xx_…. Match on that string, not on rp2040 (survey §4.1 ②).
  • The stock config ships with every build-size option commented out and no [bed_mesh] at all. Six separate places need the 350 mm lines uncommented, and the mesh section has to be written from scratch (survey §4.4 #15).
  • Confirm which Leviathan you have before you run make menuconfig. LDO shipped an STM32F446 Leviathan (V1.1/V1.2) and later an STM32H743 one (V1.3). Processor model, clock reference and bootloader offset all differ; the wrong combination produces firmware that will not run. Step 12.13 settles it from the board itself.
  • Nothing moves and nothing heats in this chapter. The chapter ends at "Klipper reports Ready with both MCUs connected". Homing, heaters, fans and motion are Ch 13.

Sources for this chapter:

Video coverage (Steve Builds, pre-release LDO kit — differs from Rev D+): Part 8 @2:25:00 (+9m), Part 8 @2:33:20 (+9m), Part 9 @1:00:43 (+5m), Part 9 @1:05:13 (+18m), Part 9 @1:22:28 (+3m), Part 9 @1:25:00 (+5m), Part 9 @2:35:40 (+14m), Extras! @0:14:05 (+26m), Extras! @0:45:30 (+3m), Extras! @0:48:23 (+18m), More Extras! @3:10:29 (+11m)

helperHelper steps: 4 · 12.7, 12.12, 12.27, 12.37