JGMaker Magic on Sale for $208, with $20 instant discount coupon!.
How To: Compile your own custom Marlin 2.0 firmware for JGAurora A5S and A1
Custom Marlin 2.0 Firmware for JGAurora A5S & A1
- Download and install Python 2.7.
- Download and install Git.
- Download and install GitHub Desktop.
- Download and install VSCode.
- Open Github desktop, and clone a new repository.
- Use the URL: https://github.com/pinchies/Marlin.git Broken!
- Use the URL to clone: https://github.com/MarlinFirmware/Marlin.git
- After cloning, switch the branch, and choose the "bugfix-2.0" branch (important!!)
- Copy the correct "Configuration.h" and "Configuration_Adv.h" files for your printer, from the /Github/Marlin/config/examples/JGAurora/ folder, and place them in the /Github/Marlin/Marlin/ folder (alongside the Marlin.ino file), replacing the existing files.
- The firmware source code will then start to download. When finished, you should now have a folder:
- Open VSCode, and install the PlatformIO plugin. Detailed instructions are here. It may take some time to complete the installation as various components are download and compiled. You will need to restart VSCode once this is completed.
- Open the Marlin folder as your workspace.
- Edit the file "platformio.ini", which is found in the Marlin . Change line 16, from "default_envs = mega2560" to "default_envs = jgaurora_a5s_a1".
- Compile your project, using the Build button. It may take some time as various components are download and compiled.
- You will now have compiled firmware, ready for use! You can find the compiled firmware in the main Marlin folder, inside an hidden folder: \Documents\GitHub\Marlin\.pio\build\jgaurora_a5s_a1
Installing the custom firmware
Installing the firmware via SD Card
The file firmware_for_sd_upload.bin, is ready to go, and can be put onto an SD card for automatic flashing. This process is 100% reversible, and you can load the factory firmware back on, at any time.
- Place the bin “firmware_for_sd_upload.bin” onto the SD card.
- Turn off the printer, and unplug it from the wall.
- Wait 30 seconds.
- Insert the SD card.
- Plug in and turn on the printer. Flashing will occur automatically.
The file with bootloader is only to be used if flashing a blank motherboard, as it includes the bootloader that is responsible for handling the SD card upload process. This means there is nothing to worry about if you want to experiment with creating your own firmware without the bootloader, as you can reinstall it later on. To flash the full firmware you will need a SWD programmer (a ST-link clone off ebay costs $5 or less).
Flash Firmware via ST-Link
To use an ST-link to upload firmware:
- Connect the GND, SWDIO, SWCLK pins on the motherboard, with the ST-Link. Do not connect the 3.3V pins.
- Then, plug the printer into your computer with a USB cable.
- Download and then install the ST-Link software tool (STSW-LINK004). Free registration is required.
- Open the program, STM32 ST-LINK UTILITY.
- Load the desired .BIN file, with bootloader.
- Connect to the board.
- Select the option to start flashing.
- Wait for flashing to complete...
- Success! You've flashed your firmware.
Original A5S Source Code
The original factory JGAurora firmware is based off the open source Dlion firmware project. That project which was an implementation of (a very old version of) the Marlin firmware, within a OpenRTOS project, with a touch interface. JGAurora created their current firmware from this project, but changed the interface side substantially. For more into this topic, you may want to read this blog post about the Dlion firmware. It is still actively used in some 3D printer models today!