[En-Nut-Discussion] Can't correctly build NutOS 4.8.9 on Fedora 14 for Ethernut 2.1b

Harald Kipp harald.kipp at egnite.de
Mon Apr 18 16:25:08 CEST 2011


Hi Bernard,

On 4/18/2011 3:33 PM, Bernard Fouché wrote:
> Le 16/04/2011 16:04, Harald Kipp a écrit :
>> Same problem here when using Nut/OS 4.8.9 with avr-gcc 4.3.4 and
>> avr-libc 1.6.7. For some reason something is broken with relative paths.
>>
>> Please try absolute paths
>>
>>     Repository: /home/bernard/ethernut/nut/conf/repository.nut
>>     Source Directory: /home/bernard/ethernut/nut
>>     Platform: avr-gcc
>>     Build directory: /home/bernard/ethernut/nutbld
>>     Appl. Directory: /home/bernard/ethernut/nutapp
>>     Programmer: avr-dude
>>
>> All other settings should be left empty.
> It does not work either: the compilation breaks reporting absolute paths
> instead of relative ones ;-) :
> 
> 14:39:34: Nut/OS Configurator Version 2.0.9
> 14:39:34: Linked to wxWidgets 2.8.11
> 14:39:34: Running on Linux 2.6.35.12-88.fc14.i686.PAE i686
> 14:39:34: Working in /home/bernard/ethernut/ethernut-4.8.9
> 14:39:35: Failed to load help file
> 14:39:43: Loading /home/bernard/ethernut/nut/conf/repository.nut
> 14:39:43: Loading
> /home/bernard/ethernut/ethernut-4.8.9/conf/ethernut21b.conf

Do not use ethernut-4.8.9. Load the conf file from
/home/bernard/ethernut/nut/conf/
as 
 
> I try running NutConf with absolute path from /home/bernard/ethernut or
> /home/bernard/ethernut/nut.

Run it from /home/bernard/ethernut only. Do not try anything else.


> Thanks to strace(1) I see that make(1) enters nutbld/arch . Since
> avr-gcc is launched without any '-I../..whatever_is_needed', it can't
> find the header files. I have added in UserConf.mk:
> 
> CFLAGS+=-I../../nut/include

No, do not add anything. Leave everything as it is. And, btw. why relative paths again instead of absolute?

 
> But then avr-gcc does not know what MCU is concerned, I have to add to
> the previous string:
> 
> -mmcu=atemega128

No, this is not required. Don't add this.

 
> It seems that defining that I use an Ethernut 2.1b does not bring in all
> the 2.1b stuff and every define which is target related is ignored by
> the build process. When I define:
> 
> -DNUT_CPU_FREQ=14745600

Everything is included in the Ethernut 2.1 conf file. Do not add this unless you need it.

 
> What is problematic with nutconf is the difficulty to get a trace of
> what tool runs in what directory, what file is processed before running
> make(1), etc...

As explained in the software manual (I think it is, isn't it), in case of any problems you may open a shell, change to nutbld and run 'make clean all install' to see the full command output.

Let me repeat the most important piece:

> Since
> avr-gcc is launched without any '-I../..whatever_is_needed', it can't
> find the header files.

This should not happen. Can you please open a command line and then

 cd ~/ethernut/nut
 make clean

and then execute

 make all

and send the related output of the first avr-gcc execution? It should be

make -C arch
make[1]: Entering directory `/home/bernard/ethernut/nutbld/arch'
avr-gcc -c -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall -Werror -Wstrict-prototypes -Wa,-ahlms=context_gcc.lst -DETHERNUT2 -D__HARVARD_ARCH__ -I/home/bernard/ethernut/nutbld/include  -I/home/bernard/ethernut/nut/include  /home/bernard/ethernut/nut/arch/avr/os/context_gcc.c -o avr/os/context_gcc.o

May be, just to make sure to start with a clean environment, remove /home/bernard/ethernut/nutapp and /home/bernard/ethernut/nutbld and re-create them with the Configurator using "Build Nut/OS". This makes sure that all your previous mods are gone. 

One thing I can imagine is, that your environment contains something, that may be misinterpreted by make. But your command line output should give us more informations.

Regards,

Harald





More information about the En-Nut-Discussion mailing list