[En-Nut-Discussion] undefined reference to NutArchClockGet
Derrell Lipman
derrell.lipman at unwireduniverse.com
Fri May 13 16:12:32 CEST 2011
Hi, all. I'm new to Nut/OS. Using svn r3409 (the latest as of this morning),
I'm trying to build the "simple" sample, as an initial test. I've completed
the whole build process, and used nutconf to select (as a testing point)
ethernut30e. I saw reference to (probably old) bugs that said to use full
paths, not relative ones, and am doing so. The only change I made to the
configuration was enabling the Environment setting for the change of
prototype of unsetenv(). Selecting "Build" went smoothly, as did creating
the sample apps.
When I run 'make' in my app/simple directory, I get the following link
error:
{dworkin} /home/derrell/ME/ethernut.svn/trunk/app/simple ---> make
arm-elf-gcc -c -I/home/derrell/ME/ethernut.svn/trunk/build/include
-I/home/derrell/ME/ethernut.svn/trunk/nut/include -DETHERNUT3
-mcpu=arm7tdmi -mthumb-interwork -Os -Wall -Wstrict-prototypes
-Wa,-a=simple.lst -o simple.o simple.c
arm-elf-gcc simple.o -mcpu=arm7tdmi -nostartfiles
-T/home/derrell/ME/ethernut.svn/trunk/nut/arch/arm/ldscripts/at91_ram.ld
-Wl,-Map=simple.map,--cref,--no-warn-mismatch
-L/home/derrell/ME/ethernut.svn/trunk/build/lib -Wl,--start-group
/home/derrell/ME/ethernut.svn/trunk/build/lib/nutinit.o -lnutos -lnutarch
-lnutdev -lnutarch -lnutcrt -Wl,--end-group -o simple.elf
/home/derrell/ME/ethernut.svn/trunk/build/lib/libnutos.a(timer.o): In
function `NutGetCpuClock':
timer.c:(.text+0x164): undefined reference to `NutArchClockGet'
collect2: ld returned 1 exit status
make: *** [simple.elf] Error 1
That function is declared in five files:
nut/arch/arm/dev/ostimer_s3c4510b.c
nut/arch/arm/dev/ostimer_at91.c
nut/arch/arm/dev/ostimer_lpc2xxx.c
nut/arch/avr/dev/ostimer.c
nut/arch/unix/dev/ostimer.c
nut/arch/avr32/dev/ostimer.c
I think I'd expect the declaration in nut/arch/arm/dev/ostimer_at91.c to be
used, but that declaration is only included if NUT_CPU_FREQ is not defined.
I haven't determined whether NUT_CPU_FREQ is supposed to be defined or
not...
Has anyone seen this and found the solution? If not, any suggestions? I'm
starting to get a handle on the code organization, but there are lots of
defines occurring in lots of different places, so I have plenty more to
learn.
My ultimate goal is to get Nut/OS running on a Netduino (no ethernet) and
later, on a Netduino Plus (with ethernet).
Thanks!
Derrell
More information about the En-Nut-Discussion
mailing list