Author Topic: Programming with ISP  (Read 2422 times)

0 Members and 1 Guest are viewing this topic.

Fishtales

Programming with ISP
« on: January 09, 2012, 11:07:11 PM »
With the Arduino IDE, it is easy to program directly to a board without a bootloader using an ISP.  Will this capability ever be possible in the Wiring IDE, and if so, when might that happen?

bhagman

Re: Programming with ISP
« Reply #1 on: January 10, 2012, 11:55:46 PM »
Could you provide some more details?

Programming via any other interface in avrdude is easily achieved if you have the right drivers installed, and you add or modify a hardware definition (specifically, the boards.txt file for whatever platform you're working with).

In Arduino, the same holds true... either you've updated the boards.txt to use a different interface, or there's something your not telling me :)

Fishtales

Re: Programming with ISP
« Reply #2 on: January 11, 2012, 07:13:52 AM »
Yes, in Arduino (1.0), I have made an entry in boards.txt that looks like this:

usbtiny128.name=[usbtinyisp] ATmega128v@ 16 MHz
usbtiny128.upload.using=usbtinyisp
usbtiny128.upload.maximum_size=129024
usbtiny128.build.mcu=atmega128
usbtiny128.build.f_cpu=16000000L
usbtiny128.build.core=arduino

Then I select  Tools->Programmers->USBtinyISP and I can load a sketch directly to the board through the ISP header.

In wiring, I tried a couple variants of this in the boards.text file with no success.  For example:
usbtiny128.name=[usbtinyisp] ATmega128v@ 16 MHz
usbtiny128.upload.using=usbtinyisp
usbtiny128.upload.maximum_size=129024
usbtiny128.build.mcu=atmega128
usbtiny128.build.f_cpu=16000000L
usbtiny128.build.core=arduino

This shows up as a board, but when I try to upload a sketch I get this error message which seems to indicate that it's still trying to upload via a non existent bootloader:

java.lang.NumberFormatException: null
   at java.lang.Integer.parseInt(Integer.java:417)
   at java.lang.Integer.parseInt(Integer.java:499)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:85)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:55)
   at processing.app.Sketch.upload(Sketch.java:1611)
   at processing.app.Sketch.exportApplet(Sketch.java:1666)
   at processing.app.Sketch.exportApplet(Sketch.java:1621)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2476)
   at java.lang.Thread.run(Thread.java:680)