130 likes | 251 Views
GET A FEEL!! [ These are the steps to install and build the toolchain on windows(cygwin) ]. Building the toolchain. Building the toolchain. Download the following tools: For Windows Cygwin shell Sources for the toolchain Binutils Gcc [ gcc,g++,newlib] Gdb
E N D
GET A FEEL!! [ These are the steps to install and build the toolchain on windows(cygwin) ] Building the toolchain
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/
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
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)
Building the toolchain • Once the above folders are created, extract the files using the command. • For tar files: • tar xvf <filename.tar> • For tar.gz files: • tar zxvf <filename.tar.gz> • For bz2 files: • Bunzip2 <filename.bz2> ( this will extract the file as <filename.tar>, 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]
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!
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]
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}
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}
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
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..
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
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:<INSTALL_POINT>/bin