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

+3
View File
@@ -0,0 +1,3 @@
[submodule "external/aldis"]
path = external/aldis
url = https://github.com/mjonuschat/aldis.git
+5 -1
View File
@@ -39,7 +39,11 @@ detection, `filament_error_sensitivity`), iHeater chamber heater.
On the Pi, `macros/` is linked as `~/printer_data/config/klipper-macros/` On the Pi, `macros/` is linked as `~/printer_data/config/klipper-macros/`
and `scripts/` as `~/printer_data/config/klipper-macros-scripts/`. and `scripts/` as `~/printer_data/config/klipper-macros-scripts/`.
- `extras/*.py` are linked into `~/klipper/klippy/extras/`. - `extras/*.py` are linked into `~/klipper/klippy/extras/`.
- `scripts/` MCU firmware update scripts (printer-specific IDs) and - MCU firmware: aldis (`external/aldis`, git submodule pinned to the release in
use, v0.4.0; the Pi runs the released binary in `~/aldis`). Bump the
submodule when the Pi's aldis is updated.
- `scripts/` Katapult update script (printer-specific IDs), the archived Klipper
update script in `scripts/archive/`, and
`twist_check.py` (axis twist calibration, runs on the Pi and talks to `twist_check.py` (axis twist calibration, runs on the Pi and talks to
Moonraker on localhost; started by `TWIST_CALIBRATE` in Moonraker on localhost; started by `TWIST_CALIBRATE` in
`macros/calibration/twist_check.cfg`, results in `config/twist_data/`). `macros/calibration/twist_check.cfg`, results in `config/twist_data/`).
+8 -3
View File
@@ -73,9 +73,13 @@ here (`purge_check.cfg`, `nozzle_guard.cfg`, `bd_pa_spoolman.cfg`) still use the
### Scripts (`scripts/`) ### Scripts (`scripts/`)
Firmware update scripts for all MCUs (Klipper and Katapult). They contain MCU firmware: Klipper on the MCUs is updated with
this printer's CAN UUIDs and serial IDs: see [scripts/README.md](scripts/README.md) [aldis](https://github.com/mjonuschat/aldis), included as a git submodule in
before using them on another printer. `twist_check.py` is the axis twist `external/aldis` (pinned to the release in use; on the Pi run the released
program in `~/aldis`). Install and use: [scripts/README.md](scripts/README.md).
The old Klipper update script is in `scripts/archive/`; the Katapult script
(`update_katapult_all_mcus.sh`, this printer's CAN UUIDs and serial IDs) is
still used for the bootloaders. `twist_check.py` is the axis twist
calibration behind `TWIST_CALIBRATE`: see [scripts/twist_check.md](scripts/twist_check.md). calibration behind `TWIST_CALIBRATE`: see [scripts/twist_check.md](scripts/twist_check.md).
### Tools (`tools/`) ### Tools (`tools/`)
@@ -179,6 +183,7 @@ original licenses apply to those parts:
| `pressure_advance/bd_pressure.cfg` | [bd_pressure](https://github.com/markniu/bd_pressure) `klipper/bd_pressure.cfg` | | `pressure_advance/bd_pressure.cfg` | [bd_pressure](https://github.com/markniu/bd_pressure) `klipper/bd_pressure.cfg` |
| `print/test_speed.cfg` | [Ellis' TEST_SPEED](https://ellis3dp.com/Print-Tuning-Guide/articles/determining_max_speeds_accels.html) | | `print/test_speed.cfg` | [Ellis' TEST_SPEED](https://ellis3dp.com/Print-Tuning-Guide/articles/determining_max_speeds_accels.html) |
| `print/pause_resume.cfg`, `print/filament.cfg` | [KlipperScreen recommended macros](https://klipperscreen.readthedocs.io/en/latest/macros/#recommended) | | `print/pause_resume.cfg`, `print/filament.cfg` | [KlipperScreen recommended macros](https://klipperscreen.readthedocs.io/en/latest/macros/#recommended) |
| `external/aldis` | [aldis](https://github.com/mjonuschat/aldis) by mjonuschat, GPL-3.0 (git submodule, unchanged) |
| `scripts/` | [Voron docs: automating MCU updates](https://docs.vorondesign.com/community/howto/drachenkatze/automating_klipper_mcu_updates.html), [Esoterical's CANBus guide](https://canbus.esoterical.online/) | | `scripts/` | [Voron docs: automating MCU updates](https://docs.vorondesign.com/community/howto/drachenkatze/automating_klipper_mcu_updates.html), [Esoterical's CANBus guide](https://canbus.esoterical.online/) |
Uses: [Klipper](https://github.com/Klipper3d/klipper), Uses: [Klipper](https://github.com/Klipper3d/klipper),
Vendored Submodule
+1
Submodule external/aldis added at 607c8db1b0.
+62 -6
View File
@@ -2,14 +2,70 @@
`twist_check.py` is the axis twist calibration: start it with the macro `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 `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 | | Script | Does |
|---|---| |---|---|
| `update_all_mcus.sh` | Pulls Klipper, builds and flashes **Klipper** to every MCU, prints a summary, restarts Klipper | | `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 | | `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) 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/). 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: Run them on the Klipper host, between prints:
```bash ```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). 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 `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 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. (`print_summary` and the restart) to it.
@@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
# ARCHIVED 2026-11-07: replaced by aldis (https://github.com/mjonuschat/aldis),
# see scripts/README.md. Kept for reference; the IDs below are still this printer's.
# https://docs.vorondesign.com/community/howto/drachenkatze/automating_klipper_mcu_updates.html # https://docs.vorondesign.com/community/howto/drachenkatze/automating_klipper_mcu_updates.html
# https://canbus.esoterical.online/mainboard_klipper_updating.html # https://canbus.esoterical.online/mainboard_klipper_updating.html