Difference between revisions of "Programming for A13 in debian"
(→Programming on the A13 board) |
|||
Line 24: | Line 24: | ||
These instructions have been tested on ubuntu only however they may work for other distributions. | These instructions have been tested on ubuntu only however they may work for other distributions. | ||
+ | ==== Install eclipse ==== | ||
+ | |||
+ | Eclipse is a GUI which enables easy compilation and debugging when the appropriate tools have been installed. | ||
+ | |||
+ | This may be able to be installed using the package manager on your linux system. | ||
− | + | '''Manual eclipes install'''<br /> | |
+ | To manually install the most up to date eclipse perform the following | ||
+ | |||
+ | Go to the eclipse download section | ||
+ | |||
+ | [http://www.eclipse.org/downloads/ Eclipse download] Download to your linux machine the suitable eclipse version. | ||
+ | |||
+ | Decompress the downloaded file into any directory you like by moving the downloaded file to your desired directory. | ||
+ | Open a terminal, go to the directory and decompress with the command | ||
+ | |||
+ | tar -xzvf FILENAME. | ||
+ | |||
+ | This will create a directory in this location called eclipse | ||
+ | Within this directory is the executable eclipse.exe | ||
+ | |||
+ | It is recommended to create a launcher on your desktop which points to this executable file to make it easier to start. | ||
+ | |||
+ | '''Manual Java runtime install'''<br /> | ||
+ | As eclipse is written in java the jave runtime is required as well. | ||
+ | |||
+ | Download the java runtime. | ||
+ | |||
+ | [http://java.com/en/download/manual.jsp Java download page] Download the java RPM file that your eclipse version requires. | ||
+ | Follow the instructions on the java download page beside the download to install | ||
+ | Your eclipse installation should now start up. | ||
==== Install the tool chain ==== | ==== Install the tool chain ==== |
Revision as of 23:30, 29 December 2012
THIS IS A WORK IN PROGRESS
Contents
Programming for A13 in debian
There are 2 main methods to create programs for your A13 board.
- Cross compiling - Setting up a tool chain to compile on another system, which is typically faster and easier to manage.
- Programming on board - installing a compiler to compile directly on the board
The sections below contain instructions for these 2 methods
Cross Compiling
Cross compiling is usually performed on another linux machine, it seems the most common for doing this is ubuntu.
If you have compiled the kernel and setup the SD card you will already have most of the tool chain setup on your machine
Setting up the tool chain
The following instructions are to be performed on a linux machine which is not the A13 board.
Complete the following steps to setup the tool chain.
These instructions have been tested on ubuntu only however they may work for other distributions.
Install eclipse
Eclipse is a GUI which enables easy compilation and debugging when the appropriate tools have been installed.
This may be able to be installed using the package manager on your linux system.
Manual eclipes install
To manually install the most up to date eclipse perform the following
Go to the eclipse download section
Eclipse download Download to your linux machine the suitable eclipse version.
Decompress the downloaded file into any directory you like by moving the downloaded file to your desired directory. Open a terminal, go to the directory and decompress with the command
tar -xzvf FILENAME.
This will create a directory in this location called eclipse Within this directory is the executable eclipse.exe
It is recommended to create a launcher on your desktop which points to this executable file to make it easier to start.
Manual Java runtime install
As eclipse is written in java the jave runtime is required as well.
Download the java runtime.
Java download page Download the java RPM file that your eclipse version requires.
Follow the instructions on the java download page beside the download to install
Your eclipse installation should now start up.
Install the tool chain
Debugging on embedded using opensource tools The instructions contained in this wiki were originally sourced from this page
Some issues found for some users:
- Issue : After having installed eclipse and the toolchain the path and prefix for the compiler as listed in the example could not be found.
Solution : Look for the same prefix in a different path, /usr/bin is likely to hold the files.
- Issue : Having built the program and copied it to the A13 board it will not run resulting in "permission denied"
Solution: Check the permissions for the file are set to allow execution by typing #ls -l . if you dont see a lot of x's (3) in the first column its likely your cause. To change the permissions type #chmod ugo+x FileName
- Issue : executing the file returns "command not found"
Solution: A library file can not be found this is either /lib/ld-linux.so.3 or /lib/ld-linux-armhf.so.3 . To find the specific one your file is looking for open the executable in a text editor on the first line or 2 you will find the file name its looking for ld-linux.so.3 .