Wednesday, 15 June 2011

Installing the boot loader

I borrowed a Atmel MKII AVR programmer from work and after a few attempts I managed to install the boot loader

The wiki says to use the following

avrdude -patmega644P -cavrispmkII -Pusb -U flash:w:Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex

But this result in the following error.

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


The command I found that works is as follows, it slows down communications.

avrdude -B 8 -patmega644P -cavrispmkII -Pusb -U flash:w:Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex


avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e960a
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex"
avrdude: input file Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex auto detected as Intel Hex
avrdude: writing flash (65382 bytes):

Writing | ################################################## | 100% 0.64s

avrdude: 65382 bytes of flash written
avrdude: verifying flash memory against Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex:
avrdude: load data flash data from input file Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex:
avrdude: input file Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex auto detected as Intel Hex
avrdude: input file Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex contains 65382 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 20.42s

avrdude: verifying ...
avrdude: 65382 bytes of flash verified


Now to look into compiling sprinter firmware

1 comment:

  1. I understand the economy of borrowing an ISP programmer, but I have a USPtinyISP I bought from Adafruit Industries (http://www.adafruit.com/products/46 - $22 USD) that I use all the time (I reflashed a stack of extruder controllers just yesterday).

    With luck, you won't have to change the boot loader often, but I've seen quirky behavior reported that was solved by re-flashing the board down to the boot loader, so it's possible you might need to do this again someday.

    I haven't played with Sprinter yet, but as I finish my Mendel, I'm leaning in that direction.

    ReplyDelete