The following instructions show how to install the GCC cross-compiler installation that can be used to compile C and C++ programs that will run in either firmware. The final target will be determined by the API choice used to create the program.
Open the Terminal to use this program. The ARM cross compiler program can be downloaded from this link or using the command:
wget -c http://www.codesourcery.com/sgpp/lite/arm/portal/package4571/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
Create a directory that will contain the program:
Uncompress the compiler installation file using:
tar -jxvf ~/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C ~/CodeSourcery/
Add the compiler path using:
echo export PATH=$PATH:~/CodeSourcery/arm-2009q1/bin/ >> ~/.bashrc && . ~/.bashrc
Verify that the cross-compiler is properly installed using:
This should show a long message:
Using built-in specs. Target: arm-none-linux-gnueabi Configured with: /scratch/mitchell/.... ... Thread model: posix gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203)
I have found some cases where the system reports an error message similar to this:
bash: XXXXX/CodeSourcery/arm-2009q1/bin/arm-none-linux-gnueabi-c++: No such file or directory
This is caused because the compiler is a 32-bit application and requires 32-bi libraries to run. The issues is resolved by installing the missing libraries using:
sudo apt-get install gcc-multilib
Download the ARM cross compiler from:
Install the program in the local hard drive (e.g. c:\CodeSourcery) and add the compiler path to the system.
Download the Windows version of the make and rm programs in the computer. A copy of these programs can be found here. Uncompress them in a local directory (e.g. c:\tools ).
In order to communicate and being able to transfer data and programs to the brick, we need to install a telnet, a ssh and a scp client programs. I have tested PuTTy, (telnet and ssh clients) and PSCP (scp client). After downloading these programs, place the executable files in the local hard drive (e.g. c:\tools).
Add the path of the recently installed programs (c:\tools) to the system.
After installing these tools, users should be able to use most of the command line instructions provided to Linux users.
The ARM cross-compiler can be downloaded from:
After installing the program, you need to add the compiler path, this can be done using:
echo export PATH=/usr/local/carlson-minot/crosscompilers/bin/:$PATH >> ~/.bash_profile && . ~/.bash_profile
Mac users can refer to the Linux tutorials for further information.