dacostapaulo / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

USBasp burns attiny85 from CLI but Arduino IDE fails #827

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. attiny sketchbook/hardware per http://hlt.media.mit.edu/?p=1229
2. ATtiny85 selected as board in Arduino IDE
3. Upload using usbasp programmer

What is the expected output? What do you see instead?
Expected output is good burn as obtained with avedude from command line

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?
Using Arduino version 1.0 on amd64 Linux system (2.6.32-34-generic #77-Ubuntu). 
Using a bare ATtin85 chip connected to usbasp programmer.

Please provide any additional information below.

The desired target is an ATtiny85 chip running at 8MHz. In the Arduino, I 
select Tools->board->ATtiny85 (internal 8HMz clock). My programmer is a USBasp.

I have compiled the project code for a nano328 target for testing and it 
successfully uploads via the usb port.
I have compiled the project code for a ATtiny85 target and it successfully 
uploads via the USBasp programmer when invoked from the Command Line.
I have compiled the project code for a ATtiny85 target and it fails to upload 
via the USBasp programmer when invoked from Arduino IDE.

As stated above, I can successfully burn ATtiny85 chips with my USBasp 
programmer with avrdude from the Command Line, but using the ArduinoIDE fails 
with these java errors:
java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:443)
    at java.lang.Integer.parseInt(Integer.java:514)
    at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:81)
    at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:66)
    at processing.app.Sketch.upload(Sketch.java:1664)
    at processing.app.Sketch.exportApplet(Sketch.java:1624)
    at processing.app.Sketch.exportApplet(Sketch.java:1578)
    at processing.app.Editor$DefaultExportHandler.run(Editor.java:2314)
    at java.lang.Thread.run(Thread.java:636)

After Googling every on-line posting that seemed to be related to similar 
problems, I became suspicious of the boards.txt and programmers.txt files. I 
have double checked them and even changed the case of USBasp to usbasp, as 
suggested in an old forum post, to no avail.

Additional Googling around indicates that the likely cause is Arduino's java 
code is finding a NULL entry for something that it is looking for in either 
boards.txt or programmers.txt. I have wondered it it is looking in the 
~/arduino/arduino-1.0/sketchbook/hardware/attiny/boards.txt when it is getting 
things right but somehow reverting to the 
~/arduino/arduino-1.0/hardware/arduino/boards.txt file when the java fails - an 
artifact bug from pre-version 0018 java that didn't look under 
"sketchbook/hardware" for a boards.txt, perhaps.

I wonder - is there anyone that successfully uses a usbasp programmer from with 
the Arduino IDE for ATtiny chips?

Original issue reported on code.google.com by comer.edward on 21 Feb 2012 at 10:54

GoogleCodeExporter commented 9 years ago
This issue can be closed, as written. I was clicking the UPLOAD button instead 
of selecting File->Upload_Using_Programmer. The USBasp correctly programs the 
ATtiny85 when selecting File->Upload_Using_Programmer.

However, the java messages after incorrectly clicking the UPLOAD button should 
be more informative.

Original comment by comer.edward on 21 Feb 2012 at 11:57

GoogleCodeExporter commented 9 years ago
dmel...@gmail.com
Thanks for posting the solution! I had the same problem; this fixed it.

Original comment by chris.cr...@gmail.com on 4 Nov 2014 at 4:34