EmbDev.net

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


Author: Codi (Guest)
Posted on:

Rate this post
0 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:


(...)
m8def.inc:139: Error: expected comma after "OCF1B"
m8def.inc:140: Error: expected comma after "OCF1A"
(...)
or
(...)
m8def.inc:449: Error: junk at end of line, first unrecognized character is`0'
m8def.inc:450: Error: expected comma after "INT1addr"
m8def.inc:450: Error: junk at end of line, first unrecognized character is`0'
(...)
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 :)

Author: mizch (Guest)
Posted on:

Rate this post
0 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.

Author: Oliver (Guest)
Posted on:

Rate this post
0 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

Author: Clifford Slocombe (clifford)
Posted on:

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

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.