Pages: [1]   Go Down
Author Topic: USBtinyISP will program bootloader but not sketch  (Read 1820 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'm trying to use a spark fun pocket programmer, same as USBtinyISP to program my sketch. It will program the bootloader fine through the Arduino tools menu. However it will not program any sketch. I'm using the blink example. And my arduino version is 22. I followed the instruction on http://arduino.cc/en/Hacking/Programmer. I changed the preferences.txt to :

upload.using=USBtinyISP

I get the folloing error:
Code:
Binary sketch size: 1018 bytes (of a 30720 byte maximum)
java.lang.NullPointerException
at processing.app.debug.AvrdudeUploader.getProgrammerCommands(AvrdudeUploader.java:106)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:68)
at processing.app.Sketch.upload(Sketch.java:1603)
at processing.app.Sketch.exportApplet(Sketch.java:1568)
at processing.app.Sketch.exportApplet(Sketch.java:1524)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2293)
at java.lang.Thread.run(Thread.java:619)

I have tried updating my java version on my PC.
I have tried reinstalling Arduino 22
I have tried deleting the preferences.txt
I have tried another Arduino nano.
I have tried changing the boards.txt file instead to:

Code:
atmega328.name=Arduino nano ATmega328


atmega328.upload.using=USBtinyISP
atmega328.upload.protocol=usbtiny

atmega328.upload.maximum_size=30720
atmega328.upload.speed=57600

atmega328.bootloader.low_fuses=0xFF
atmega328.bootloader.high_fuses=0xDA
atmega328.bootloader.extended_fuses=0x05
atmega328.bootloader.path=atmega
atmega328.bootloader.file=ATmegaBOOT_168_atmega328.hex
atmega328.bootloader.unlock_bits=0x3F


atmega328.bootloader.lock_bits=0x0F

atmega328.build.mcu=atmega328p
atmega328.build.f_cpu=16000000L
atmega328.build.core=arduino

this is what my programmer file looks like:

Code:
avrisp.name=AVR ISP
avrisp.communication=serial
avrisp.protocol=stk500v1

avrispmkii.name=AVRISP mkII
avrispmkii.communication=usb
avrispmkii.protocol=stk500v2

usbtinyisp.name=USBtinyISP
usbtinyisp.protocol=usbtiny

parallel.name=Parallel Programmer
parallel.protocol=dapa
parallel.force=true
# parallel.delay=200

arduinoisp.name=Arduino as ISP
arduinoisp.communication=serial
arduinoisp.protocol=stk500v1
arduinoisp.speed=19200

I would appreciate and help or suggestions.
Logged

Scotland
Offline Offline
Edison Member
*
Karma: 26
Posts: 1340
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
atmega328t.name=ATMega 328 - USBTinyISP

atmega328t.upload.maximum_size=32768
atmega328t.upload.speed=57600
atmega328t.upload.using=arduino:usbtinyisp

atmega328t.bootloader.low_fuses=0xFF
atmega328t.bootloader.high_fuses=0xDD
atmega328t.bootloader.extended_fuses=0x05
atmega328t.bootloader.path=atmega
atmega328t.bootloader.file=ATmegaBOOT_168_atmega328.hex
atmega328t.bootloader.unlock_bits=0x3F
atmega328t.bootloader.lock_bits=0x0F

atmega328t.build.mcu=atmega328p
atmega328t.build.f_cpu=16000000L
atmega328t.build.core=arduino

Thats what I use - try that ;-)
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, this worked perfect thanks!
Logged

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1123
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks from me too Drew.  I've a standalone board that's ignoring all attempts to program it via FTDI so needed to use 0.22 due to an older incompatible sketch, via USBtinyISP ...thanks for this!

Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Pages: [1]   Go Up
Jump to: