Klipper/Fluidd on Beaglebone Black with Replicape

Introduction

A number of years ago I bought a Replicape 3D printer cape to go on my Beaglebone Black, however I was never able to get it running properly so never ended up using it. I came across it again recently and started looking into it again and discovered that Klipper will run on a Beaglebone Black and has firmware for the Replicape. I started trying to get it setup only to get errors when following the Klipper/Replicape instructions. By piecing together bits and pieces from across the internet I managed to get it all to install correctly and thought that I would put the instructions online to help others.

I haven’t tried out the BBB/Replicape yet however, as after working all of this out it turns out my Replicape has suffered some corrosion sitting around for the last few years and I will need to try and fix it before I can try it out. So let me know if you have some success with these instructions.

Install latest IOT Linux release

You will need to install the latest IOT Debian image for the Beaglebone Black. You want the SD image not the EMMC Flasher image. The onboard 4GB EMMC is not large enough to install everything so you will have to boot from the SD card. I used a 16GB SD card for this.

As of today (07/09/2023) the following is the latest image.
https://www.beagleboard.org/distros/am3358-debian-10-3-2020-04-06-4gb-sd-iot

Flash this to the SD card using image writing software – Raspberry Pi Imager, Balena Etcher, Rufus, etc.

Install the SD card, connect the ethernet cable and apply power. The BBB should boot from an available SD card before going to the onboard EMMC.

Once booted use ‘ssh’ to login to the BBB

ssh debian@beaglebone.local
or
ssh debian@IPaddress

The default username is ‘debian’ and the default password is ‘temppwd’.

Update Linux

Once you have logged in you might want to run an update.

sudo apt updatesudo apt upgrade

Expanding File System Partition On A microSD

After the update you will want to expand the file system to encompass the entire SD card.

sudo /opt/scripts/tools/grow_partition.sh

Klipper Installation And Update Helper ‘KIAUH’

The easyest way to install Klipper and Fluidd is with the ‘Klipper Installation And Update Helper – KIAUH’.

I copied these instructions from https://github.com/dw-0/kiauh

Install KIAUH

  • Step 1:
    To download this script, it is necessary to have git installed. If you don’t have git already installed, or if you are unsure, run the following command:
sudo apt-get update sudo apt-get install git -y
  • Step 2:
    Once git is installed, use the following command to download KIAUH into your home-directory:
cd ~ && git clone https://github.com/dw-0/kiauh.git
  • Step 3:
    Finally, start KIAUH by running the next command:
./kiauh/kiauh.sh
  • Step 4:
    You should now find yourself in the main menu of KIAUH. You will see several actions to choose from depending on what you want to do. To choose an action, simply type the corresponding number into the “Perform action” prompt and confirm by hitting ENTER.

Follow the menus to install –

  • Klipper
  • Moonraker
  • Fluidd

Replicape

To setup the system to use a ‘Replicape’ Cape use the following instructions.

Installing pru-gcc On Beagleboard Debian

You might want to do an update first

sudo apt-get update

You will need to remove gcc-avr first, don’t know why but it won’t work otherwise.

sudo apt remove gcc-avr

Then install gcc-pru

sudo apt-get install gcc-pru gnuprumcu

Building the micro-controller codeΒΆ

To compile the Klipper micro-controller code, start by running ‘menuconfig’ and configuring it for the “Beaglebone PRU” in the menu options:

cd ~/klipper/ make menuconfig

To build and install the new micro-controller code, run:

sudo service klipper stopmake flash sudo service klipper start

It is also necessary to compile and install the micro-controller code for a Linux host process. Configure it a second time for a “Linux process” in the menu options of menuconfig:

make menuconfig

Then install this micro-controller code as well:

sudo service klipper stop make flash
sudo service klipper start

Now copy the Replicape printer.cfg file to the correct location

cp ~/klipper/config/generic-replicape.cfg ~/printer_data/config/printer.cfg

browse to BBB IP address or beaglebone.local and you should see the Fluidd web page.

Share