Using AVRISP mkII and Arduino IDE under Ubuntu lucid

If like me you would like to upload your sketches using the AVRISP mkII under Linux like you can easily do under OSX, I suggest the following procedure:

1. Add the following text to board.txt (located in the relative path hardware/arduino in your arduino installation folder)

jivedingo wrote it on arduino forum

##############################################################

avrispmkii_168.name=AVRISP mkII w/ ATmega168

avrispmkii_168.upload.protocol=avrispmkii
avrispmkii_168.upload.maximum_size=14336
avrispmkii_168.upload.speed=19200
avrispmkii_168.upload.using=avrispmkii

avrispmkii_168.bootloader.low_fuses=0xff
avrispmkii_168.bootloader.high_fuses=0xdd
avrispmkii_168.bootloader.extended_fuses=0x00
avrispmkii_168.bootloader.path=atmega
avrispmkii_168.bootloader.file=ATmegaBOOT_168_ng.hex
avrispmkii_168.bootloader.unlock_bits=0x3F
avrispmkii_168.bootloader.lock_bits=0x0F

avrispmkii_168.build.mcu=atmega168
avrispmkii_168.build.f_cpu=16000000L
avrispmkii_168.build.core=arduino


##############################################################

avrispmkii_328.name=AVRISP mkII w/ ATmega328

avrispmkii_328.upload.protocol=avrispmkii
avrispmkii_328.upload.maximum_size=30720
avrispmkii_328.upload.speed=57600
avrispmkii_168.upload.using=avrispmkii

avrispmkii_328.bootloader.low_fuses=0xFF
avrispmkii_328.bootloader.high_fuses=0xDA
avrispmkii_328.bootloader.extended_fuses=0x05
avrispmkii_328.bootloader.path=atmega
avrispmkii_328.bootloader.file=ATmegaBOOT_168_atmega328.hex
avrispmkii_328.bootloader.unlock_bits=0x3F
avrispmkii_328.bootloader.lock_bits=0x0F

avrispmkii_328.build.mcu=atmega328p
avrispmkii_328.build.f_cpu=16000000L
avrispmkii_328.build.core=arduino

##############################################################

2. Backup arduino’s avrdude and use your local avrdude
It seams that the avrdude binary coming with arduino 018 distribution isn’t compiled with usb support.
If your remove it and link your local avrdude binary instead, upload using mkII works like a charm.

# apt-get install avrdude libusb
# cd /path/to/arduino/folder
# cd hardware/tools
# ln -s avrdude avrdude.without-usb-support
# ln -s `type avrdude | cut -d "(" -f 2 | cut -d ")" -f 1` avrdude

Then you will be able to select AVRISP mkII \w ATmega328 or AVRISP mkII \w ATmega168 from the tools>board menu.

Published by

TO

Complex AI owner