[En-Nut-Discussion] Linker problem
Hugo Simon
hugo.simon at gmx.de
Thu Jan 5 13:56:13 CET 2006
Hello,
I just created a new project, not my first, using NutOS 3.9.8. But I got
problems linking it. It seems that the linker didn't find some event
routines, see below:
C:\Entwickl\ethernut-3.9.8\nutapp\thermometer>make all
avr-gcc thermometer.o ds18x20.o onewire.o delay.o
urom.o -mmcu=atmega128 -Wl,--defsym=main=0,-Map=thermometer.map,--cref -c:/e
ntwickl/ethernut-3.9.8/nutbld/lib
c:/entwickl/ethernut-3.9.8/nutbld/lib/nutinit.o -lnutnet -lnutpro -lnutfs -
lnutos -lnutdev -lnutnet -lnutcrt -o thermometer.elf
c:/entwickl/ethernut-3.9.8/nutbld/lib\libnutdev.a(usart0avr.o)(.text+0x8a):
In function `AvrUsartTxEmpty':
: undefined reference to `NutEventPostFromIrq'
c:/entwickl/ethernut-3.9.8/nutbld/lib\libnutdev.a(usart0avr.o)(.text+0x9a):
In function `AvrUsartTxEmpty':
: undefined reference to `NutEventPostFromIrq'
c:/entwickl/ethernut-3.9.8/nutbld/lib\libnutdev.a(usart0avr.o)(.text+0x106):
In function `AvrUsartRxComplete':
: undefined reference to `NutEventPostFromIrq'
c:/entwickl/ethernut-3.9.8/nutbld/lib\libnutdev.a(usart.o)(.text+0x17c): In
function `UsartRead':
: undefined reference to `NutEventWait'
c:/entwickl/ethernut-3.9.8/nutbld/lib\libnutdev.a(usart.o)(.text+0x2f0): In
function `UsartFlushOutput':
: undefined reference to `NutEventWait'
make: *** [thermometer.elf] Error 1
I never got this problem before, another project using the same makefile
except the name of the project works fine. Here is my makefile. Can anybody
give me a hint?
Thank you
Thorsten
#
# Copyright (C) 2002 by egnite Software GmbH. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this
# software must display the following acknowledgement:
#
# This product includes software developed by egnite Software GmbH
# and its contributors.
#
# THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
# SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# For additional information see http://www.ethernut.de/
#
# $Log$
#
PROJ = thermometer
WEBDIR = html
WEBFILE= urom.c
include ../Makedefs
SRCS = $(PROJ).c ds18x20.c onewire.c delay.c $(WEBFILE)
OBJS = $(SRCS:.c=.o)
LIBS = $(LIBDIR)/nutinit.o
$(MODS) -lnutnet -lnutpro -lnutfs -lnutos -lnutdev -lnutnet -lnutcrt
TARG = $(PROJ).hex
all: $(OBJS) $(TARG)
$(WEBFILE): $(WEBDIR)/index.html
$(CRUROM) -r -o$(WEBFILE) $(WEBDIR)
include ../Makerules
clean:
-rm -f $(OBJS)
-rm -f $(TARG)
-rm -f $(PROJ).eep
-rm -f $(PROJ).obj
-rm -f $(PROJ).map
-rm -f $(SRCS:.c=.lst)
-rm -f $(SRCS:.c=.bak)
-rm -f $(WEBFILE)
More information about the En-Nut-Discussion
mailing list