Difference between revisions of "TS-4900 Application Development"

From embeddedTS Manuals
(Created page with "The default Yocto image provides both onboard libraries, and cross toolchains which are available here: * [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/d...")
 
Line 9: Line 9:
</source>
</source>


When you want to build an application, you would first source the environment for the toolchain:
When you want to build an application you would first source the environment for the toolchain:
<source lang=bash>
<source lang=bash>
source /opt/poky-systemd/1.6.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
source /opt/poky-systemd/1.6.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
Line 23: Line 23:
</source>
</source>


If you prefer to develop onboard you can use the serial console on the board, or bring up networking and ssh to the board.  Yocto provides the common development utilities, vim, gcc, g++, gdb, make, autoconf, binutils, and more in the image.
If you prefer to develop onboard you can use the serial console on the board, or bring up networking and ssh to the board.  Yocto provides the common development utilities, vim, gcc, g++, gdb, make, autoconf, binutils, and more in the image.  See the next sections for using the cross toolchain with IDEs.

Revision as of 16:56, 30 July 2014

The default Yocto image provides both onboard libraries, and cross toolchains which are available here:

In the case of either toolchain you would run these commands to install them:

chmod a+x poky-systemd-*.sh
sudo ./poky-systemd-eglibc-*.sh

When you want to build an application you would first source the environment for the toolchain:

source /opt/poky-systemd/1.6.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

# Assuming you have a hello.c:
$CC hello.c -o hello

#If you cat the environment file you can see all of the paths this sets up.
echo $CC
$ echo $CC
#arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon 
#     -mtune=cortex-a9 --sysroot=/opt/poky-systemd/1.6.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi

If you prefer to develop onboard you can use the serial console on the board, or bring up networking and ssh to the board. Yocto provides the common development utilities, vim, gcc, g++, gdb, make, autoconf, binutils, and more in the image. See the next sections for using the cross toolchain with IDEs.