FluidNC Compiling - Longus/FluidNC GitHub Wiki

FluidNC Compiling

Using pre-compiled files.

The intent of this project is to remove the need to compile for most users. The compiled versions are on the releases page.

  • Go to the FluidNC project page on Github
  • Click on the releases link on the right side of the page.
  • Click on the release that you want.
  • Click on the fluidnc-v.X.X.X.zip file, (v.X.X.X is the version) to download it.
  • Unzip it in a folder on your computer. Do not try to run from inside the zip file. Make sure it is fully extracted before you start. On some operating systems, like Windows, the folder should be on native drives, not a networked folder.
  • Open that folder. The firmware is compiled different ways depending on the wireless options you want. Bluetooth and WiFi both use code space and a little extra power. Most users would choose wifi or bt Open one of the following folders
    • bt for Bluetooth
    • wifi for Wifi
  • Connect the ESP32 via USB. It is best to remove all other USB/Serial devices while installing it because it might try each one.
  • Run the install program for your computer type
    • install.bat for Windows computers.
    • install-linux.sh for Linux
    • install-macos.sh for Mac OS

Troubleshooting

  • If you get a message like Connecting .....___.....____..... and eventually times out, you may need to click the boot button on the ESP32. If that fails try it with the ESP32 out of the socket.
  • Some people have solved issues by lowering the upload speed. Try editing the file install-win.bat (or the one for your OS) and changing 921600 to 115200, then running install-win.bat.

Over the air (OTA) Updates

If you use the method above to upgrade, it will overwrite your config file. Be sure you have a copy of that file on your PC before upgrading.

If you have Wifi and the WebUI running, you can update via the FluidNC tab. This will not overwrite your config file. Click the yellow cloud icon to upload your compiled binary (.bin) file. The compiled binaries are in the bt or wifi folders of downloaded releases.

If the upgrade affects the WebUI, you will need to upload index.html.gz from the FluidNC/data folder of the repo by clicking on the green folder icon in the image above.

Use VS Code & PlatformIO to Compile

VS Code is the only method we offer support for compiling. It allows us to control a lot more things than something like the Arduino IDE. We need to control libraries and the versions. Advanced users can use other methods, but please don't expect detailed help with that.

Compile time options

FluidNC supports both WiFi and Bluetooth connectivity. These libraries have a big impact on firmware size. By default only WiFi is enabled. You can use either one, both or none by changing the platformio.ini file.

Please use git to acquire the firmware source files. This will insure the version displayed is accurate and there is way for us to see any changes you may have made. If you do not use Git, we cannot support you.

There is a line near the top deafault_envs = wifi Change it per below.

  • For Bluetooth only default_configs = bt
  • For WiFi and Bluetooth default_configs = wifibt
  • For neither default_envs = noradio

Configuring

You need to create and upload a config file to tailor the firmware to your machine. If you do not do this, you will see this message [MSG:ERR: Missing config file /config.yaml] That says it cannot find the default file called config.yaml.

In this mode you can play with a virtual 3 axis machine. You can jog it and try a few things. You cannot do anything that requires feedback from a real machine like homing, probing or reading from an SD card.

Versioning

When you compile yourself the versioning is meaningless because we do not know if any changes were made. The version string will look something like this

[FluidNC v3.1.4 (Devt-a39e92c-dirty) (wifi) '$' for help]

Whatever v3.x.x is does not mean anything significant. (Devt-a39e92c-dirty) indicates the git branch and last commit you pulled the source code from. dirty means there has been a change.