LEOX home page Free Hardware and Software Resources for System on Chip


News & Stats
Contact Us
Want to help
Mailing list
 

FAQ
HOWTO
mini-HOWTO
 

Development Tools
Hardware IPs
Software IPs
 


From:	The LEOX team
Sent:	Monday, November 06, 2000 11:59 PM
To:	leon_sparc@egroups.com
Subject: [leon_sparc] mini-HOWTO-1: sparc-linux cross compiler/debugger

Hi all,

Just this mini-HOWTO to help everyones for:

	- generating a cross compiler from the latest binutils/GCC sources
	- generating a cross debugger from the latest insight/GDB sources

____________________________________________________


1) Grab the tarballs sources:
____________________________

The GNU binary utilities (ar, nm, ranlib, objcopy ...): binutils-2.10.1.tar.gz (7.1 MB):
ftp://ftp.freesoftware.com/pub/sourceware/binutils/releases/binutils-2.10.1.tar.gz

The GNU C compiler: gcc-core-2.95.2.tar.gz (8.6 MB):
ftp://ftp.freesoftware.com/pub/sourceware/gcc/releases/gcc-2.95.3/gcc-core-2.95.3.tar.gz

The GNU source-level debugger (version 5.0) and its Tk front end: insight-5.0.tar.gz (18.3 MB)
ftp://ftp.freesoftware.com/pub/sourceware/gdb/releases/insight-5.0.tar.gz


2) Binutils compilation and installation:
________________________________________

Modify the prefix path to the directory where you want to install the binutils
binaries and man pages.

gunzip < tarballs/binutils-2.10.1.tar.gz | tar -xf -
mkdir -p binutils-2.10.1.BUILD
cd binutils-2.10.1.BUILD; ../binutils-2.10.1/configure --prefix=/opt/leox/gnu 
                                                       --target=sparc-linux
cd binutils-2.10.1.BUILD; make
cd binutils-2.10.1.BUILD; make install


3) GCC compilation and installation:
___________________________________

Modify the prefix path to the directory where you want to install the gcc
binaries and man pages.

gunzip < tarballs/gcc-core-2.95.3.tar.gz | tar -xf -
mkdir -p gcc-2.95.3.BUILD
cd gcc-2.95.3.BUILD; ../gcc-2.95.3/configure --prefix=/opt/leox/gnu 
                                             --target=sparc-linux 
                                             --with-newlib
cd gcc-2.95.3.BUILD; make
cd gcc-2.95.3.BUILD; make install


4) GDB and its Tk front-end (insight) compilation and installation:
__________________________________________________________________

Insight is a graphical user interface to GDB, the GNU Debugger written in 
Tcl/Tk by people working at Red Hat, Inc. and Cygnus Solutions.
We've been developing this debugger GUI since 1994. It has turned into 
a mature interface that is able to give you access to much of GDB's power.

This project is in its second generation. The original GUI was released back
in 1996 (called "gdbtk"), and has undergone a complete transformation since 
then.

Modify the prefix path to the directory where you want to install the gdb
and its associated front end binaries and man pages.

gunzip < tarballs/insight-5.0.tar.gz | tar -xf -
mkdir -p insight-5.0.BUILD
cd insight-5.0.BUILD ; ../insight-5.0/configure --prefix=/opt/leox/gnu 
                                                --target=sparc-elf
                                                --program-prefix=sparc-linux-
cd insight-5.0.BUILD ; make
cd insight-5.0.BUILD ; make install


5) Environment:
______________

The C Cross Compiler is now composed of two packages: the GNU C compiler (gcc)
and the associated GNU binary utilities (ar, nm, ranlib, objcopy ...).

Note that the output file format of the sparc-linux Cross Compiler is ELF
(Executable and Linking Format). ELF is a binary format more powerful and
flexible than the a.out binary format.

Do not forget to add:
	/opt/leox/gnu/bin to your PATH environment
	/opt/leox/gnu/man to your MANPATH environment

____________________________________________________


Hope this help.

The LEOX Team (team@leox.org)




LEOX.org - Free Hardware and Software resources for System on Chip
Copyright © 2000,2001 by The LEOX team
Ideas, requests, problems regarding LEOX.org? Send feedback.
Last modification: 2002/1/21 at 22:33
All brands and product names may be trademarks of their respective owners.
All information is provided "as is", there is no warranty that the information is correct or suitable for any purpose, neither implicit nor explicit.