
The CORRECT instructions. Notice that the TOP half of the instructions is for the 8u2 USB to serial processor and the SECOND HALF is for the actual atmega 1280.
Just so we have these files somewhere and in one place.
The
obvious- you need an AVR programmer (that supports avrdude flashing
tool) to plug into the ICSP headers on the mainboard to program.
Special thanks to Dan Newman and Jake for some of these hex files and instructions along the way.
8u2 USB to Serial firmware (technically not a bootloader)
See
the attached files, copy to a folder you can navigate to easily. I
normally just copy to the root of C since I do this so often, it's easy
to paste the commands. (I had to zip avrdude sso unzip to C:)
You
need 3 files: avrdude.exe, avrdude.conf (these 2 are the flashing
tool), then the hex file (I copied to the root of my C drive).
TO DOWNLOAD THE HEX FILE:
THIS SECTION IS ONLY TO RESTORE FIRMWARE ON THE 8U2 USB TO SERIAL. THIS IS NOT REQUIRED FOR "I flashed the wrong firmware and my printer is displaying 2 black bars". This is "I blew up my mightyboard, replaced the 8U2 USB processor with a blank one, and need to get firmware on it".
1. Connect the AVR ISP MKII compatible programmer to the 8U2 6 pin programming header
2. Ensure the Board is Powered
3. navigate to the directory containing the .hex file in the terminal
4. Execute the following avrdude command:
avrdude -p at90usb82 -F -P usb -c avrispmkii -U
flash:w:Makerbot-usbserial.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U
efuse:w:0xF4:m -U lock:w:0x0F:m
Note, I'm using a
genuine AVRMkII programmer from Atmel. You would ned to know the correct
avrdude name for your given programmer and change this piece of the
above command string "avrispmkii"
OK, so that got the 8u2 in the correct state, now, we can work on the main processor (Atmega1280). If you have 2 black bars, these are the instructions you should be following.
I
use AVR Burn-O-Mat, GUI for AVRdude because I'm lazy and because I do
this so often (OK, so I'm command line challenged myself- alright??)
Simply
do the AVR dude configuration so it points to the previously copied AVR
dude exe and conf files in C:, then choose your programmer, then choose
USB as the port, then finally, check the box "disable auto erase for
flash (-d)". Hit apply
On the main screen (of AVR Burn-O-Mat) choose your processor 1280
Ensure the programmer is now plugged into the 1280 ICSP port !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
If
you have a standard 1280 (anyone with a genuine MakerBot board has a
1280) then you flash this hex (ATmegaBOOT_168_atmega1280.hex)
Again, what happened here is you mixed instructions and used part of the 8u2 command, plugged it into the 1280 port and potentially bricked the chip.
If you were going to use avrdude directly flash your chip, then this is the avrdude command you should have used.
#1 again, ensure the ICSP is plugged into the 1280 ICSP port.
#2 ensure the board is powered
#3 C:\avrdude.exe -C C:\avrdude.conf -p m1280 -P usb -c avrispmkII -U flash:w:C:\ATmegaBOOT_168_atmega1280.hex:i
The above instruction assumes all 3 files (avrdude.exe, avrdude.conf, and the specified hex) are in the root of C:. You will either have to move the files or change the path.
again, the basic command is call avrdude.exe then this is the actual command passed
-p m1280 -P usb -c avrispmkII -U flash:w:C:\ATmegaBOOT_168_atmega1280.hex:i
-p is for program
m1280 is for the 1280 processor type
usb tells it where to find the programmer on what port
-c ???? Sorry, I don't know off the top of my head
-i at the end is just what type of hex file i= Intel (since these are based on an Intel architecture)