[En-Nut-Discussion] Error: symbol '.Lagain' is already defined

Kowalsky, Richard J Richard.Kowalsky at fluke.com
Tue Jul 29 19:50:17 CEST 2008


Nathan,

Thanks a billion for your reply.  It turns out that my 1-wire module
did have some in-line assembly
and that was conflicting with some other code.  I will be honest, I
have not figured out yet what it was
conflicting with, but I found that there is a high-resolution
"microTimer" sample code in the "projects" area.  It is
a micro-second resolution timer and I just ripped out my old in-line
timer code and put the sample
stuff in there and it compiles just fine.  Since the sample code is
cleaner than mine, and I have less scruples
than your average presidentual candidate, I will most likely just
leave it in there.

Thanks again,

Richard


>
>
>   I am trying to rebuild it using Ethernut 4.4.1 and WinAVR-20080610.
> When I compile it, I get the following error(s):
>
> ...Temp.ccswXncc.s:73: Error: symbol '.Lagain' is already defined
> ...Temp.ccswXncc.s:77: Error: symbol '.Lloop' is already defined
> ...Temp.ccswXncc.s:81: Error: symbol '.Lstop' is already defined
> ........ Lots more errors ......


Those symbols look like assembler labels, but not like the ones that gcc
emits directly.
My guess is that somewhere you've got some inline assembly that is
included
in more
than one place in your 1wire.c file.  This is most likely through a
macro or
inline function,
but not necessarily.  Search the file for "again", "loop", and "stop"
and
see if they show up.
If that doesn't turn up anything try
    avr-gcc -E -mmcu-atmega128 -Os -fno-delete-null-pointer-checks -Wall
-Wstrict-prototype -Wno-array-bounds -Wa,-ahlms=1wire.lst
-D__HAVARD__ARCH__
-I../..nutbld/include -I../../nut/include 1wire.c
which will generate a preprocessed version of your file which you can
search
for those symbols.
This will help you find it if the assembly is hidden within a macro.
The
lines within this file that
start with # tell what file and line (and something else, but I forget)
the
following stuff is from,
so that should help you hunt it down.

My guess is that there is some asm(...) in different functions within
that
file and the older gcc
generated assembly code that somehow hid the symbols from each other or
the
older avr-gas
(the gnu assembler for avr) treated them differently somehow.

Gcc has special syntax to get around this if this is what the problem
is,
but I can't remember
it right now, but go ahead and check to see if this is the problem
first.

Nathan

This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately. 



More information about the En-Nut-Discussion mailing list