[En-Nut-Discussion] Ethernut 2.1 and AVR studio

Jim Patchell patchell at cox.net
Sat Jan 17 17:54:16 CET 2009


Ah...this is something I can help you with, as I just went through this 
exersize just a few days ago.

First, how I solved the problems.  I looked in a make file for one of 
the applications to see what linker options were being used.  I then 
added those to the project.  Also, there are some compile time macros 
that need to be added as well.  I am thinking I should put a little doc 
together, just so I won't have to figure this out again the next time.

Also...it is important to use the correct version of WinAVR with a 
particular version of Ethernut.

Oh dear....getting late...hope this will help a bit...if you still can't 
figure it out (or maybe somebody else will be able to give you more 
specifics)...I can give you that info a bit later on...

-Jim


Xeeon wrote:
> Hello. Is it possible to compile NutOS in AVR studio using WinAVR? I tried
> that many times but with many errors. 
> 
> avr-gcc -I"C:\Ethernut 2.1B\..\ethernut-4.6.4\nutbld\include" -I"C:\Ethernut
> 2.1B\..\ethernut-4.6.4\nut\include"  -mmcu=atmega128 -Wall -gdwarf-2
> -std=gnu99         -DF_CPU=16000000UL -Os -fsigned-char -MD -MP -MT
> Ethernut.o -MF dep/Ethernut.o.d  -c  ../Et
> hernut.c
> 
> ../Ethernut.c: In function 'NutAppMain':
> ../Ethernut.c:878: warning: no return statement in function returning
> non-void
> avr-gcc -mmcu=atmega128 -Wl,-Map=ethernut.map Ethernut.o urom.o 
> "C:\ethernut-4.6.4\nut\lib\gcc\ethernut21b\nutinit.o" 
> -L"C:\ethernut-4.6.4\nutbld\lib"  -lnutarch -lnutc -lnutcpp -lnutcrt
> -lnutdev -lnutfs -lnutnet -lnutos -lnutpro  -o ethernut.elf
> c:/winavr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr51/crtm128.o:(.init9+0x0):
> undefined reference to `main'
> C:\ethernut-4.6.4\nutbld\lib\libnutnet.a(confnet.o): In function
> `NutNetSaveConfig':
> confnet.c:(.text+0x12): undefined reference to `NutNvMemSave'
> C:\ethernut-4.6.4\nutbld\lib\libnutnet.a(confnet.o): In function
> `NutNetLoadConfig':
> confnet.c:(.text+0x3a): undefined reference to `NutNvMemLoad'
> C:\ethernut-4.6.4\nutbld\lib\libnutos.a(confos.o): In function
> `NutSaveConfig':
> confos.c:(.text+0x1e): undefined reference to `NutNvMemSave'
> C:\ethernut-4.6.4\nutbld\lib\libnutos.a(confos.o): In function
> `NutLoadConfig':
> confos.c:(.text+0x40): undefined reference to `NutNvMemLoad'
> C:\ethernut-4.6.4\nutbld\lib\libnutpro.a(httpd.o): In function
> `NutHttpProcessRequest':
> httpd.c:(.text+0xb30): undefined reference to `_filelength'
> httpd.c:(.text+0xba2): undefined reference to `stat'
> httpd.c:(.text+0xca6): undefined reference to `_filelength'
> httpd.c:(.text+0xd24): undefined reference to `_read'
> C:\ethernut-4.6.4\nutbld\lib\libnutpro.a(asp.o): In function
> `NutHttpProcessAsp':
> asp.c:(.text+0x6e): undefined reference to `_filelength'
> asp.c:(.text+0xd8): undefined reference to `_read'
> C:\ethernut-4.6.4\nutbld\lib\libnutpro.a(ssi.o): In function
> `NutSsiProcessVirtual':
> ssi.c:(.text+0x3c8): undefined reference to `_filelength'
> ssi.c:(.text+0x43c): undefined reference to `_filelength'
> ssi.c:(.text+0x480): undefined reference to `_read'
> C:\ethernut-4.6.4\nutbld\lib\libnutpro.a(ssi.o): In function
> `NutHttpProcessSHTML':
> ssi.c:(.text+0x5ae): undefined reference to `_read'
> ssi.c:(.text+0x618): undefined reference to `_seek'
> ssi.c:(.text+0x660): undefined reference to `_seek'
> ssi.c:(.text+0x8b6): undefined reference to `_filelength'
> ssi.c:(.text+0x8f6): undefined reference to `_read'
> ssi.c:(.text+0x988): undefined reference to `_seek'
> make: *** [ethernut.elf] Error 1
> Build failed with 20 errors and 1 warnings...
> 

-- 
----------------------------------------------
Visit http://www.noniandjim.com
SDIY: http://www.noniandjim.com/Jim/index.html
----------------------------------------------





More information about the En-Nut-Discussion mailing list