[En-Nut-Discussion] undefined refs when building on OSX
douglas irving repetto
douglas at music.columbia.edu
Fri Mar 23 04:52:51 CET 2007
Hello,
I'm working with the ethernut-4.2.1 code on OSX. Mostly it's going
well. I'm currently attempting to build the sample apps, but I've hit
a problem. The apps build okay, but when they try to link I'm getting
undefined references. For example:
make install
...
make -C events install
avr-gcc -c -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall
-Wstrict-prototypes -Wa,-ahlms=events.lst -D__HARVARD_ARCH__
-DNUT_CPU_FREQ=14745600 -DETHERNUT1 -I../../include events.c -o
events.o
avr-gcc events.o -mmcu=atmega128
-Wl,--defsym=main=0,-Map=events.map,--cref -L../../lib
-Wl,--start-group ../../lib/nutinit.o -lnutos -lnutarch -lnutdev
-lnutarch -lnutcrt -Wl,--end-group -o events.elf
avr-objcopy -R .eeprom -O ihex events.elf events.hex
avr-objcopy -O binary events.elf events.bin
cp events.hex ../../bin/atmega128/events.hex
cp events.bin ../../bin/atmega128/events.bin
make -C ftpd install
avr-gcc -c -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall
-Wstrict-prototypes -Wa,-ahlms=ftpserv.lst -D__HARVARD_ARCH__
-DNUT_CPU_FREQ=14745600 -DETHERNUT1 -I../../include ftpserv.c -o
ftpserv.o
avr-gcc ftpserv.o -mmcu=atmega128
-Wl,--defsym=main=0,-Map=ftpserv.map,--cref -L../../lib
-Wl,--start-group ../../lib/nutinit.o -lnutpro -lnutfs -lnutarch
-lnutnet -lnutos -lnutdev -lnutarch -lnutcrt -Wl,--end-group -o
ftpserv.elf
../../lib/libnutcrt.a(time.o)(.text+0x20): In function `time':
: undefined reference to `NutRtcGetTime'
../../lib/libnutcrt.a(time.o)(.text+0x8e): In function `stime':
: undefined reference to `NutRtcSetTime'
make[1]: *** [ftpserv.elf] Error 1
make: *** [install] Error 2
As you can see, some apps, like events, make and install fine, while
others, like ftpd, don't. I have built the libraries, and the
"missing" references are in the libraries:
[pokeysneezy:CCRT/ethernut-4.2.1/app] douglas% grep NutRtcGetTime
../lib/libnutcrt.a
Binary file ../lib/libnutcrt.a matches
So I'm not sure what to do...I've followed the docs as closely as I
can, but since I'm on OSX some things are not super clear.
thanks in advance for any advice!
douglas
--
............................................... http://artbots.org
.....douglas.....irving........................ http://dorkbot.org
.......................... http://music.columbia.edu/cmc/music-dsp
.......... repetto....... http://works.music.columbia.edu/organism
............................... http://music.columbia.edu/~douglas
More information about the En-Nut-Discussion
mailing list