EmbDev.net

Forum: ARM programming with GCC/GNU tools Can't compile *.s/*.asm files with avr-as


von Codi (Guest)


Rate this post
useful
not useful
Hello,
i have a problem. If i want to compile an assembler file with avr-as and 
"m8def.inc" is included i can't compile because of these errors:


1
(...)
2
m8def.inc:139: Error: expected comma after "OCF1B"
3
m8def.inc:140: Error: expected comma after "OCF1A"
4
(...)
5
or
6
(...)
7
m8def.inc:449: Error: junk at end of line, first unrecognized character is`0'
8
m8def.inc:450: Error: expected comma after "INT1addr"
9
m8def.inc:450: Error: junk at end of line, first unrecognized character is`0'
10
(...)
11
and much more.

I guess it's because the "m8def.inc" file is written in AVR-Assembler 
and not GNU-Assembler.

Now my question is:
How can i fix m8def.inc or better ;) is there already a pre defined file 
like this for GNU-Assembler?

Thanks a lot :)

von mizch (Guest)


Rate this post
useful
not useful
You can't mix Atmel's def.inc files with GNU gas.  They are written for 
a different kind of assembler.

Use #include <avr/io.h> to get the symbols for your processor.  They 
will sometimes differ from what you're used to if you've been using AVR 
assembler before, however.

von Oliver (Guest)


Rate this post
useful
not useful
If the whole file is written for Atmel assembler, you have to adapt not 
only the includes to GNU, but also the rest of the programm. avr-as will 
tell you, what ist doesn't like.

Oliver

von Clifford S. (clifford)


Rate this post
useful
not useful
You need a different forum; this is an ARM related forum.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.