Skip to content

Architecture

The full custom firmware effort has layers (like an onion!) The printer's Linux host runs Klipper and web services. Four MCU boards perform motion, extrusion, heating, and sensing. AFC models the removable tools and filament state. Printer-side configuration and startup scripts tie those parts together.

This section describes each layer. Start here for the overall picture, then read the page for the part you're working on.

Page What it covers
Printer-side layout Partitions and mounts, where configs, logs, state and G-code live, and how the config files fit together
Boot and services How the printer gets from power-on to Klipper, every startup script in order, and the service loops
MCLib and motor control The mainboard's closed-loop control of the X, Y and Z motors, its configuration, VFA correction, and stall and slip detection
Firmware, installer and updates How the MCU firmware is built and flashed, what the installer does, and how the updater keeps everything current
Interfaces Klipper, Moonraker and the web UI, the touchscreen, Kalico's Creator 5 modules, AFC and plugins
Hardware The SoC, the four boards and how they connect, the toolheads, and temperature limits

What runs where

Layer Current development role Source
Linux host Runs Kalico (the Creator 5 Klipper fork), Moonraker, nginx with the chosen web interface, the touchscreen UI and OpenCreator's startup scripts. The printer is MIPS32 (Ingenic X2600 / Xburst 2 with 512MB of RAM) kalico, opencreator-fs
Mainboard MCU Handles the main motion and machine I/O through the GD32 port. Chip is a gd32h737vgt6. Runs MCLib, the motor control for X, Y and Z, including VFA correction. See MCLib and motor control. kalico/src/stm32/c5_mainboardgd.c, src/c5_mclib.c and related target code, klippy/extras/mclib.py
eboard MCU Drives the shared physical extruder motor and supplies the pressure-advance measurement interface. Chip is n32g455ccl7. kalico/src/c5_eboard.c, c5_eboard_pa.c and klippy/extras/pa_adjust.py
Heaterboard MCU Handles tool heater and temperature I/O, and the dock and grab inputs of the four tools. Chip is n32g455rel7. kalico/src/stm32 N32G45x support (C5_HEATERBOARD build option)
Levelboard MCU Supplies probe and levelboard-specific sensing used by calibration. Chip is n32g430f8s7. kalico/src/c5_levelboard.c and Klippy levelboard code
Toolchanger and AFC Uses physical dock and grab inputs for T0 to T3 selection. AFC standalone provides filament and tool mapping, while creator5_toolchanger.py owns the machine-specific motion and safety checks. kalico/klippy/extras
Printer filesystem Holds the Creator 5 configuration, AFC configuration, startup scripts, the updater, Moonraker components and the printer data layout. opencreator-fs
Installer The touchscreen USB installer that puts all of the above on a stock printer, and rolls it back. opencreator-installer

How the parts talk

flowchart LR
  subgraph clients["Your computer or phone"]
    slicer[Slicer]
    browser[Browser]
  end
  subgraph soc["Linux SoC (Ingenic X2600)"]
    nginx["nginx<br/>Fluidd or Mainsail"]
    moon[Moonraker<br/>port 7125]
    klippy["Kalico (Klippy)<br/>+ AFC"]
    screen["Touchscreen<br/>GrumpyScreen or HelixScreen"]
    cam[Camera streamer]
    updater[OpenCreator updater]
  end
  subgraph boards["MCU boards"]
    main["Mainboard GD32H737<br/>MCLib: X, Y, Z"]
    eboard["eBoard N32G455<br/>extruder, accelerometer"]
    heater["Heaterboard N32G455<br/>heaters, dock and grab pins"]
    level["Levelboard N32G430<br/>probe"]
  end
  browser --> nginx
  nginx --> moon
  slicer -->|upload| moon
  browser -->|camera stream| cam
  screen --> moon
  moon -->|"Unix socket /tmp/uds"| klippy
  updater -->|"print state, flash requests"| moon
  klippy -->|"/dev/ttyS2"| main
  klippy -->|"/dev/ttyS5"| eboard
  klippy -->|"/dev/ttyS4"| heater
  klippy -->|"/dev/ttyS7"| level

Everything you do goes through Moonraker: the web UI, the touchscreen and slicer uploads all use its API, and Moonraker talks to Klippy over the Unix socket /tmp/uds. Klippy talks to each board over its own UART. The X, Y and Z motors have no driver chips: the mainboard drives their windings itself (see MCLib and motor control). The extruder motor is on the eBoard behind a TMC2209.

In tunnel mode the SoC runs none of Klipper, Moonraker or the web UI. A socat bridge forwards the four boards to a single-board computer over USB, and Klipper runs there. See OpenCreator for SBC and Boot and services.