Avra & definition files

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
expanoncolin
 
Posts: 10
Joined: Fri Nov 02, 2007 9:07 pm

Avra & definition files

Post by expanoncolin »

Hello,

I recently bought and built a USBTiny, it works great. Thanks to the excellent documentation on this site, I have it all set up using avrdude and am able to burn to my Tiny2313 no problem. I am learning to write assembly at the moment, and am using avra to assemble the files I write. As far as I could ell avra didn't come with any xxxdef.inc files, so I downloaded the set here:
http://www.attiny.com/definitions.htm
The problem is that avra comes up with an error with all of them. It doesn't seem to like the lines with the directives that begin with #, #pragma for example. I managed to find a def.inc file without this, and the program assembled and burned great. Here is the working one:

http://www.mccoi.de/anleitungen/tiny2313.inc

Here is the non-working one:
http://www.cpureadyconsulting.com/sourc ... 313def.inc

I can't find a complete set of def.inc's without the # commands in them, does anyone know where I could get ahold of one? I could find a bunch of the style that works but not a set of them for most avr chips like the set from the attiny site.

Thanks so much for providing this information, I look forward to contributing more to this forum as I actually learn what I'm doing :)

-Colin

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

im confused, does this have anything to to with the usbtinyisp kit?

expanoncolin
 
Posts: 10
Joined: Fri Nov 02, 2007 9:07 pm

Post by expanoncolin »

ladyada wrote:im confused, does this have anything to to with the usbtinyisp kit?
Not really, other than I am using the kit to program the chip... should I have put this in the general project forum? Sorry!

-Colin

taywyn
 
Posts: 1
Joined: Mon Jan 21, 2008 2:09 pm

Post by taywyn »

Hi,

It looks like avra doesn't accept the preprocessor commands from avrasm2. It doesn't look like these are all that important, so just remove the lines starting with #. Hopefully avra will be updated to accept preprocessor directives in the future or someone will come up with a better way to deal with this.

(This is one of the top google hits for this problem, so I'm just posting the results I found here)

expanoncolin
 
Posts: 10
Joined: Fri Nov 02, 2007 9:07 pm

Post by expanoncolin »

taywyn wrote:Hi,

It looks like avra doesn't accept the preprocessor commands from avrasm2. It doesn't look like these are all that important, so just remove the lines starting with #. Hopefully avra will be updated to accept preprocessor directives in the future or someone will come up with a better way to deal with this.

(This is one of the top google hits for this problem, so I'm just posting the results I found here)
Thanks... I didn't find the google result myself, though I have been doing just that relying on faith that it is the right thing to do.

-Colin

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

Return to “General Project help”