Arduino with Eclipse and External Programmer
I have been tinkering with Arduino for a couple of weeks now. Iâve ended up creating my own PCB based on Arduino Mega and then I created another one based on Arduino Leonardo. To simplify the electronic circuit and to minimize the cost of the board, I didnât include the USB programming circuit, and settle for ICSP only.
Of course, that meant I would need an external programmer to upload my code to the boards. So, I got Pocket AVR Programmer from Sparkfun. It worked nice and it was small and cheap.
Everything worked fine until I could no longer ignore the fact that Arduino IDE is peace of crap. It has no code completion, refactoring or error high lighting. The IDE might work just fine for small projects, but it just doesnât scale!
Iâve turned to my old friend eclipse. I found a nice plugin for Arduino in the Market Place. I installed it, and bingo, Iâve got everything eclipse has to offer, and I got it for Arduino.
The only problem was that this plugin didnât support external programmers. The work arounds I found didnât work with the new versions. But after checking the correct avrdude command executed by Arduino IDE with the one executed by this plugin Iâve come with this hack. In the Arduino folder (the one used by the plugin), edit boards.txt. Modify the upload protocol for the board you are using from wiring to usbtiny.
#mega2560.upload.protocol=wiring mega2560.upload.protocol=usbtiny
You also had to go to the properties of my Arduino project in eclipse, and in the Arduino tab, set the COM Port to âusbâ. This should convince avrdude to upload the code using USBtinyISP.
Happy hacking.











