<commit_before>Toolchain setup for the MicroZedBoard - <NAME> 2014

Prompt:

    ~$ means your pc
    microZed$ the MicroZed

Toolchain
-----------
        
We will be using the armhf (hardware floating point support)

- In debian or Ubuntu install the next packages:

    ~$ sudo dpkg --add-architecture i386
    ~$ sudo apt-get update
    ~$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386 

1)	The first step is to have a linux running in your MicroZed

- Download/Extract:

    ~$ cd
    ~$ mkdir toolchains
    ~$ cd toolchains
    ~$ wget -c https://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz
    ~$ tar xf gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz
    ~$ export CC=~/toolchains/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-
    
- or if you have added already the path in .bashrc

    ~$ export CC=arm-linux-gnueabihf-

- Test:
    
    ~$ ${CC}gcc --version
    arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease)
    Copyright (C) 2014 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-  To export it permanently
    ~$ echo "export PATH=~/toolchains/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin:$PATH" >> ~/.bashrc

-   compile a hello world

    ~$ ${CC}gcc main.c -o hello.elf

2)	The second is to crosscompile an user space program and run it in your board

    copy the hello world in your board:
    ---------------------------------

    copy the elf file in your board:
    ~$ scp hello.elf root@192.168.1.103:/root
    ~$ ssh root@192.168.1.103

    microZed# now we are in the Zed
    microZed# cd /root
    microZed# ./hello.elf
    
    
Optinal use the toolchain from the package manager
=================================================

Background
----------

https://wiki.debian.org/ArmHardFloatPort

Install armhf compiler on Debian
--------------------------
<commit_msg>format<commit_after>Toolchain setup for the cross compiling
=====================================

Tool chain setup for armhf (hardware floating point support)

Background
----------

https://wiki.debian.org/ArmHardFloatPort


Toolchain from Linaro
---------------------
        


- In debian or Ubuntu install the next packages:

    ~$ sudo dpkg --add-architecture i386
    
    ~$ sudo apt-get update
    
    ~$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386 

1)	The first step is to have a linux running in your MicroZed

- Download/Extract:

    ~$ cd
	~$ mkdir toolchains
    ~$ cd toolchains
    ~$ wget -c https://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz
    ~$ tar xf gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz
    ~$ export CC=~/toolchains/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-
    
- or if you have added already the path in .bashrc

    ~$ export CC=arm-linux-gnueabihf-

- Test:
    
    ~$ ${CC}gcc --version
    arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease)
    Copyright (C) 2014 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-  To export it permanently
    ~$ echo "export PATH=~/toolchains/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin:$PATH" >> ~/.bashrc

-   compile a hello world

    ~$ ${CC}gcc main.c -o hello.elf

2)	The second is to crosscompile an user space program and run it in your board

    copy the hello world in your board:
    ---------------------------------

    copy the elf file in your board:
    ~$ scp hello.elf root@192.168.1.103:/root
    ~$ ssh root@192.168.1.103

    microZed# now we are in the Zed
    microZed# cd /root
    microZed# ./hello.elf
    
    
Optinal use the toolchain from the package manager
=================================================



Install armhf compiler on Debian
--------------------------

{'fraction_non_alphanumeric': 0.16546595398559144, 'fraction_numerical': 0.05298628863583547, 'mean_word_length': 2.5926544240400666, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5781921', 'n_tokens_mistral': 1655, 'n_tokens_neox': 1423, 'n_words': 407}