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

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

Re: [avr-gcc-list] simulavr build snaggle


From: Terry Porter
Subject: Re: [avr-gcc-list] simulavr build snaggle
Date: Thu, 14 Aug 2003 09:23:45 +1000

Hi Theodore, thank you so much for your fantastic Simulavr, it has made my use 
of the Avr micros possible (along with the other great tools of course:)

I've replied to your posting to Erik C already so please excuse any repetion 
here.


On Wed, 13 Aug 2003 09:52:56 -0700 (PDT)
"Theodore A. Roth" <address@hidden> wrote:

> 
> 
> On Wed, 13 Aug 2003, Terry Porter wrote:
> 
> > >    Soooo, I'm kinda hoping a kind soul has a good suggestion.
> >
> > I have a workaround :-
> > .........
> > Copy the libs that avr-libc-20030512cvs installed to where Avr-Gcc
> > really wants them
> >
> > This was where I hit my first snag, because after compiling my test
> > program, when it came to linking, the linker barfed because it
> > couldn't find a crts*.o file. It seems that the libraries installed
> > by avr-libc-20030512cvs are in the wrong place, or gcc-avr is
> > looking for them in the wrong place, so :
> >
> > cp -r /usr/local/avr/lib/*    /usr/local/avr/lib/gcc-lib/avr/3.3
> > ...................
> 
> This should not be necessary.

I followed all the documentation to the letter and concluded that the toolset 
mix I was using
had a bug. I'm a hardware guy and coding is only something I've taught myself, 
so I am very patchy
especially in complex makefiles etc. 

> I suspect that either avr-libc or gcc
> were configured incorrectly, possibly both.

The config is seemed quite straightforward, and listed below are the steps I 
used to install my Avr-Gcc toolchain, can you see any errors here ?

binutils-2.13.90.0.18:
./configure --target=avr --prefix=/usr/local/avr 
make
make install 

gcc-3.3:
./configure --target=avr --prefix=/usr/local/avr --disable-nls 
--enable-languages=c
make
make install

avr-libc-20030805cvs:
CC=avr-gcc PREFIX=/usr/local ./doconf
./domake
./domake install


Simulavr Cvs download 11Aug2003:
./bootstrap
./configure --target=avr --prefix=/usr/local/avr
make
make install

(Note your Simulavr complained at this point as the test failed due to the fact 
it couldnt find
crts8515.o, a nice croscheck I thought :)

gdb+dejagnu-20030810:
./configure --target=avr --prefix=/usr/local/avr
make 
make install

> Gcc should only be looking
> for libs that gcc provides in $(prefix)/avr/lib/gcc-lib.

Unfortunately it's looking for libraries here:-
/usr/local/avr/lib/gcc-lib/avr/3.3

> 
> On my system, I configure both with --prefix=$HOME/local/avr and
> $HOME/local/avr is a sim-link to $HOME/local/avr-<date> so I can
> revert to a working tool chain should I hose things (or the cvs
> versions I work from are hosed). I have a script which automates
> updating my local cvs trees, configuring, building and installing all
> the tools and handles the dated directory.

Great idea. Being new to Avr-Gcc, I followed the /usr/local/avr with local user 
wrx strategy.

> 
> Here's where crts8535.o got installed (the first one is in the cvs
> src dir):

Here is where crts8535.o got installed on my system:-
/usr/local/avr/lib/crts8535.o

And the Gcc config:
address@hidden:~/projects/avr-test/avr-samples$ make
avr-gcc -v -g -mmcu=atmega8 -o js1.elf -Wl,-Map,js1.map js1.o
Reading specs from /usr/local/avr/lib/gcc-lib/avr/3.3/specs
Configured with: ./configure --target=avr --prefix=/usr/local/avr --disable-nls 
--enable-languages=c
Thread model: single
gcc version 3.3

> 
> address@hidden:~$ locate crts8535.o
> /home/roth/dev/tools/avr-libc-cvs/obj-avr/crt1/crts8535.o
> /home/roth/local/avr-20030324/avr/lib/crts8535.o
> /home/roth/local/avr-20030507/avr/lib/crts8535.o
> /home/roth/local/avr-20030710/avr/lib/crts8535.o
> /home/roth/local/avr-20030807/avr/lib/crts8535.o
> 
> Notice that the path doesn't mention gcc it.

Neither does my install, but Gcc is looking for the libaries in: 
/usr/local/avr/lib/gcc-lib/avr/3.3/

> In theory, you should be
> able to have multiple versions of avr-gcc installed and all of them
> using the same avr-libc headers and libs.

That makes sense to me, perhaps its a Gcc >3.2 bug ?

I've installed the Avr-gcc toolset quite a few times, using my own system Gcc 
of 3.2 and then 3.3, the results have been the same. I'd be more than happy to 
perform any changes that you might like to try ?

Thanks for your reply and your time.

-- 
Kind Regards
Terry
* See my Gnu/Linux EDA webpage at : http://milkstone.d2.net.au/             
* Free Software provided by GNU; 
http://www.gnu.org/philosophy/free-software-for-freedom.html 


reply via email to

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