Thursday, January 23, 2020

My new workflow for updating Marlin configuration files

In the past, I used to update my Marlin configuration files manually. Open up the configuration files in a text editor, and go through them line by line. This was tedious because Marlin is under active development, and the configuration files do change from time to time.

Then I came upon Meld, which helps to significantly ease the comparison between newer versions of the configuration files and what I have already configured by hand. I still need to fetch the latest updates to the Marlin repository, then run Meld. It is a cycle of
git stash
git pull
and then Meld. Because I have a few sets of configuration files, I ended up maintaining several copies of Marlin, one for each set of configuration files.

Recently, I started using GitHub Desktop (I had known its existence for a while, but never got down to using it). And it really made my life so much easier.

The new workflow?

  • Use GitHub Desktop to discard all changes.
  • Pull changes from the main Marlin repository. These can be done with mouse clicks instead of using the terminal.
  • Run Meld to make changes to the new version of the configuration files. At the same time, use Meld to update my old configuration files (which I store away in a separate directory). At the end of the process, the two sets of configuration files would be identical. Basically, a two-way merge.
  • Save the files.
  • Compile in VSCode.
  • Copy firmware.bin to another directory, and rename it so that I know what it was compiled for. This file will be uploaded to my printer at another time via OTA using the webUI.
  • Repeat the process for the other sets of configuration files that I have.


Background: The reason why this process of updating configuration files is tedious for me is because I have at least four sets of configuration files:

  1. MRR ESPA (native pins only) board for Ender-3
  2. MRR ESPE (I2S) board for Ender-3
  3. MRR ESPA (native pins only) board for coreXY modified FLSun Cube
  4. MRR ESPE (I2S) board for coreXY modified FLSun Cube
For Linux users, a version of GitHub Desktop for Linux can be found here. Available as rpm, deb, or it can also be installed via snap.

No comments: