Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building the toolchain GET A FEEL!! [ These are the steps to install and build the toolchain on windows(cygwin) ]

Similar presentations


Presentation on theme: "Building the toolchain GET A FEEL!! [ These are the steps to install and build the toolchain on windows(cygwin) ]"— Presentation transcript:

1 Building the toolchain GET A FEEL!! [ These are the steps to install and build the toolchain on windows(cygwin) ]

2 Building the toolchain ● Download the following tools: – For Windows ● Cygwin shell ● Sources for the toolchain – Binutils – Gcc [ gcc,g++,newlib] – Gdb – Use the below link to download the files from the web: ftp://ftp.funet.fi/pub/mirrors/sourceware.cygnus.com/pub /

3 Building the toolchain ● Installing cygwin shell : – Download and run setup.exe to install cygwin prompt on windows – Download ( LATEST VERSIONS from the ftp site given in previous page..) following files ● binutils-020707.tar.bz2 ● gcc-core-3.1-20020510.tar.gz ● gcc-g++-3.1-20020510.tar.gz ● Gdb-5.2.tar.gz ● newlib-1.10.0.tar.gz

4 Building the toolchain ● Download the files under a folder “toolchain” and extract the files into separate folders for each.For example create another folder “src” on the same level and create sub-directories in src folder like “binutils”, “gcc” and “gdb” ● So there will be 2 folders toolchain ( which has all the downloaded files) and src( which has empty folders for each of these files, so that u can extract the files onto the folder)

5 Building the toolchain ● Once the above folders are created, extract the files using the command. – For tar files: ● tar xvf – For tar.gz files: ● tar zxvf – For bz2 files: ● Bunzip2 ( this will extract the file as, so later again use the tar command to get all the files) [Please note that all the bove command will extract files into the current folder]

6 Building the toolchain ● Here are the steps to build the toolchain for various platforms ( taking the example of building it for “x86” platform, CAN BE REPLACED BY “arm” or “ppc” as needed) ● Do follow the exact method as given since it will really make things really easy!! ● Build binutils, gcc and gdb in the same order as it makes life easy!

7 Building the toolchain – Make a directory under root by name “temp” ● [ /toolchain, /src and /temp are the folder that should be visible] – Build the tools from this folder, since later it can be deleted once tols are built – Under temp folder create 3 folders by the following names:- – t-binutils, t-gcc and t-gdb [ so it will look like /temp/t-binutils /temp/t-gcc and /temp/t-gdb]

8 Building the toolchain ● Building binutils : – Go to /temp/t-binutils folder and at the prompt type the following command to configure binutils: ●../../src/binutils/binutils-020707/configure --target=i386-elf –prefix=/toolchain --exec-prefix=/toolchain/686pc-cygwin -v 2>&1 | tee configure.out – { If there are any problems configuring, refer to configure.out} – Now type the following command once configure is done without any errors: ● make -w all install 2>&1 | tee make.out – { If there are any problems making, refer to make.out}

9 Building the toolchain ● Building gcc: – Make sure that before building gcc, path is set :- PATH=/toolchain/686pc-cygwin/bin:$PATH – Go to /temp/t-gcc folder and at the prompt type the following command to configure : ●../../src/gcc/gcc-3.1-20020510/configure --target=i386-elf – prefix=/toolchain --exec-prefix=/toolchain/686pc-cygwin - v 2>&1 | tee configure.out – { If there are any problems, refer to configure.out} – Now type the following command: ● make -w all-gcc install-gcc LANGUAGES="c c++" 2>&1 | tee make.out – { If there are any problems, refer to make.out}

10 Building the toolchain ● Building gdb: – Once the tools binutils and gcc are built successfully, then gdb can be built. [Note that gdb is the debugger, so it can be built later also!!] – Go to /temp/t-gdb folder and at the prompt type the following command to configure : ●../../src/gdb/gdb-5.2/configure --target=i386-elf – prefix=/toolchain --exec-prefix=/toolchain/686pc-cygwin - v 2>&1 | tee configure.out – Now type the following command: ● make -w all install CC='gcc -mwin32' 2>&1 | tee make.out

11 Building RTEMS ● Note that for rtems the toolchain can be built by giving the “–target=-i386-rtems” option for binutils, gcc and gdb building. ● We have to give the target option since the build will be OS and Processor specific. ● Next we will talk about how to build rtems fro source..

12 Building RTEMS ● Visit the following site and download the latest RTEMS tar ball : – RTEMS Version: 4.5.0 – FTP Site: ftp.OARcorp.com – Directory: /pub/rtems/releases/4.5.0 – File: rtems-4.5.0.tgz

13 Building RTEMS ● Extract the.gz file to a folder under /src. A new folder by name rtems-4.5.0 will be created. ● Add the following in the PATH variable: – export PATH=$PATH: /bin


Download ppt "Building the toolchain GET A FEEL!! [ These are the steps to install and build the toolchain on windows(cygwin) ]"

Similar presentations


Ads by Google