Skip to content

Klipper Error: mcu 'mcu' Has Deprecated Code — Fix It

Klipper Error: mcu 'mcu' Has Deprecated Code — Fix It

If you updated Klipper in Mainsail or Fluidd and suddenly see a warning about deprecated code on your MCU and EBB board, this guide is for you.

The short version: updating Klipper on the host does not automatically update firmware on your physical boards. You need to recompile and flash both your toolhead board and your mainboard so protocol versions stay in sync.

  • Host: BTT CB1 or Raspberry Pi
  • Mainboard: BTT Manta M8P V1.1
  • Toolhead board: EBB2209 CAN
  • CAN bootloader: Katapult (formerly CanBoot)

Klipper has two parts:

  • Host software running on Linux
  • Firmware running on each microcontroller board

When the host updates but board firmware stays old, Klipper reports protocol mismatch/deprecated code until everything is aligned.

I follow Esoterical’s CANBus guide for these steps. It has an updating section for both the toolhead and the mainboard. If you set up CAN with that guide, updating is the same commands again.

  1. SSH into your host.
  2. Back up your current config files.
  3. Keep your current board UUIDs handy from printer.cfg.
  4. Have physical access to the toolhead board in case you need a reset.
Terminal window
cd ~/klipper
make menuconfig
make clean
make

In menuconfig, choose options that match your exact EBB model and bootloader settings.

Terminal window
sudo service klipper stop

Use your EBB UUID from printer.cfg. If needed, discover devices with canbus_query first.

Terminal window
python3 ~/klipper/scripts/canbus_query.py can0
python3 ~/katapult/scripts/flashtool.py -i can0 -u <your-ebb-uuid> -f ~/klipper/out/klipper.bin

On my EBB2209 the first flash attempt often fails with a long error partway through. That’s the board being finicky, not a bad build. This sequence fixes it every time for me:

  1. Stop Klipper again: sudo service klipper stop
  2. Press the up arrow so the flash command is ready to run.
  3. Go to the toolhead and press the reset button on the EBB twice, quickly.
  4. Run the flash command straight away.

When it works, the output ends with “Programming complete”, not “flash success”. That’s normal.

Confirm the board is back in Klipper mode, not Katapult mode:

Terminal window
python3 ~/klipper/scripts/canbus_query.py can0

The UUID should show Application: Klipper.

Phase 2: Update the Mainboard (BTT Manta M8P)

Section titled “Phase 2: Update the Mainboard (BTT Manta M8P)”

If your Manta is acting as a USB-to-CAN bridge, your menuconfig settings matter a lot. Wrong settings can break CAN communication.

Use this reference profile for M8P V1.1:

Setting Selection
Micro-controller STMicroelectronics STM32
Processor model STM32G0B1
Bootloader offset 8KiB bootloader
Clock Reference 8 MHz crystal
Communication interface USB to CAN bus bridge (USB on PA11/PA12)
CAN bus interface CAN bus (on PD12/PD13)

Two settings are easy to miss below the table:

Setting Selection
Optimize stepper code for ‘step on both edges’ Enabled
GPIO pins to set at micro-controller startup (blank)

Save, then build:

Terminal window
make clean
make

Check that out/klipper.bin is listed at the end of the build output.

  1. Stop Klipper: sudo service klipper stop

  2. Put the board into Katapult mode using its UUID from printer.cfg (the [mcu] section, not the EBB):

    Terminal window
    python3 ~/katapult/scripts/flashtool.py -i can0 -u YOUR_MAINBOARD_UUID -r
  3. Find the board’s USB path:

    Terminal window
    ls /dev/serial/by-id

    You’re looking for an entry containing usb-katapult.

  4. If usb-katapult isn’t listed, press the reset button on the mainboard twice, then run ls again. That fixed it for me.

  5. Flash using that path:

    Terminal window
    python3 ~/katapult/scripts/flashtool.py -f ~/klipper/out/klipper.bin -d /dev/serial/by-id/usb-katapult_YOUR_BOARD_ID
  6. Run lsusb. You should see the CAN adapter again.

Then confirm the new firmware boots cleanly.

Start Klipper again:

Terminal window
sudo service klipper start

Then refresh Mainsail/Fluidd and confirm:

  • Deprecated code warnings are gone
  • MCU and CAN stats populate normally
  • No recurring protocol shutdown errors

If errors remain, verify USB/CAN visibility from the host:

Terminal window
lsusb

Updating from Mainsail’s Update All only updates the host. You’ll see this warning again after any Klipper update that changes the MCU protocol, so bookmark this page.

If you repeatedly see protocol shutdowns or flash instability even after clean reflashes and reset attempts, hardware failure is possible (especially from heat/stress over time).

Potential replacement paths:

If this walkthrough helped, save it in your printer maintenance notes so the next Klipper update cycle takes minutes instead of hours.

Last updated: