Raspberry pi crashing during "make" command

Basic Information:

Printer Model: Enderwire
MCU / Printerboard: BTT SKR2
Host / SBC Raspberry Pi 5
klippy.log klippy.log (1.2 MB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

I have recently acquired a EBB2209 USB kit for the stealthburner i was building.
I wanted to compile and flash the firmware for the EBB but it crashes every single time when i compile it but also when i compile for my SKR2.
I have since completely reinstalled Klipper but with no avail.
after hours and hours of testing and googling im at my wits end.
If anyone has any tips id be very happy.

What does “crashes” mean?
If there are any errors during the compilation (make) of the firmware, then copy and paste the output formatted as code here.

It gets stuck at “linking out/klipper.elf” and becomes unresponsive. Im only able to use the ssh console again once i powercycle the rpi.

When reissuing the make command following a hard reboot and a failed compilation it shows me some errors, but they differ:
sometimes this:

objcopy: error: the input file 'out/src/sched.o' is empty
make: *** [Makefile:79: out/src/sched.o.ctr] Error 1

and sometimes with other errors i cannot reproduce right now…

full sdcard?

Sadly not the issue it has 20GB free

can you do something like:
make 2>&1 | tee build.log
and upload a zipped log

If the RPi completely freezes and no SSH connection is possible anymore, this likely points to either a defective or dying SD card or even a defective RPi.

The errors you receive when trying to continue the failed initial make are most probably just the consequence of the earlier failure. make is not forgiving enough to simply continue from within a trashed compile attempt.

In any case, you should use:

make clean
make distclean
make menuconfig

I’ve tried that before and now again but doesnt help, i have now swapped out the SD card aswell and made a fresh barebones install of Klipper with default configs and im getting the same result :frowning:

i tried it and it also just crashes at Linking out/klipper.elf without producing any files

The make command is a user-space application, which means it does not interface with lower levels in Linux. If such an application crashes the entire OS, then something is badly amiss and almost certainly related to:

  • A completely messed-up Linux installation (although this is rather unlikely).
  • Some hardware issues, like the SBC itself, SD card, power supply, etc.

Attach the ~/klipper/.config file here.
FWIW, I just built with the settings for a BTT SKR 2 board, and it works perfectly.

Version: v0.13.0-120-gb1011e3fb
  Preprocessing out/src/generic/armcm_link.ld
  Linking out/klipper.elf
  Creating hex file out/klipper.bin

the zip of the clean new installation if thats what you mean
config.zip (300.1 KB)

what confuses me a lot is that with klipper v0.12.0-263-g0087f04c it worked but with the newest version it just doesnt

What OS are you using for your rPi 5?

im using Raspberry Pi OS Lite (64bit)
according to the kiauh setup

1 Like

I’d be rather surprised if the make process runs when going back to this version. You can try:

sudo service klipper stop
cd ~/klipper
git checkout 0087f04cc370cd542069940f0ed10c583de158ee
make clean
make distclean
make menuconfig
make

No. I meant the single file ~/klipper/.config

What you could also do is run some stress tests on your system. If it crashes as well, then you know you have a hardware issue:

# Install sysbench
sudo apt update
sudo apt-get install sysbench
# CPU
sysbench cpu --cpu-max-prime=20000 --threads=4 --time=120 run
# Memory - Adapt Memory as needed
sysbench memory --memory-total-size=1G --threads=4 --time=120 run
# Filesystem and I/O
sysbench fileio --file-total-size=1G prepare
sysbench fileio --file-total-size=1G --file-test-mode=rndrw --time=120 --threads=4 run
sysbench fileio --file-total-size=1G cleanup

Run one at a time, or if you want to be bad to your RPi, run multiple in multiple SSH sessions.

ok so it crashes as soon as it says “Threads started!”

heres the file but its completely empty

.config.zip (148 Bytes)

Well, I’m not surprised.
As stated before, there is practically no way that make would crash the OS if running on a stable machine. Most likely your issue is something from the points stated above.

Additionally, there is no meaningful way to debug this. All you would probably see is a strange kernel panic message, and without the proper knowledge, there’s nothing you can do. If you still want to try, find some pointers in this discussion.

I’d start with:

  1. Replace the SD card with a new, high-quality one.
  2. Remove all other hardware, e.g. webcams etc from the SBC
  3. Use the latest Raspberry Pi Imager to set up the card with Raspberry Pi OS Lite.
  4. Run apt update && apt full-upgrade.
  5. Reboot.
  6. If this doesn’t fix the issue, replace the power supply (good quality, min 5A).
  7. If the problem persists, consider replacing the RPi.

If you need to replace the RPi, you could save some money, since Klipper won’t benefit from the computational power of an RPi 5. I’d recommend sticking with RPis, as they are still the safest option, especially for Linux beginners.