[En-Nut-Discussion] undefined refs when building on OSX

Ernst Stippl ernst at stippl.org
Sun Apr 15 11:01:42 CEST 2007


Hi Douglas!

Did you ever receive any answere to this question?

I stumbled across it and it seems you have configured Nut/OS for Ethernut1
(" -DNUT_CPU_FREQ=14745600 -DETHERNUT1 ") but only Ethernut3 (the ARm based
board contains an HW RTC. So, maybe for the Ethernut1 the RTC are not
included when building the libraries and hence the linker shouts if these
routines are to be linked to an application prog.

Have you experienced a different cause/resolution?

regards

Ernst

-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von douglas irving
repetto
Gesendet: Freitag, 23. März 2007 04:53
An: en-nut-discussion at egnite.de
Betreff: [En-Nut-Discussion] undefined refs when building on OSX


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
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion



-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 22.03.2007
07:44




More information about the En-Nut-Discussion mailing list