# README-toolchains.ronetix # Downloading and installing toolchains # for AT91SAM9G45/AT91SAM9263/AT91SAM9261 based boards: # PM9G45, PM9263 and PM9261. # # Ronetix GmbH # www.ronetix.at # February, 2012 # Table of Contents: 1. Description 2. Ronetix provides several GNU toolchains 3. GNU toolchain notes 4. Download and install the GNU toolchain 5. Toolchains from OpenEmbedded 6. Bugs 1. Description The GNU Toolchain, is a combination of multiple projects: * GCC : GCC stands for "GNU Compiler Collection". GCC is an integrated distribution of compilers for several major programming languages. These languages currently include C, C++, Objective-C, Objective-C++, Java, Fortran, and Ada. Currently the Blackfin is supported by C, and C++. * Binutils : GNU Binutils are a collection of binary tools. The main ones are: the GNU linker (ld) and the GNU assembler (as). * Debugger : GNU debugger, allows you to see what is going on `inside’ another program while it executes -- or what another program was doing at the moment it crashed. 2. Ronetix provides several GNU toolchains The recommended one is "KaeilOS v2010.1 SDK". KaeilOS v2010.1 SDK at kaeilos-2010.1/ Linaro Toolchain Binaries 2012.07 - gcc 4.6.3, libgcc, for Cortex-A ronetix-arm-elf-4.4.1.tar.bz2 - gcc 4.4.1, newlib, ARM, Cortex ronetix-arm-linux-4.3.3.tar.bz2 - gcc 4.3.3, glibc ronetix-arm-linux-uclibc-4.1.2.tar.bz2 - gcc 4.1.2, uclibc ronetix-gnutools-arm-elf-4.1.1-linux.tar.bz2 - gcc 4.1.1, newlib ronetix-toolset-arm-elf-4.1.1-windows.exe - gcc 4.1.1, newlib, for Windows openzaurus-arm-linux-glibc-3.4.4.tar.bz2 - gcc 3.4.4, glibc ronetix-gnutools-arm-elf-3.2.1-linux.tar.bz2 - gcc 3.2.1, newlib 3. GNU toolchain notes The pre-built GNU toolchains can be found http://download.ronetix.info/toolchains/arm/ Linux: The Linux kernel requires a minimal GCC version in order to compile. To check that minimal version take a look at the README file in the Linux source directory. U-Boot: U-Boot can not be compiled with some toolchains because of (E)ABI conformation. The USE_PRIVATE_LIBGCC parameter allows the usage of different run-time support library(libgcc.a). More on using this parameter see README in U-Boot source directory. 4. Download and install the GNU toolchain A. Installation of "KaeilOS v2010.1 SDK" This is SDK produced by OpenEmbedded recipes. It includes and package management system opkg. It includes development sources form the packages in KaeilOS. Download the two files and extract them in the "/" directory. They could be extracted in any directory, and then the file "/usr/local/kaeilos/arm/environment-setup" have to be edited and prefix the "SDK_PATH" value with the "work directory". And also remove the line which sets the CPATH environment. Before compiling execute ". /usr/local/kaeilos/arm/environment-setup". The toolchain prefix is "arm-oe-linux-gnueabi-". $ wget http://download.ronetix.info/toolchains/arm/kaeilos-2010.1/kaeilos-2010.1-20110221-i686-linux-armv5te-linux-gnueabi-toolchain-extras.tar.bz2 $ wget http://download.ronetix.info/toolchains/arm/kaeilos-2010.1/kaeilos-2010.1-20110221-i686-linux-armv5te-linux-gnueabi-toolchain.tar.bz2 $ su - # tar -C / -xjf kaeilos-2010.1-20110221-i686-linux-armv5te-linux-gnueabi-toolchain-extras.tar.bz2 # tar -C / -xjf kaeilos-2010.1-20110221-i686-linux-armv5te-linux-gnueabi-toolchain.tar.bz2 # exit $ . /usr/local/kaeilos/arm/environment-setup $ echo '#include int main(int argc, char** argv) { printf("Hello World!\n"); return 0; } ' > hello.c $ arm-oe-linux-gnueabi-gcc hello.c -o hello B. The rest of the toolchains. The toolchains will be installed in the /usr/cross directory. $ wget http://download.ronetix.info/toolchains/arm/ronetix-arm-linux-4.3.3.tar.bz2 $ su - # cd / # tar xvfj ronetix-arm-linux-4.3.3.tar.bz2 # exit Setup the path: $ export PATH=/usr/cross/arm-linux-4.3.3/bin:$PATH 5. Toolchains(SDK) from OpenEmbedded Creating a toolchain is the same as creating a rootfs image. From the $OEBASE directory: $ source setup-kaeilos.sh /home/ivan/usr/src/oe/build/kaeilos $ bitbake meta-toolchain 6. Bugs Known issues in GDB stable version (6.8): Message "Value being assigned to is no longer active" appears when trying to modify register value. Make it work by executing "si" command the the register can be modified. GDB will not work reliably with code that omits the frame pointer.