My raspberry is running Raspbian
-
Setup avrdude on Raspberry following this guide: http://archive.today/U0WzQ
The wiring diagram works exactly the same for the Creality Melzi board
To run the test, replace
atmega328p
withatmega1284p
-
I followed the programming commands from klipper3d.org
Download the bootloader:
wget 'https://github.com/Lauszus/Sanguino/raw/master/avr/bootloaders/optiboot/optiboot_atmega1284p.hex'
flash the bootloader and set the fuses
avrdude -c linuxgpio -p atmega1284p -e -u -U lock:w:0x3F:m -U efuse:w:0xFD:m -U hfuse:w:0xDE:m -U lfuse:w:0xFF:m avrdude -c linuxgpio -p atmega1284p -U flash:w:optiboot_atmega1284p.hex avrdude -c linuxgpio -p atmega1284p -U lock:w:0x0F:m
If this succeeds you can now flash the board over USB using avrdude from your PC (Or using PlatformIO, Arduino IDE, etc)