Klipper on BeagleboneBlack and Replicape

I have spent a good bit of time over the last month trying to get klipper mainsail running on a BeaglBone 3C. The instructions on the Klipper3D website suggest that it is not only possible but fairly easy. It appears to be somewhat dated but still workable. I did substitute Debian 10.3 for 9.9. I was able to follow the process up to the point where the the code for the PRUs is created and installed.
Quote:
To compile the Klipper micro-controller code, start by configuring it for the “Beaglebone PRU”:

cd ~/klipper/
make menuconfig

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

sudo service klipper stop
make 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”:

make menuconfig

Then install this micro-controller code as well:

sudo service klipper stop
make flash
sudo service klipper start

This makes no sense to me. Unless a step has accidentally been omitted, I will be doing exactly the same thing in exactly the same place. What gives?

It’s the make menuconfig step that changes the target.

1 Like

Looks spooky to me but OK, I’ll try it.

The instructions I believe you are using( Beaglebone - Klipper documentation ) say to “start by configurating it for the “Beaglebone PRU”” so when you run ‘make menuconfig’ you must go in and change the Micro-controller Architecture from AVR to Beaglebone PRU and then save the configuration and exit menuconfig.

The instructions then say you have to change the menuconfiguration to “Linux Process” and build again.

So you are skipping the parts in the menuconfig tool which sets the build environment for the specific task( BB PRU or Linux Process ).

1 Like

I’m a leftover from the IBM mainframe days so everything that isn’t OS/2 based looks a bit spooky to me but thanks for the explanation.

2 Likes

Is there any way, short of hooking up a replicape and a motor (which I probably won’t have time to do before next weekend), to see if the process went OK? I ask because each time through the sequence the output ended with:

Please specify flash device
make: ***[src/avr/makefile:33 flash} error1

I don’t know if it’s critical or not.

Ah, so you never explored the EMX runtime on OS/2 which provided a full GNU environment which compiled and ran on OS/2. It was pretty amazing and kept my UNIX skills current and even had an XWindow counter part called XFree86.

But I really got to know how to use the menuconfig script when IBM gave up on OS/2 and I had to switch to Linux and back then we often had to build our Linux kernel to add drivers like SCSI and USB.

And the cool thing about doing ‘git clone http://githubcom/xUser/yProjectName’ is that if you screw up a build by messing around and trying things you can just remove the project with ‘rm -rf yProjectName’ and then clone the project again and start over. There are other ways but that a good beginner way to explore and experiment.

IBM may have given up on OS/2 but I didn’t. I currently have a follow on called Arca Noae handling communications for two DOS machines.

1 Like

If it is still saying AVR then I would think something is wrong. Your first running of ‘make menuconfig’ asked you to setup the Beaglebone PRU target so when you run ‘make flash’ it should be showing stuff being made with src/pru/… and not src/avr/…

FYI, when you are in “make menuconfig” you move around with the keyboard up/down arrow keys and select items with the space bar.

Yes, I was quite pleased when Mr Rosenthal was able to continue supporting OS/2 via his ArcaOS project.

1 Like

Don’t know the name (unless he is 'The Blond Guy"). I quit being a mainframe person in the mid 1980’s. It was always 'just work". I sucomed to my maker side and became a professional welder/machinist until I retired. EMX was likely after my time.
On the PRUs, is there any way to undo and start over?
I don’t think I mistyped but its always a possibility.

Louis Rosenthal is the guy who runs Arca Noae.

I thought it was an Italian outfit

I think it’s run out of NY since Louis had, has a consultancy business called Rosenthal and Rosenthal which did OS/2 support. I think a bunch of his clients wanted continued support and a number of other businesses so he worked a deal with IBM and has been selling and maintaining ArcaOS for many years now.

1 Like

bedtime :sleeping: :sleeping:

2 Likes

OK trying again with a charged mouse battery.
This morning I took another look at the BeagleBone instructions on the klipper website and realized I had missed an obviously critical instruction,

./klipper/scripts/install-beaglebone.sh

so I re-ran the entire installation from the beginning on a fresh mSD card. Except for an orange warning about Python 2 being DOA and I should update ASAP, the klipper installation finished smoothly except for one error warning that I presumed was for the Python problem. I then ran the PRU code generation and instalation procedure.

debian@beaglebone:~$
debian@beaglebone:~$ cd ~/klipper/
debian@beaglebone:~/klipper$ make menuconfig
Using default symbol values (no ‘/home/debian/klipper/.config’)
Configuration saved to ‘/home/debian/klipper/.config’
Creating symbolic link out/board
Loaded configuration ‘/home/debian/klipper/.config’
No changes to save (for ‘/home/debian/klipper/.config’)
debian@beaglebone:~/klipper$ sudo service klipper stop
[sudo] password for debian:
debian@beaglebone:~/klipper$ make flash
Building out/autoconf.h
Compiling out/src/sched.o
Compiling out/src/command.o
Compiling out/src/basecmd.o
Compiling out/src/debugcmds.o
Compiling out/src/initial_pins.o
Compiling out/src/gpiocmds.o
Compiling out/src/stepper.o
Compiling out/src/endstop.o
Compiling out/src/trsync.o
Compiling out/src/adccmds.o
Compiling out/src/spicmds.o
Compiling out/src/i2ccmds.o
Compiling out/src/pwmcmds.o
Compiling out/src/buttons.o
Compiling out/src/tmcuart.o
Compiling out/src/neopixel.o
Compiling out/src/pulse_counter.o
Compiling out/src/lcd_st7920.o
Compiling out/src/lcd_hd44780.o
Compiling out/src/spi_software.o
Compiling out/src/i2c_software.o
Compiling out/src/thermocouple.o
Compiling out/src/sensor_adxl345.o
Compiling out/src/sensor_angle.o
Compiling out/src/sensor_mpu9250.o
Compiling out/src/avr/main.o
Compiling out/src/avr/timer.o
Compiling out/src/avr/gpio.o
Compiling out/src/avr/adc.o
Compiling out/src/avr/spi.o
Compiling out/src/avr/i2c.o
Compiling out/src/avr/hard_pwm.o
Compiling out/src/avr/watchdog.o
Compiling out/src/avr/serial.o
Compiling out/src/generic/serial_irq.o
Building out/compile_time_request.o
Version: v0.11.0-251-gfee385da
Linking out/klipper.elf
Creating hex file out/klipper.elf.hex
Flashing out/klipper.elf.hex to via avrdude
Please specify FLASH_DEVICE
make: *** [src/avr/Makefile:33: flash] Error 1
debian@beaglebone:~/klipper$ make menuconfig
Loaded configuration ‘/home/debian/klipper/.config’
No changes to save (for ‘/home/debian/klipper/.config’)
debian@beaglebone:~/klipper$ sudo service klipper stop
debian@beaglebone:~/klipper$ make flash
Flashing out/klipper.elf.hex to via avrdude
Please specify FLASH_DEVICE
make: *** [src/avr/Makefile:33: flash] Error 1
debian@beaglebone:~/klipper$
debian@beaglebone:~/klipper$ sudo service klipper start
debian@beaglebone:~/klipper$

This is a complete listing except for the 2 AVRdude programming pages that popped up, one after each ‘make menuconfig’ input. Having no instructions to input anything I used the ‘ESC’ option and bypassed them. The two Error notifications are the same as I encountered before. Are they a problem or should I ignore them?

There must be a configuration mistake; avrdude isn’t used for the PRU on the BeagleBone. That’s specifically for writing to AVR processors, such as are used in Arduino.

Provide the link you are using and maybe someone here can catch what you are missing.

But also, you might consider asking on the Klipper forum, where there are many more people familiar with Klipper, since it is dedicated to Klipper.

The klipper instructions are here:
https://www.klipper3d.org/Beaglebone.html?h=bea

I thought AVRdude was a bit odd too but given how many other devices the Arduino IDE supports now maybe … ?

I tried the klipper forum and the klipper discord channel and the BeagleBone forum and the ‘replicape forum’ (non-existant) but the most recent BeagleBone-Replicape activity seems to center on this forum and Jon Charnas so I posted here too.

Yeah, @Jon_Charnas and @Elias_Bakken both may have specific knowledge here. My Replicape died years ago (a known problem apparently) so I don’t have direct knowledge to help here. :frowning:

Yeah, uh, if you follow the klipper instructions, they’re out of date, especially on the base BBB image to be used.

If you look through the Refactor GitHub (GitHub - intelligent-agent/Refactor: Linux distro for 3D-printers) you should be able to find a replicape image with either octoprint or mainsail as a frontend. Those images are too large to fit in the emmc, so they’ll run off the SD card only.

You can get more direct help from the intelligent agent discord, as well. The link should be on the iagent.no website.

1 Like