Updating the Firmware

Overview

This is a list of steps to follow when updating the Grbl firmware.
We’re currently storing the firmware and settings here:
https://github.com/HACManchester/Tools.OxCNC/tree/master/Firmware

Backup Settings / Firmware

Backup Settings

The first thing we need to do is backup the settings from the Grbl firmware / Arduino

Backup Firmware

If you want to backup the existing firmware:

Under windows (check the com port number)

cd C:\Program Files (x86)\Arduino\hardware\tools\avr\bin
avrdude -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -p m328p -P com4 -c arduino -b 115200 -F -U flash:r:C:\Apps\flash.hex:i
avrdude -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -p m328p -P com4 -c arduino -b 115200 -F -U eeprom:r:C:\Apps\eeprom.hex:i
avrdude -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -p m328p -P com4 -c arduino -b 115200 -F -U efuse:r:C:\Apps\efuse.hex:i
avrdude -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -p m328p -P com4 -c arduino -b 115200 -F -U lfuse:r:C:\Apps\lfuse.hex:i
avrdude -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -p m328p -P com4 -c arduino -b 115200 -F -U hfuse:r:C:\Apps\hfuse.hex:i

Under Linux it will be something like

avrdude -p m328p -P /dev/tty.usbserial- -c arduino -b 38400 -F -U flash:r:backup1.hex:i

Flash new Firmware

Download Files

Next we need to grab the latest firmware version

Next download XLoader

Flash Firmware

Next to flash the new Hex file to the Arduino

Restore custom settings

As a final step we need to restore any custom settings that were originally applied