Skip to content

Instantly share code, notes, and snippets.

@bu5hm4nn
Last active December 18, 2022 07:04
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bu5hm4nn/3cdc7e567a3595264cd9a556288d69ca to your computer and use it in GitHub Desktop.
Save bu5hm4nn/3cdc7e567a3595264cd9a556288d69ca to your computer and use it in GitHub Desktop.
Flash Bootloader to Creality Ender 3 Pro (ATMega1284p, Melzi, Sanguino) using a Raspberry Pi only

My raspberry is running Raspbian

  1. 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 with atmega1284p

  2. 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment