How to compile the Firmware

In order to...

compile / build the firmware for the SMuFF, you must have Microsoft Visual Studio Code (VSCode) and the PlatformIO extension for VSCode installed on your computer!

Important note, please read!

Before you install the PlatformIO extension in VSCode, head over to Python.org and download the latest Python version (3.x) and install it. Make sure you've read the notes shown here before you start. It's also important to tick all the options / features when installing Python, especially ensure it's being installed into the "Program Files" folder of your PC and the PATH variable is being set, i.e.: 

If you ignore this step, the Firmware-Build-Configurator won't show up as you try building the SMuFF firmware. After Python has been installed, restart your PC before you move on installing VSCode.

If you've followed the instructions above steps by step but you're still getting errors when starting the build, go into the folder \Users\{your account}\.platformio\penv and open the file pyvenv.cfg. Make sure the paths are configured correctly pointing at the (freshly) installed Python, i.e.: 

home = C:\Program Files\Python312
include-system-site-packages = false
version = 3.12.0
executable = C:\Program Files\Python312\python.exe
command = C:\Program Files\Python312\python.exe -m venv C:\Users\{your account}\.platformio\penv

Another important thing to note:

Please make sure you've copied the SMuFF firmware after downloading it into either your Documents folder or some project specific folder where your user account has full access rights. Also, make sure that there are no spaces in that folder name, otherwise PlatformIO might complaint when starting the build! 

If you're setting up VSCode / PlatformIO for the very first time on your computer, please also install the GIT tool before you use it. You can download the GIT tool here for Windows, here for Linux and here for MacOS.

All these tools can be downloaded for free and are needed because VSCode will download certain libraries/packages while building the SMUFF firmware.

If you've never worked with VSCode / PlatformIO before but you're familiar with the Arduino IDE, here's a nice video tutorial titled "How to Program Arduino in VSCode (Using Platform.io)" for you to watch.

To compile the firmware...

click on the PlatformIO icon in the leftmost toolbar (the Alien - or is it an Ant? ) and make sure the PROJECT TASKS tree is open. 

Please notice: Each controller board has its own build environment which tells the compiler some specific settings for building the firmware. Hence, it's important for you to pick the one that matches your controller board.

In contrast to previous versions of the firmware (< 3.24) you don't have to set any of the options directly in platformio.ini  before you run the build.

Open up the tree of the build environment you're tackling, click on Build and you'll get the Firmware-Build Configurator dialog window, in which you're able to decide which options shall be included and which not.

Firmware-Build Configurator 

The Display and Main Options are the most important ones you have to focus on. Leave the Misc. Options as they are by default, unless you're instructed to do otherwise.

Each option has a tooltip, that pops up as you hover the mouse over it, which briefly explains what it's good for. 

Pick the options according to your setup and click "Start Build" when you're done.


Wait for the build to finish (VS-Code will spit out a SUCCESS message), open a file explorer and go to the \SMuFF\.pio\build\{NAME_OF_THE_BUILD_ENVIRONMENT} folder. This one contains the freshly build firmware.bin, which needs to be copied onto the SMuFF's SD-Card. 

Other files needed

Along with the firmware.bin file, you need a copy of all of the configuration files located in the SMuFF\Configs folder. Copy those to the root folder of your SD-Card (Be aware: Since version 2.22 you don't have to rename the files to .CFG anymore).
After that, copy the folders help, menus, options, sounds and test located in the SMUFF project folder to your SD-Card as well. 

When you're done, the content of your SD-Card is supposed to look as shown in the picture to the left.

Important: In case you're using TMC drivers on your controller board (which is always the case for the SKR E3 V1.2 and 2.0 controller boards), open the TMCDRVR.json file with a text editor and set the Mode option to 1 (which stands for UART) on the Selector and Feeder stepper driver.

Insert the SD-Card into the SMuFF , hit the RESET button and wait until flashing the firmware has finished and the SMuFF boots up.

If the SMuFF doesn't boot up as expected, the easiest way to find out why, is to connect your PC to the SMuFF via a serial interface as instructed here and head over to the Troubleshooting page.