Project

General

Profile

Support #950

Updated by Daniel Curtis over 3 years ago

{{>toc}} {>toc} 

 This is a guide in setting up an Arduino Uno on Arch Linux to flash the Marlin 3D printer firmware on an Ender 3. 

 h2. Install Bootloader 

 !>https://project.altservice.com/attachments/download/273/pinout-thumb.webp! 

 h3. Setup Environment 

 * Open the Arduino IDE on your computer. 
 * Go to +File -> Examples -> ArduinoISP+ and select *Arduino ISP* and open it up. 
 * Go to +Tools -> Manage libraries+ and install the *U8glib* Library. 

 h3. Install Sanguino: 

 * Go to +File -> Preferences+ 
 * In the _Additional Boards Manager URLs_ field, add https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json 
 * Click the *OK* button. 
 * Go to +Tools -> Board -> Boards Manager+ 
 * Click *Install* on _Sanguino by Kristian Sloth Lauszus_ 

 h3. Flash ArduinoISP 

 * Plug in Arduino Uno 
 * Go to +Tools -> Board -> AVR Boards+ and select *Arduino Uno* as the board 
 * Go to +Tools -> Board -> Port+ and select */dev/ttyACM0* (or appropriate port) 
 * Click *Upload* 

 h3. Flash Bootloader 

 |_. Ender |_. Arduino | 
 |MISO|Pin 12| 
 |5V|5V| 
 |SCK|Pin 13| 
 |MOSI|Pin 11| 
 |RESET|Pin 10| 
 |GND|GND| 

 * Change directory to the following path: 
 <pre> 
 cd ~/.arduino15/packages/Sanguino/hardware/avr/1.0.3/bootloaders/optiboot 
 </pre> 

 * Edit the Makefile.isp file: 
 <pre> 
 nano Makefile.isp 
 </pre> 
 #* And modify the following lines, adding the *-F* flag: 
 <pre> 
 #    Set fuses and unlock memory 
 ISPFUSES      = $(AVRDUDE_ROOT)avrdude $(AVRDUDE_CONF) -c $(ISPTOOL) -F \ 
               -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \ 
               -e -u -U lock:w:0x3f:m $(EFUSE_CMD) \ 
               -U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m 
 # program flash and lock memory. 
 ISPFLASH      = $(AVRDUDE_ROOT)avrdude $(AVRDUDE_CONF) -c $(ISPTOOL) -F \ 
               -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \ 
               -U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x2f:m 
 </pre> 

 * Flash the 16MHz ATmega1284 bootloader: 
 <pre> 
 make atmega1284p_isp ISPPORT=/dev/ttyACM0 
 </pre> 

 *WARNING*: The following method is obsolete and flashing the bootloader must be done manually. 

 -* Select *Sanguino* board from +Tools -> Board -> Sanguino-avr+. 
 * Open the Ender 3’s control box and connect it to the Arduino as follows: 
 *NOTE*: If a blue light flashes on the Creality board then it is wired correctly 
 * Click *Burn Bootloader* from the +Tools+ menu; success will show ‘Output bootloader burned successfully’. 
 * Disconnect the wires and reassemble the Ender 3. 
 * Unplug the Arduino from the computer.- 

 --- 

 h2. Install Marlin Firmware 

 !>https://project.altservice.com/attachments/download/272/uno-thumb.webp! 

 * Download and extract the latest version of Marlin firmware: 
 <pre> 
 mkdir marlin && cd marlin 
 wget https://github.com/MarlinFirmware/Marlin/archive/2.0.x.zip 
 unzip 2.0.x.zip 
 </pre> 

 * Download and extract the example configurations folder: 
 <pre> 
 wget https://github.com/MarlinFirmware/Configurations/archive/release-2.0.7.2.zip 
 unzip release-2.0.7.2.zip 
 </pre>  

 * Copy the Ender 3 example configurations to the Marlin folder: 
 <pre> 
 cp Configurations-release-2.0.7.2/config/examples/Creality/Ender-3/CrealityV1/* Marlin-2.0.x/ 
 </pre> 

 * In the Arduino IDE go to +File -> Open+ and navigate to _marlin/Marlin-2.0.x/Marlin_ and open *marlin.ino*. 
 * You are now ready to upload. If you wish to add bilinear bed leveling, go to the next step. Otherwise, make sure you have the printer plugged in via USB, the port is correct and the board is Sanguino. Then click the upload button. If that completes in the shell you are finished. 
 * Unplug the printer from the computer and plug it into the power socket. Be aware the printer may take longer to boot up than usual. 


 h2. Resources 

 * https://marlinfw.org/docs/basics/install_arduino.html 
 * https://github.com/MarlinFirmware/Marlin 
 * https://github.com/Lauszus/sanguino/ 
 * https://all3dp.com/2/ender-3-with-marlin-how-to-install-marlin-firmware-on-your-ender-3/ 
 * https://forum.arduino.cc/index.php?topic=625108.0 
 * https://forum.arduino.cc/index.php?topic=621502.0

Back