Saturday, March 07, 2020

Workflow to compile Marlin on a SBC

I am going to try a new thing. I have a few single board computers on hand, and I am going to use them to compile Marlin. This is a note to self in case I forget the workflow.

So, the workflow is likely to be:
git clone https://github.com/MarlinFirmware/Marlin.git
to get the Marlin repository.

Then,
cd Marlin
git checkout bugfix-2.0.x
to get to the bugfix-2.0.x branch.

Edits to Configuration.h and Configuration_adv.h will be made as necessary, the compiled using PlatformIO on VS Code.

To pull the latest changes:
git checkout -- .
to get rid of all previous changes.

git pull
to get the latest code.
Then make changes.

2 comments:

Teck said...

Some compile time comparison.

On my Linux PC (with many apps running, tons of Chrome tabs, etc.), Marlin took around 12 minutes 49 seconds to compile.

On the Jetson Nano, 6 minutes 28 seconds.

On the Raspberry Pi 4B running 64-bit Ubuntu, 10 minutes 53 seconds.

May not be the most scientific of comparisons, but I tried to keep the test conditions as similar as possible.

Teck said...

To make it easier to compile different sets of configuration files over several computers, I am using a Nextcloud server to host files. I have made a directory with Marlin configuration files (one folder for each set of board/printer combination). On that same Nextcloud server, I have a Marlin folder for my Jetson Nano, one for the RPi4B, and one for the Linux PC.

I have GitHub Desktop running on the Linux PC, which will be used to revert and fetch the 3 repos. Nextcloud will then sync them so that the Jetson Nano and RPi4B can have the correct "fresh" repo for compiling. Even Meld can run on my Linux PC to allow me to compare files and directly update the configuration files. All that needs to be done is for me run VSCode on the Jetson Nano and RPi4B, and start the build tasks from there.