avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Incorrect path to avr lib objects


From: Gahame Kelly
Subject: [avr-gcc-list] Incorrect path to avr lib objects
Date: Mon, 23 Jul 2001 13:11:08 +1000

Hi All.
Thanks Arne & MWP for responding.

I have also carried out the install as below which closely follows
what you have done.

Installation af binutils:

a) tar xzf binutils-2.11.2.tar.gz
b) cd binutils-2.11.2
c) ./configure --target=avr \
               --prefix=/opt/avr
d) make
e) make install


Update PATH to include: /opt/avr/bin


Installation af GCC:

f) tar xzf gcc-3.0.tar.gz
g) cd gcc-3.0
h) ./configure --target=avr \
               --prefix=/opt/avr \
               --enable-languages=c
i) make
j) make install

I still get a problem in that avr-gcc/avr-ld cannot find the crts2313.o on the
following Make.

address@hidden:~/AVR/AVR-TEST/hg-sware-0.91/board > make
avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes 
-Wa,-ahlms=keymain.lst -mmcu=at90s2313 -I/opt/avr/include keymain.c -o 
keymain.o
keymain.c:71: warning: return type of `main' is not `int'

avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes 
-Wa,-ahlms=keysta.lst -mmcu=at90s2313 -I/opt/avr/include keysta.c -o keysta.o

avr-gcc -c -O3 -Wall -fomit-frame-pointer -Wstrict-prototypes 
-Wa,-ahlms=lcd.lst -mmcu=at90s2313 -I/opt/avr/include lcd.c -o lcd.o

avr-gcc  keymain.o keysta.o lcd.o   -L /opt/avr/lib 
-Wl,-Map=keymain.map,--cref -mmcu=at90s2313 -o keymain.elf

/opt/avr/lib/gcc-lib/avr/3.0/../../../../avr/bin/ld: cannot open crts2313.o: 
No such file or directory
make: *** [keymain.elf] Error 1

*********
Now if I put the crts2313.o file in the pwd it works, as shown below.

*********

address@hidden:~/AVR/AVR-TEST/hg-sware-0.91/board > mv crts2313.o.gmk 
crts2313.o


address@hidden:~/AVR/AVR-TEST/hg-sware-0.91/board > make
avr-gcc  keymain.o keysta.o lcd.o   -L /opt/avr/lib 
-Wl,-Map=keymain.map,--cref -mmcu=at90s2313 -o keymain.elf
avr-objcopy -O srec keymain.elf keymain.rom
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" -O srec 
keymain.elf keymain.eep

********

And everything is correct. So, it seems that the avr-gcc/avr-ld cannot find
the corresponding file: crts2313.o in the /opt/avr/lib

*******

address@hidden:/opt/avr > ls
avr  bin  include  info  lib  man  share

address@hidden:/opt/avr > cd lib

address@hidden:/opt/avr/lib > ls -l
total 3418
drwxr-xr-x    2 root     root          129 Jul 22 19:31 avr3
drwxr-xr-x    2 root     root          103 Jul 22 19:31 avr4
drwxr-xr-x    2 root     root          179 Jul 22 19:31 avr5
-rw-r--r--    1 root     root         2728 Jul 22 19:31 crtc8534.o
-rw-r--r--    1 root     root         1280 Jul 22 19:31 crts1200.o
-rw-r--r--    1 root     root         2984 Jul 22 19:31 crts2313.o
-rw-r--r--    1 root     root         2440 Jul 22 19:31 crts2323.o
-rw-r--r--    1 root     root         3168 Jul 22 19:31 crts2333.o
-rw-r--r--    1 root     root         2440 Jul 22 19:31 crts2343.o
-rw-r--r--    1 root     root         3196 Jul 22 19:31 crts4414.o
-rw-r--r--    1 root     root         3168 Jul 22 19:31 crts4433.o
-rw-r--r--    1 root     root         3464 Jul 22 19:31 crts4434.o
-rw-r--r--    1 root     root         3196 Jul 22 19:31 crts8515.o
-rw-r--r--    1 root     root         3464 Jul 22 19:31 crts8535.o
-rw-r--r--    1 root     root         1352 Jul 22 19:31 crttn11.o
-rw-r--r--    1 root     root         1416 Jul 22 19:31 crttn12.o
-rw-r--r--    1 root     root         1620 Jul 22 19:31 crttn15.o
-rw-r--r--    1 root     root         2440 Jul 22 19:31 crttn22.o
-rw-r--r--    1 root     root         1416 Jul 22 19:31 crttn28.o
drwxr-xr-x    3 root     root           54 Jul 22 19:30 gcc-lib
-rw-r--r--    1 root     root      2429930 Jul 22 19:28 libbfd.a
-rwxr-xr-x    1 root     root          648 Jul 22 19:28 libbfd.la
-rw-r--r--    1 root     root       114228 Jul 22 19:31 libc.a
-rw-r--r--    1 root     root       635576 Jul 23 12:48 libiberty.a
-rw-r--r--    1 root     root        79764 Jul 22 19:31 libm.a
-rw-r--r--    1 root     root       154668 Jul 22 19:28 libopcodes.a
-rwxr-xr-x    1 root     root          660 Jul 22 19:28 libopcodes.la


***************

This is very strange as it all exists as shown below. However, running
avr-gcc -print-search-dirs it doesn't correctly point to /opt/avr/lib so there
must be a configuration directive to make avr-gcc/avr-ld see it.

**************

install: /opt/avr/lib/gcc-lib/avr/3.0/
programs: 
=/opt/avr/lib/gcc-lib/avr/3.0/:/opt/avr/lib/gcc-lib/avr/3.0/:/opt/avr/lib/gcc-lib/avr/:/usr/lib/gcc/avr/3.0/:/usr/lib/gcc/avr/:/opt/avr/lib/gcc-lib/avr/3.0/../../../../avr/bin/avr/3.0/:/opt/avr/lib/gcc-lib/avr/3.0/../../../../avr/bin/
libraries: 
=/opt/avr/lib/gcc-lib/avr/3.0/:/usr/lib/gcc/avr/3.0/:/opt/avr/lib/gcc-lib/avr/3.0/../../../../avr/lib/avr/3.0/:/opt/avr/lib/gcc-lib/avr/3.0/../../../../avr/lib/

I have looked through the GNU/gcc FAQ and other bits and pieces on
configuration setup, but can't solve this last issue.

Any assistance much appreciated.
Thanks Grahame.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]