RE: Trying to Build Marlin on the BeagleBone Black


I have been using PlatformIO for a short period of time to put the Marlin source on my BBB Linux SBC with vscode.

I have been unsuccessful so far.

Has anyone you know of gotten to get this source on the BBB for executing machinery?


Please state the exact error you’re being displayed by PlatformIO.

Hello Sir,

Let me tell you a bit about my set up first. I have the command line interface on the BBB and I open up a terminal on the vncserver VNC Viewer software on my development desktop.

I will reply once I rerun the program and get the error again. Please forgive me. The board is not on right now.


P.S. If working with pio core and the command line works w/ the BBB, okay. I will get the error messages soon. Thank you.


I have done so much testing, I am not sure where to start. So, I will start w/ the set up of platformio.ini.


P.S. Please view the instance here in this paste service: My_platformIO set up for the BBB or BBAI... -

Also…here is my Configuration.h for Marlin: Configuration.h on Marlin -

Okay those are platformio.ini files and a header file for Marlin, but no error message. I’m not 100% sure what you’re trying to do. Compile Marlin on the BBB and also for the BBB as the thing that’ll run the Marlin firmware, or use the BBB to compile the Marlin firmware, e.g. for an LPC1768 based board?

Hello @maxgerhardt,

I am trying to install the Marlin firmware on the BBB with platformio.ini. Is that not how it works? I am new and looking for guidance. I will supply a photo of the error soon.

I do not know if I should use pio for setting up Marlin or not.


So just to 100% confirm, your BBB is directly connected to the motor axis (X,Y,Z) drivers, sensors (e.g. temperature, end-stop), LCD, heating bed MOSFETs, spindle feeder etc? You are building your own 3D printer with a BBB as the central controller?

Yes PIO is definitely the right tool as Marlin is primarily built with PlatformIO. (Also buildable with the Arduino IDE but with restrictions I think)


Yes…the BBB has all the item attached to it, i.e. actuators and sensors. No LCD, though. Yes, the BBB as a central controller for Marlin built by pio/PlantformIO is the task at hand.


I see. Yes you’re on the right track there with that [env:linux_native] environment and using platform = native. You may want to compile the simple example program as listed in the documentation first to sanity-check whether compiling works okay in general.

Judging by -IMarlin/src/HAL/LINUX/include and the stuff in Marlin/Marlin/src/HAL/LINUX at 2.0.x · MarlinFirmware/Marlin · GitHub, Marlin seems to have… some… support for Linux. But if I read the main() function, compiling natively on Linux is just being used for simulating or debugging some functions, not actually fully running Marlin.

I e.g. don’t see any code for calling into the SPI oder I2C APIs of the Linux kernel. The GPIO code is also just internally simulated and doesn’t actually write to hardware GPIOs.

Seems like noone has run the full Marlin software on an embedded Linux board yet? Then even more exciting, you can be the first one to achieve this is you want to port it :).

The people at Marlin (Issues · MarlinFirmware/Marlin · GitHub) or a related forum might be good resources for you.

Edit: I’ve also found the start of an implementation of the Arduino core for beagle bone black, that implements some functionality. GitHub - LiangZhang0924/Userspace-Arduino: Provide a Linux Userspace environment for compiling Arduino style wiring/process sketches to run under Linux

Yes Sir,

Thank you for the heads up. I was unaware of this fact. I guess porting Marling to a Linux SBC might be more complicated than previously thought. Hmm.

I wonder what is available that I can use pio to port to the BBB (Linux SBC).


P.S. Anyway, thank you and I will try the Marlin people for ideas for now.


Also…I have a Cape that I may be able to use w/ a STM_F030R8 on it. I saw a pio porting guide for similar chips in the examples.

Do you think that writing to this chip on the Cape is possible?


As linked above, you can still use the PIO build system for native programs; That comes in handy when porting Marlin which already runs on PIO.

Yeah there are projects which e.g. use a Raspberry Pi to do some work and connect it to another MCU, e.g. an STM32F103C8, to do real-time critical stuff, as that is hard to do on a full-blown Linux operating system (even with RT Linux / PREEMPT_RT). See e.g. how about 3D printer firmware marlin runs on raspberry pi directly - YouTube and the linked github page.

What is “the Cape”?


The people call their daughter cards/add-on boards a Cape. For instance: - Capes.

It adds functionality as I am sure you are aware of this fact. Things like motors or sensors…

I have a Motor Bridge Cape with the M_F030R8 on it from '15. It was made by Seeed Studio years ago, i.e. five years ago to be exact. Anyway, I still use it for Maker Faires and setting up specific motor uses.


Hello Sir,

@maxgerhardt: See here for the older script that used to flash the STM_F030R8.

MotorBridgeCapeFirmware/ at master · Seeed-Studio/MotorBridgeCapeFirmware · GitHub

It used to work. I have not been able to make it work recently.


P.S. I have to perform some cancellations and comment some uboot-overlays to figure out some of my error codes but I should be able to flash it again one day w/ this script.

Well you can try and compile Marlin for the STM32F030R8 of that cape, but I don’t see that exact chip being supported in Marlin’s platformio.ini. Also according to its datasheet the chip only has 64kB of flash and 8kB of RAM, which isn’t really much for a 32-bit microcontroller. I doubt that Marlin will fit on that chip (of course this also depends on the enabled features…). The only STM32F0 series chip in Marlin I’m seeing is a STM32F070RB with 128kB of flash and 16kB of SRAM. The usual lower bar is something like an STM32F103RB with 256kB of flash and 48kB of SRAM.


Thank you for making me understand. I was unfamiliar with what size requirements Marlin had in space and size.


P.S. You are most likely right. This chip just does not have the capabilities to handle the firmware.