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

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

Re: [avr-gcc-list] Link Eorror in Combining C and assembly source files


From: Shilin Yu
Subject: Re: [avr-gcc-list] Link Eorror in Combining C and assembly source files
Date: Fri, 5 Sep 2008 15:17:38 +0800

I have tried by it doesn't work either.
I seems like that WinAVR uses the GNU Assembler(GAS), not the AVR Assembler


2008/9/5 Dean Ferreyra <address@hidden>
Try using _sched_mode in your assembly code instead.  If I remember
correctly, the C compiler automatically prefixes symbols with an
underscore.

Dean

Shilin Yu wrote:
>    I met an link error when build a project with .c and .S files
>
>    the c file  like this:
>          ...
>          volatile unsigned char     sched_mode;
>          ...
>
>
>    the assembly  file like this:
>          .extern    sched_mode
>          ...
>          LDS R18, sched_mode
>          ...
>
>
>    when I build the project. the link error about the assembly file output:
>
>     (.text+0x32): undefined reference to `sched_mode'
>
>
>     Any reply is welcome! Thanks!
>
> --
> Sincerely yours,
> Shilin Yu
>




--
Sincerely yours,
Shilin Yu

reply via email to

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