Pages: [1]   Go Down
Author Topic: upload .hex with USBtinyISP  (Read 1877 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Hi all,

I know some of you have already figured this out. I basically would like to press the upload button and then have the IDE use the USBtinyISP instead of the serial approach to upload a sketch.

I have already figured out how to do this with avrdude from the command line but this is a bit awkward. This is what I use on the command line:

Code:
/Applications/arduino-0010/hardware/tools/avr/bin/avrdude -C/Applications/arduino-0010/hardware/tools/avr/etc/avrdude.conf -c usbtiny -p m168 -e -U flash:w:led_blink.hex

I have looked at the various Arduino configuration files and there is a lot that sort of looks like this is possible. I am just not exactly sure how.

I found this: http://www.arduino.cc/en/Hacking/Programmer
It is almost what I need with the difference that this seems to assume an stk500 programmer on a virtual serial port. USBtiny uses direct usb communication and is known by avrdude as "usbtiny".

Maybe there is something in the Arduino dev version that could help me further.

Any assistence very much appreciated,

/stefanix

Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It will be possible in Arduino 0011.  I'm hoping to upload it tomorrow.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Sounds very good! I am looking forward for your upload.

/stefanix
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Awesome, I just downloaded 0011. Unfortunately I am still not sure how to use the USBtinyISP to program my chip. I tried playing around with the preference file but no luck.

When you got a sec could you point me in the right direction.

That would be awesome,

/stefanix
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I updated the instructions at: http://www.arduino.cc/en/Hacking/Programmer
Logged

gedrop
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

i also have been trying to do this, but no luck..

i get this error message:

avrdude: Can't find programmer id "null"
Valid programmers are:
"long list of programmers here"

one of the lines says "usbtiny  = USBtiny simple USB programmer  [hardware/tools/avr/etc/avrdude.conf:380]".

so i assume in the preferences.txt i should change
"upload.using=bootloader" to "upload.using=usbtiny".

but still no luck..

the bootloader however is uploading correctly with the USBtinyISP.

what could i be doing wrong?

thanks, Gijs
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It needs to be upload.using=usbintyisp (not usbtiny).  The name is the prefix used for that programmer in the programmers.txt file, not necessarily the name of the device passed to avrdude.  (For things like the AVRISP mkII, avrdude uses the generic string "usb".)
Logged

gedrop
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

ah, thanks for the reply mellis, now its working!

it was a case sensitive problem..
in the programmers file it says:
usbtinyisp.name=USBtinyISP
usbtinyisp.protocol=usbtiny
but in the preferences it should be: "usbtinyisp"...

greets Gijs
Logged

New Zealand
Offline Offline
God Member
*****
Karma: 0
Posts: 999
Arduino pebbles
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It needs to be upload.using=usbintyisp (not usbtiny).
I assume you mean: upload.using=usbtinyisp

--Phil.
Logged

Pages: [1]   Go Up
Jump to: