Atmel Studio 6

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
mymixed
 
Posts: 8
Joined: Tue May 29, 2012 3:26 pm

Atmel Studio 6

Post by mymixed »

I've been trying to set up Atmel Studio 6 w/ a USBtinyISP. I found this guide: http://webcache.googleusercontent.com/s ... sbtinyisp/, but its for studio 5. I tried it anyway, and it can successfully erase an ATtiny45. However, when it starts to program it, it gives me a couple errors. I'm using avrdude as an extension for Atmel Studio. Here's the avrdude output:

Code: Select all

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude.exe: Device signature = 0x1e9206
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "3AC.cproj.hex"
avrdude.exe: error opening 3AC.cproj.hex: No such file or directory
avrdude.exe: input file 3AC.cproj.hex auto detected as invalid format
avrdude.exe: can't open input file 3AC.cproj.hex: No such file or directory
avrdude.exe: write to file '3AC.cproj.hex' failed

avrdude.exe: safemode: Fuses OK

avrdude.exe done.  Thank you.
Any help would be awesome. Thanks,

mymixed

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Atmel Studio 6

Post by adafruit_support_rick »

avrdude.exe: error opening 3AC.cproj.hex: No such file or directory
It can't find the hex file to write to your chip. Check your directory settings.

mymixed
 
Posts: 8
Joined: Tue May 29, 2012 3:26 pm

Re: Atmel Studio 6

Post by mymixed »

Where are the directory settings?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Atmel Studio 6

Post by adafruit_support_rick »

I don't have Studio 6, so I can't answer that. But your link has the following picture:
Image
My guess is that Studio 6 no longer defines the symbol $(BinDir). You'll need to figure out what symbol it uses instead, and then enter that symbol here. Find the makefile and see what's defined in there.

Or, maybe avrdude doesn't like filenames of the form nnnn.cproj.hex?

mymixed
 
Posts: 8
Joined: Tue May 29, 2012 3:26 pm

Re: Atmel Studio 6

Post by mymixed »

Ok, now it's partially fixed. I'm still just sending it a while loop, but now it writes. It seems that avrdude was looking for the cproject, not the hex file. So I changed this:

Code: Select all

-c usbtiny -p m328p -U flash:w:$(ProjectFileName).hex
to this:

Code: Select all

-c usbtiny -p m328p -U flash:w:$(ProjectFileName)
and didn't modify anything else. However, now when it attempts to verify, I get a couple errors. Here is the entire avrdude output:

Code: Select all

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude.exe: Device signature = 0x1e9206
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "3AC.cproj"
avrdude.exe: input file 3AC.cproj auto detected as raw binary
avrdude.exe: writing flash (4096 bytes):

Writing | ################################################## | 100% 2.76s

avrdude.exe: 4096 bytes of flash written
avrdude.exe: verifying flash memory against 3AC.cproj:
avrdude.exe: load data flash data from input file 3AC.cproj:
avrdude.exe: input file 3AC.cproj auto detected as raw binary
avrdude.exe: input file 3AC.cproj contains 4096 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 2.14s

avrdude.exe: verifying ...
avrdude.exe: verification error, first mismatch at byte 0x0000
             0xef != 0x00
avrdude.exe: verification error; content mismatch

avrdude.exe: safemode: lfuse changed! Was 62, and is now 0
Would you like this fuse to be changed back? [y/n] 
Also, another problem is that I can't tell avrdude to change the fuse back or not since it's in the output window.

User avatar
luismasg
 
Posts: 1
Joined: Sun Jun 10, 2012 4:53 am

Re: Atmel Studio 6

Post by luismasg »

hey, hi! i feel an absolute newbie and it gets frustrating not to have people close you can ask a question but i think i actually now what you can do. i havent finished reading the details of your screenshot but the point is : add a next level to the path argument. add a "/Debug/ whatever.hex:i " where your currently looking for there is no HEX file to write. you need to go to the compiler output folder.
get it? let me know.

*update* ok it works, no idea how to delete code but one click and it automatically uploads code into tiny 2313
this is what i wrote on argument line : -c usbtiny -p attiny2313 -U flash:w:debug/$(ItemFileName).hex:i
you just made my life a lot nicer , i really appreciated this one click programming from AVR S6 you have no idea.
cheers!!!

by the way, have you achieved hardware debugging ( DebugWire) with studio 6 and the usbtinyISP?
Attachments
screen shot of avrdude succes and arguments
screen shot of avrdude succes and arguments
usbtiny- studio 6.jpg (172.42 KiB) Viewed 8263 times

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”