MCU firmware: aldis as a submodule, old Klipper update script archived

aldis (https://github.com/mjonuschat/aldis, GPL-3.0) replaces
scripts/update_all_mcus.sh: it discovers the MCUs from Moonraker and builds
and flashes only outdated ones with the Kconfig each MCU reports. Its source
is a submodule in external/aldis pinned to v0.4.0, the release installed on
the Pi in ~/aldis (Moonraker does not fetch submodules, so it stays empty
there). The old script moves to scripts/archive/; the Katapult script stays,
aldis does not update bootloaders. scripts/README.md: install, setup, use
and the checks for this printer (all MCUs report mcu_kconfig, all use
Katapult). README and CLAUDE.md point to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-07 22:37:45 +01:00
1 parent d8392a81c7
commit bcb1a53b2a
6 files changed
+81 -10

No files matched your search

+62 -6
View File
@@ -2,14 +2,70 @@
`twist_check.py` is the axis twist calibration: start it with the macro
`TWIST_CALIBRATE` in Mainsail, and see [twist_check.md](twist_check.md) for how
to use it. The rest of this page is about the firmware scripts.
to use it. The rest of this page is about MCU firmware updates.
# MCU firmware update scripts
# MCU firmware updates: aldis
Klipper firmware on the MCUs is updated with
[aldis](https://github.com/mjonuschat/aldis) (GPL-3.0). It finds every MCU in
the running Klipper/Moonraker setup, compares its firmware with the Klipper
checkout in `~/klipper`, and builds and flashes only the ones that are out of
date, using the build config each MCU reports itself. It stops Klipper only
for the flash, and shows its plan first. It also updates Beacon's firmware.
Its source is included as a git submodule in `external/aldis`, pinned to the
release in use (v0.4.0). On the Pi you run the released program instead,
installed in `~/aldis`; the submodule stays empty there (Moonraker does not
fetch submodules), which is fine. To get the source on a PC:
`git submodule update --init`.
## Install (once, on the Pi)
```bash
mkdir -p ~/aldis && curl -fL "https://github.com/mjonuschat/aldis/releases/latest/download/aldis-$(uname -m)-linux.tar.xz" | tar xJ -C ~/aldis --strip-components=1 && chmod +x ~/aldis/aldis
```
```bash
sudo ~/aldis/aldis setup
```
`setup` installs udev rules for the USB bootloaders and a narrow sudo rule so
aldis can stop and start Klipper. `sudo ~/aldis/aldis setup --check` verifies
them. Optional: `sudo ~/aldis/aldis setup --agent` runs it as a service that
the web UI can manage (restart Moonraker once afterwards).
## Use (between prints only)
```bash
~/aldis/aldis status
```
```bash
~/aldis/aldis update
```
- `status`: which MCUs it found and whether their firmware is current (reads only).
- `update`: builds and flashes the outdated MCUs, asking per MCU.
`update --pull` also pulls Klipper first; `update <mcu>` limits it.
- `self-update`: installs a newer aldis release (`--check` only reports).
Notes for this printer (checked 2026-11-07):
- All Klipper MCUs (`mcu` Leviathan, `Turtle_1`, `MC_1`, `EBB42`, `nhk`,
`iHeater`) run `v0.13.0-777`, and Beacon 2.1.0; all report `mcu_kconfig`,
which aldis needs (Klipper `v0.13.0-753` or newer).
- Every board has Katapult (CAN or USB), which aldis supports.
- Flashing the Leviathan (USB-CAN bridge) resets the CAN bus.
- aldis writes each MCU's build config to `~/klipper/.config`. The named build
configs used by the old script (`leviathan`, `EBB42`, ...) are not touched.
- Not covered: the bd_pressure sensor (not a Klipper MCU; it has its own
`stm32flash` procedure in the bd_pressure repo) and Katapult itself (see below).
# Old scripts
| Script | Does |
|---|---|
| `update_all_mcus.sh` | Pulls Klipper, builds and flashes **Klipper** to every MCU, prints a summary, restarts Klipper |
| `update_katapult_all_mcus.sh` | Builds and flashes **Katapult** (the bootloader) to every MCU |
| `archive/update_all_mcus.sh` | **Archived 2026-11-07, replaced by aldis.** Pulls Klipper, builds and flashes **Klipper** to every MCU, prints a summary, restarts Klipper |
| `update_katapult_all_mcus.sh` | Builds and flashes **Katapult** (the bootloader) to every MCU. Still in use: aldis does not update bootloaders |
Based on the [Voron guide to automating MCU updates](https://docs.vorondesign.com/community/howto/drachenkatze/automating_klipper_mcu_updates.html)
and [Esoterical's CANBus guide](https://canbus.esoterical.online/).
@@ -17,7 +73,7 @@ and [Esoterical's CANBus guide](https://canbus.esoterical.online/).
Run them on the Klipper host, between prints:
```bash
~/klipper-macros/scripts/update_all_mcus.sh
~/klipper-macros/scripts/update_katapult_all_mcus.sh
```
They stop Klipper while flashing (and need `sudo` for that).
@@ -96,5 +152,5 @@ not used by the flashing itself; they only document the UUIDs.
`update_katapult_all_mcus.sh` ends after the last board: it does not print
the summary and does not start Klipper again. Run `sudo systemctl start
klipper` afterwards, or add the last lines of `update_all_mcus.sh`
klipper` afterwards, or add the last lines of `archive/update_all_mcus.sh`
(`print_summary` and the restart) to it.