Adding BatchISP to Arduino programmer list

Hello folks

I'm using standalone ATmega32u4 chips with the Arduino IDE. The problem is that these chips have DFU bootloader natively, which is incompatible with avrdude and Arduino uploaders. So, what do I do? Normally, I compile the code in Arduino IDE and then upload it with the FLIP. But recently I've discovered that there is another program, called BatchISP, which allows me to upload the code via command line. Just like avrdude it is a sequence of commands like for instance:

batchisp -device atmega32u4 -hardware usb -operation erase f memory

Now my question is: how to add this command set to the Arduino IDE? I want to be able to upload by simply pressing an upload button there, not by opening FLIP or something else.

I've checked the file programmers.txt where all Arduino programmers are configured, but it seems that all of them are for avrdude only.

You need to create a tool for BatchISP in platform.txt and then reference that tool in programmers.txt:


My advice is to create a dummy hardware package at {sketchbook folder}/hardware that contains:

  • programmers.txt with the BatchISP definition
  • Arduino AVR Boards platform.txt modified to define the BatchISP tool
  • Empty boards.txt file(because the Arduino IDE won't recognize a hardware package without a boards.txt file).

If you use Sketch > Upload Using Programmer(or hold shift while clicking the Upload button) instead of the standard Upload command you will not need to use a modified boards.txt.

That should be better than modifying Arduino AVR Boards because you won't need to redo your changes anytime you update the Arduino AVR Boards and/or the Arduino IDE, though you may need to update your hardware package occasionally if the Arduino IDE hardware interface changes.

More information at: