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

Nathan Moore nategoose at gmail.com
Tue Jul 29 00:15:37 CEST 2008


>
>
>   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



More information about the En-Nut-Discussion mailing list