Tested on Windows 10 based on this tutorial (French)
- Install Git for Windows. Prefer 64 bits installer. Default settings are OK.
- If changing settings during install, make sure to keep Git in PATH: "Git from the command line and also 3rd-party software".
- Install Python. Make sure to add python.exe to PATH when installing.
- Install Visual Studio Code. Default settings are OK. Launch Visual Studio Code
- Install Auto Build Marlin in Visual Studio Code
- Ctrl+Shift+X, then type
Auto Build Marlinin search field and clickInstall. Wait for install to complete.
- Ctrl+Shift+X, then type
- Install PlatformIO IDE in Visual Studio Code
- Ctrl+Shift+X, then type
PlatformIO IDEin search field, make sure it is already installed. Auto Build Marlin should have it as dependency, so Visual Studio Code should have installed it already.
- Ctrl+Shift+X, then type
- Close Visual Studio Code to make sure it finishes installing add-ons
There are additional set-up steps that take place once you open the project for the first time:
- Clone the repository (or download it as zip)
- Preferably in a simple folder path such as
C:\MarlinFirmware, to avoid issues with long paths, spaces or special characters in path. - To make sure the project was cloned or extracted correctly, check that folder contains a
platformioINI file.
- Preferably in a simple folder path such as
- Open the project folder in Visual Studio Code
- Use keyboard shortcut Ctrl+K (nothing happens) then keyboard shortcut Ctrl+O (prompts for folder). Navigate to folder and click
Select Folder.
- Use keyboard shortcut Ctrl+K (nothing happens) then keyboard shortcut Ctrl+O (prompts for folder). Navigate to folder and click
- Visual Studio asks to trust the project folder. This is required for compiling the project.
- Look to the Visual Studio Code status bar: It should download and install dependencies in the background. Wait for this process to complete, it may take a while.
- Example: "PlatformIO Installer: Installing PlatformIO Code".
- PlatformIO may ask you to restart Visual Studio Code. If so, close it and relaunch it to continue the configuration process.
- Once Visual Studio Code completed all the tasks, proceed to configure firmware
Once you have the project loaded in Visual Studio Code, let's configure it for your printer:
-
Open
platformio.iniand uncomment the correct motherboard revision by removing the leading#.- There must be exactly one uncommented line so make sure to comment the others.
default_envs = mks_robin_nano35 # For MKS Robin Nano V1.2
#default_envs = mks_robin_nano_v1_3_f4 # For MKS Robin Nano V1.3
#default_envs = mks_robin_nano_v3_usb_flash_drive # For MKS Robin Nano V3-
In
Marlin>configuration.h, adjust printer model:- Adjust printer model by removing the leading
//. There must be exactly one uncommented printer model so make sure to comment the others.
- Adjust printer model by removing the leading
#define D12_230_v1_2
//#define D12_230_v1_3
//#define D12_500_Pro
//#define D12_300_Pro- Still in
Marlin>configuration.h, enable or disable settings:
// Enable this if your printer has a 3D Touch
#define BL_TOUCH
// Enable this if your printer has a Direct Drive extruder
//#define Direct_Drive
// Enable this if you replaced all A4988 drivers with TMC2209
//#define D12_230_FULL_TMC
// Enable for printers capable of handling two extruders
#define Dual_ExtruderNote: Dual_Extruder can be enabled even if the printer currently has only one extruded installed. However, other settings must match exactly your printer configuration.
- Once firmware is configured, proceed to build the firmware
Finally, you can build your new firmware:
- Click on the little ✔ checkmark in status bar or use Ctrl+Alt+B keyboard shortcut
- Wait for build to complite. This can take a while.
- Go to
<project folder>\.pio\buildto find your firmware
- For MKS Robin Nano V1.2:
<project folder>\.pio\build\mks_robin_nano35\Robin_nano35.bin
Flashing the firmware is pretty straightformward:
- Take an empty micro SD card
- Place firmare file on SD card
- Insert SD card in 3D printer
- Turn on 3D printer
Note: On my printer, I sometimes had freezes while flashing the firmware. I needed to turn off the printer, reinsert the micro SD card in computer, delete any leftover files, copy again the firmware file, and try again.