avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] including an assembly file.


From: Klaus Rudolph
Subject: Re: [avr-gcc-list] including an assembly file.
Date: Sat, 10 Aug 2002 09:38:20 +0200

You can use assembly in c files with inline asm which is
discribed in the gcc manual. If you have such asm ("....")
instructions you can include them into c files.

I think you want write some fuctions in assembler and use them from
your c modules? If so you have to write the assembler modules,
make the funtion entry labels public with the global instruction
and compile them with avr-gcc -xassembler-with-cpp ....
here you can use the cpp (c-pre-processor). If you do not need
cpp you can use avr-as as well. After making the object file with gcc
you can link all that objects togeter with avr-gcc in the normal way
you link objects from c files.

Bye
        Klaus



Marlin Unruh wrote:
> 
> Hi,
> 
> I do not recall seeing any info on writing and including assembly files.
> All though there is the following line in the makefile. I look under AVRGCC
> on avrfreak.net but didn't really see anything.
> 
> #put additional assembler source file here
>         ASRC    =
> 
> does the ASRC file need to be pre-compiled? what is the extension?
> 
> I would like to write one function in assembly and include it with the c
> files.
> 
> Is there a HOW-TO somewhere.
> 
> Any comments or help would be appreciated.
> 
> Marlin
> 
> avr-gcc-list at http://avr1.org
avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]