[En-Nut-Discussion] compiling for CM3

Klaus Kloos klaus.kloos at gmx.de
Tue Mar 12 11:45:20 CET 2013


Hello

I have problems compiling the apps from a ethernut 5.1 using cm3-gcc or cm3-gccdbg with stm3210c-eval.conf. My gcc is 4.6.0
The linker does not find the NutOS-functions. Building nutos itself using qnutconf.exe does not bring up any error.
While searching for the dependencies in the makefiles, makedefs and makevars ive got lost.
What am I doing wrong?

Two small feedbacks from the view of a non experienced nutos user.
-nutconf.exe does not start. lua51.dll was not found. qnutconf.exe is working.
-in qnutconf.exe the default path for choosing a conf file is taken from a previously used  older version. So the wrong conf folder is shown and windows does not show the path to see this fault fast. For me it seems better to save the default-path related to the ethernut version.

Thanks and greetings Klaus

make all 
make -C caltime
make[1]: Entering directory `C:/ethernut-5.1/nutapp/caltime'
arm-none-eabi-gcc -c -IC:/ethernut-5.1/nutbld/include  -IC:/ethernut-5.1/nut/include  -DSTM3210C_EVAL -DSTM32F10X_CL -DUSE_LINE_EDITOR -DUSE_BUILD_TIME  -MD -MP -mcpu=cortex-m3 -mthumb -mlittle-endian -D__CORTEX__ -ffunction-sections -fdata-sections -fomit-frame-pointer -mfix-cortex-m3-ldrd -Os -Wall -Wstrict-prototypes -Wa,-a=caltime.lst  -DSTM3210C_EVAL -DSTM32F10X_CL -DUSE_LINE_EDITOR -DUSE_BUILD_TIME -o caltime.o caltime.c
arm-none-eabi-gcc caltime.o -mcpu=cortex-m3 -mthumb -mlittle-endian -D__CORTEX__ -nostartfiles -LC:/ethernut-5.1/nut/arch/cm3/ldscripts -Tstm32f107xC_flash.ld -Wl,-Map=caltime.map,--cref,--gc-sections -LC:/ethernut-5.1/nutbld/lib -Wl,--start-group C:/ethernut-5.1/nutbld/lib/nutinit.o -lnutpro -lnutgorp -lnutcrt -lnutos -lnutdev -lnutarch  -Wl,--end-group -o caltime.elf
C:/ethernut-5.1/nutbld/lib/nutinit.o: In function `NutIdle':
nutinit.c:(.nutinit+0x2): undefined reference to `NutTimerInit'
C:/ethernut-5.1/nutbld/lib/nutinit.o: In function `NutInit':
nutinit.c:(.nutinit+0x36): undefined reference to `SystemInit'
nutinit.c:(.nutinit+0x3a): undefined reference to `SetSysClock'
caltime.o: In function `main':
caltime.c:(.text.startup.main+0x3c): undefined reference to `_ioctl'
caltime.c:(.text.startup.main+0x13e): undefined reference to `NutSleep'
caltime.c:(.text.startup.main+0x17c): undefined reference to `NutSleep'
caltime.c:(.text.startup.main+0x1ee): undefined reference to `NutSleep'
caltime.c:(.text.startup.main+0x200): undefined reference to `NutGetSeconds'
caltime.c:(.text.startup.main+0x228): undefined reference to `NutSleep'
caltime.c:(.text.startup.main+0x27c): undefined reference to `devUsartStm32_2'
caltime.c:(.text.startup.main+0x284): undefined reference to `devUsartStm32_2'
C:/ethernut-5.1/nutbld/lib\libnutcrt.a(freopen.o): In function `freopen':
freopen.c:(.text.freopen+0x46): undefined reference to `_open'
C:/ethernut-5.1/nutbld/lib\libnutcrt.a(vfprintf.o): In function `vfprintf':
vfprintf.c:(.text.vfprintf+0x18): undefined reference to `_write'
vfprintf.c:(.text.vfprintf+0x12): undefined reference to `_putf'
make[1]: Leaving directory `C:/ethernut-5.1/nutapp/caltime'
C:/ethernut-5.1/nutbld/lib\libnutcrt.a(vsprintf.o): In function `vsprintf':
vsprintf.c:(.text.vsprintf+0x12): undefined reference to `_putf'
C:/ethernut-5.1/nutbld/lib\libnutcrt.a(vsscanf.o): In function `vsscanf':
vsscanf.c:(.text.vsscanf+0x10): undefined reference to `_getf'
C:/ethernut-5.1/nutbld/lib\libnutcrt.a(time.o): In function `time':
time.c:(.text.time+0x8): undefined reference to `NutGetSeconds'
C:/ethernut-5.1/nutbld/lib\libnutcrt.a(time.o): In function `stime':
time.c:(.text.stime+0xe): undefined reference to `NutGetSeconds'
C:/ethernut-5.1/nutbld/lib\libnutcrt.a(fgetc.o): In function `fgetc':
fgetc.c:(.text.fgetc+0x1c): undefined reference to `_read'
C:/ethernut-5.1/nutbld/lib\libnutcrt.a(fputc.o): In function `fputc':
fputc.c:(.text.fputc+0x10): undefined reference to `_write'
C:/ethernut-5.1/nutbld/lib\libnutcrt.a(fputs.o): In function `fputs':
fputs.c:(.text.fputs+0x14): undefined reference to `_write'
C:/ethernut-5.1/nutbld/lib\libnutos.a(thread.o): In function `NutThreadResume':
thread.c:(.text.NutThreadResume+0x3e): undefined reference to `NutTimerProcessElapsed'
C:/ethernut-5.1/nutbld/lib\libnutos.a(event.o): In function `NutEventPostAsync':
event.c:(.text.NutEventPostAsync+0x44): undefined reference to `NutTimerStop'
collect2: ld returned 1 exit status
make[1]: *** [caltime.elf] Error 1
make: *** [all] Error 2



Ingenieurbüro Kloos
Soft+Hardware Entwicklung
Haus Heyden Strasse 111
52134 Herzogenrath
Tel.: 02407/918376








More information about the En-Nut-Discussion mailing list