OpenCores
URL https://opencores.org/ocsvn/nnARM/nnARM/trunk

Subversion Repositories nnARM

[/] [nnARM/] [web_uploads/] [GT.shtml] - Rev 6

Compare with Previous | Blame | View Log

<!--# set var="title" value="Title" -->
<!--# include virtual="/ssi/ssi_start.shtml" -->
<b><font size=+2 face="Helvetica, Arial"color=#bf0000>Project Name: nnARM</font></b><p><table  align=center border=1 cellPadding=2 cellSpacing=0 width="100%" valign="top"><tbody><tr bgcolor=#bbccff>    <td align=center valign=center>               
<a href="./News.shtml">News</a>               |
<a href="./People.shtml">People</a>               |
<a href="./PR.shtml">Press & Release</a>               |
<a href="./Introduction.shtml">Introduction</a>               |
<a href="./Documentation.shtml">Documentation</a>               |
<a href="./Download.shtml">Download</a>               |
<a href="./Testbench/Testbench.shtml">Testbench</a>               |
<a href="./GT.shtml">GNU Tools</a>               |
<a href="./BS.shtml">Business</a>               |
<a href="mailto:nnarm@opencores.org">Mail list</a>               |
<a href="mailto:shengyu_shen@hotmail.com">Contact me</a>    </td></tr></tbody></table><p><center><font color="#bf0000" size=+3><b>GNU Tools</b></font></center></p><p><font  color="000088"size=+1><b>1 Why provide GNU Tools<br><br></b></font><font><b>There are many people who do not have a copy of ADS or SDT from ARM Inc.  But they may want to join the development of nnARM.  So I provide GNU Tools for ARM here.<br><br></b></font><p><font  color="000088"size=+1><b>2 GNU Tools Chain<br><br></b></font><font><b>binutils-2.10.91.0.2<br>gcc-2.96<br>gdb-5.0<br>newlib-1.9.0<br><br>I found these tools (except newlib-1.9.0) on the RedHat 7.1 source code CD, you can also download them from <a href="ftp://ftp.gnu.org/gnu/">ftp://ftp.gnu.org/gnu/</a><br>And newlib-1.9.0 can be downloaded from <a href="ftp://sourceware.cygnus.com/pub/newlib/">ftp://sourceware.cygnus.com/pub/newlib/</a><br></b></font><p><font  color="000088"size=+1><b>3 Configure and Build<br><br></b></font><font><b>It is very simple to configure and build, and I will describe the process below:<br><br>First, you must download all the tools packages, and place them in the same directory, assume /root/newgnu<br><br>Then unpack them with tar to the current directory, you will get four sub directories each containing source code of a package:<br>/root/newgnu/binutils-2.10.91.0.2<br>/root/newgnu/gcc-2.96-20000731<br>/root/newgnu/gdb-5.0<br>/root/newgnu/newlib-1.9.0<br><br>Because I want to build tools for various kinds of targets such as arm-elf and arm-aout, I use a new directory other than the source code directory to configure and build.  Use the following commands to create new directories:<br><br>mkdir /root/newgnu/build-bin<br>mkdir /root/newgnu/gcc<br>mkdir /root/newgnu/newlib<br>mkdir /root/newgnu/gdb<br><br>First, you must configure and Build binutils package<br>I have a script that does it automaticlly<br><br>../binutils-2.10.91.0.2/configure --target=arm-elf --prefix=/usr/local -v<br><br>you must run this script in /root/newgnu/build-bin, if there is no error, then just type the following command to build:<br><br>make all<br><br>if there still is no error, type in the following command to install<br><br>make install<br><br>Next, to configure and build gcc<br><br>change to the source code directory of gcc, and add a symbolic link to the content of newlib so that configure can find newlib<br><br>ln -s /root/newgnu/newlib-1.9.0/newlib newlib <br>ln -s /root/newgnu/newlib-1.9.0/libgloss libgloss <br><br>then you can start to configure gcc using the following command in /root/newgnu/build-gcc<br><br>../gcc-2.96-20000731/configure --host=i686-pc-linux --target=arm-elf --prefix=/usr/local -v--with-newlib<br><br>then use the following command to build and install gcc:<br><br>make all install<br><br>if no error, then continue to build newlib, goto /root/newgnu/build-newlib and run the following command:<br><br>../newlib-1.9.0/configure --host=i686-pc-linux --target=arm-elf --prefix=/usr/local -v <br><br>if no error then run the following command to build and install:<br><br>make all install<br><br>then run the following command to configure and build and install gdb:<br><br>CC=/usr/bin/gcc<br>../gdb-5.0/configure --host=i686-pc-linux --target=arm-elf --prefix=/usr/local -v<br>make all<br>make install<br><br>when I run make all, the compiler tells me that it "does not know the storage size of struct tm in file /root/newgnu/gdb-5.0/gdb/rdi-share/devsw.c in line 39 and 69"<br>to solve this problem, just comment out these two lines, because they just declare two variables that are never used<br>run the above commands again and all is OK<br><br></b></font><p><font  color="000088"size=+1><b>4 How to use GNU Tools<br><br></b></font><font><b>For gcc, just use "arm-elf-gcc" to replace "gcc" to compile your program<br><br>For gdb, just use following command:<br><br>arm-elf-gdb program -x gdb-cmds<br><br>gdb-cmds is a command file for arm-elf-gdb, its content is listed below:<br><br>target sim<br>load<br><br>then you can debug programs with your favorite commands<br>Of course, please make sure that /usr/local/bin is in your path<br></b></font><p><font  color="000088"size=+1><b>5 insight:GUI for gdb<br><br></b></font><font><b>insight is a GUI for gdb, when you download insight, you also get gdb in the same package.  I downloaded insight-5.0 from <a href="ftp://mirrors.rcn.net/pub/sourceware/gdb/releases/"> ftp://mirrors.rcn.net/pub/sourceware/gdb/releases/</a><br><br>The process of configuration and build of insight is very similar to gdb-5.0.  In fact, Insight is GDB with a GUI, so the only difference is the path of the source code.  If you place source code in the same directory as gdb, then you can use exactly the same method to build and install it<br><br>when you want to debug, just type in "arm-elf-gdb" to active the gdb with GUI<br><br></b></font><!--# include virtual="/ssi/ssi_end.shtml" -->
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.