RPi, gertboard, buspirate and Arduino IDE


I want to use the AVR on my gertboard (add-on board for Raspberry pi), but with a twist. To have more pins available, I want to program the Atmega328P on the board using my buspirate.

That works (I can use avrdude to flash hexfiles on the AVR), but when I want to use it inside the Arduino IDE, things go wrong.

When I flash the AVR, the verify-stage at the end fails. After doing some research, it turns out that the Arduino IDE calls avrdude with the "-D" option (disable Auto Erase); which -of course- results in corrupted flash on the AVR.

I do not seams to be able to find the options on how to disable this "-D" option.

This is my boards.txt: (largly based on the entries added by the gertboard instalation tools): --- cut here --- cut here --- cut here --- cut here --- gert328.name=Gertboard with ATmega328 (buspirate)


gert328.upload.protocol=buspirate gert328.upload.maximum_size=32768 gert328.upload.speed=115200 gert328.upload.disable_flushing=true

gert328.bootloader.low_fuses=0xE7 gert328.bootloader.high_fuses=0xDA gert328.bootloader.extended_fuses=0x07 gert328.bootloader.path=atmega gert328.bootloader.file=ATmegaBOOT_168_gert328.hex gert328.bootloader.unlock_bits=0x3F gert328.bootloader.lock_bits=0x0F

gert328.build.mcu=atmega328p gert328.build.f_cpu=12000000L gert328.build.core=arduino gert328.build.variant=standard --- cut here --- cut here --- cut here --- cut here ---

This is my programmers.txt: --- cut here --- cut here --- cut here --- cut here --- avrdude.name=buspirate avrdude.communication=serial avrdude.protocol=buspirate avrdude.speed=115200 --- cut here --- cut here --- cut here --- cut here ---

avrdude is called like this by the Arduino IDE:

$ ps auxw | grep avr root 7487 0.0 1.1 4572 2184 pts/0 R+ 22:57 0:00 /usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -q -q -patmega328p -cbuspirate -P/dev/ttyUSB0 -b115200 -D -Uflash:w:/tmp/build7335325059013955508.tmp/Blink_serial.cpp.hex:i

So, how do I get rid of that '-D' ???

Cheerio! Kr. Bonne.