0

Problem setting up AtTiny88
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Problem setting up AtTiny88

by dtuzman on Sun Mar 08, 2009 9:08 pm

Hello,

I'm new to AVR development. I'm using an Intel-based Mac, with a USBTiny Programmer (http://www.ladyada.net/make/usbtinyisp/use.html) to program an attiny88 mcu. My main problem (for now) is that avr-gcc does not accept "attiny88" as a -mmcu flag. I have OSX-AVR installed, which supposedly sets up everything I (avrdude, avr-gcc, avr-libc, etc). I edited the avrdude.conf file to include a -p flag for attiny88, so I think that is fine. I downloaded a current version of avr-libc, which has some files and folders called "attiny88" but I'm sure they aren't in the correct directory or anything.

This is the first step I have in terminal:
"avr-gcc -DF_CPU=8000000 -mmcu=attiny88 -o solid.out solid.c"

which gives me this output:
"unknown MCU 'attiny88' specified
Known MCU names:
avr2
at90s2313
at90s2323
at90s2333
at90s2343
attiny22
.
.
.
attiny15
attiny28
solid.c:1: error: MCU 'attiny88' supported for assembler only
In file included from solid.c:7:
/usr/local/bin/../lib/gcc/avr/4.1.1/../../../../avr/include/avr/io.h:356:6: warning: #warning "device type not defined"
In file included from solid.c:8:
/usr/local/bin/../lib/gcc/avr/4.1.1/../../../../avr/include/util/delay.h:90:3: warning: #warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed"
solid.c: In function 'main':
solid.c:13: error: 'DDRD' undeclared (first use in this function)
solid.c:13: error: (Each undeclared identifier is reported only once
solid.c:13: error: for each function it appears in.)
solid.c:17: error: 'PORTD' undeclared (first use in this function)

I've been looking through various tutorial sites for step by step instructions on how to go from a .c file to a fully programmed chip. None of them use attiny88 so I've been kinda of mixing and matching. But nothing is working. Can someone help me please?

-David
dtuzman
 
Posts: 3
Joined: Sun Mar 08, 2009 9:00 pm

Re: Problem setting up AtTiny88

by jarv on Mon Mar 09, 2009 12:35 pm

probably get a better response on the avrfreaks site, my version of avr-gcc has support for that attiny:

Code: Select all | TOGGLE FULL SIZE
Known MCU names:
   avr2
   at90s2313
   at90s2323
   at90s2333
   at90s2343
   attiny22
   attiny26
   at90s4414
   at90s4433
   at90s4434
   at90s8515
   at90c8534
   at90s8535
   avr25
   attiny13
   attiny2313
   attiny24
   attiny44
   attiny84
   attiny25
   attiny45
   attiny85
   attiny261
   attiny461
   attiny861
   attiny43u
   attiny48
   attiny88
...


Maybe you need to grab a more current version of avr-gcc?
projects (avr/electronics/programming) - http://jarv.org
jarv
 
Posts: 49
Joined: Tue Jan 02, 2007 5:48 pm

Re: Problem setting up AtTiny88

by dtuzman on Mon Mar 09, 2009 3:25 pm

yea, I downloaded the current avr-gcc after I installed the avr-osx package. I think the older version is still installed and I don't know how to replace it with the newer version.

I'm also looking for a step by step tutorial for converting a .c to .hex or .elf or whichever is necessary.
dtuzman
 
Posts: 3
Joined: Sun Mar 08, 2009 9:00 pm

Re: Problem setting up AtTiny88

by jarv on Mon Mar 09, 2009 3:30 pm

have you tried using an ide like eclipse? With the avr plugin it takes care of setting up your environment and automating the build process.
projects (avr/electronics/programming) - http://jarv.org
jarv
 
Posts: 49
Joined: Tue Jan 02, 2007 5:48 pm

Re: Problem setting up AtTiny88

by neutered on Mon Mar 09, 2009 6:26 pm

dtuzman wrote:yea, I downloaded the current avr-gcc after I installed the avr-osx package. I think the older version is still installed and I don't know how to replace it with the newer version.


it is using whichever is 'first' in your path. open a terminal and type 'which avr-gcc' to verify.

i built my gcc from sources, but if there is no 'uninstall' for your package the easiest thing to do is just move stuff around in your path so that it finds the right one.
neutered
 
Posts: 43
Joined: Wed Dec 03, 2008 3:21 pm

Re: Problem setting up AtTiny88

by dtuzman on Thu Mar 12, 2009 1:23 pm

I have an updated avr-libc, but I don't know what version of avr-gcc I'm using. How do I figure that out?

Is there a way to start over from scratch?

-David
dtuzman
 
Posts: 3
Joined: Sun Mar 08, 2009 9:00 pm

Re: Problem setting up AtTiny88

by westfw on Thu Mar 12, 2009 6:48 pm

"avr-gcc --version"
westfw
 
Posts: 1568
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Please be positive and constructive with your questions and comments.