Difference between revisions of "TS-4900 Application Development"

From embeddedTS Manuals
Line 1: Line 1:
Yocto provides cross toolchains including the native tools and required arm files.  First get  the toolchain by right clicking and "Save as":
Yocto provides cross toolchains including the native tools and required arm files.  First get  the toolchain by right clicking and "Save as":
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/morty/toolchain/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.2.1.sh x86_64]
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/morty/toolchain/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.2.2.sh x86_64]
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/morty/toolchain/poky-glibc-i686-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.2.1.sh i686]
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/morty/toolchain/poky-glibc-i686-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.2.2.sh i686]


In the case of either toolchain you would run these commands to install them:
In the case of either toolchain you would run these commands to install them:
Line 11: Line 11:
To build an application first source the environment for the toolchain:
To build an application first source the environment for the toolchain:
<source lang=bash>
<source lang=bash>
source /opt/poky/2.2.1/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
source /opt/poky/2.2.2/environment-setup-cortexa9hf-neon-poky-linux-gnueabi


# Assuming you have a hello.c:
# Assuming you have a hello.c:
Line 18: Line 18:
#If you cat the environment file you can see all the paths this sets up.
#If you cat the environment file you can see all the paths this sets up.
$ echo $CC
$ echo $CC
arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/poky/2.0.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi
arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/poky/2.2.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi
</source>
</source>


It is also possible to develop over the serial console or ssh on the board itself.  Yocto includes development tools such as vim, gcc, g++, gdb, make, autoconf, binutils, and more.  See the next sections for using the cross toolchain with IDEs.
It is also possible to develop over the serial console or ssh on the board itself.  Yocto includes development tools such as vim, gcc, g++, gdb, make, autoconf, binutils, and more.  See the next sections for using the cross toolchain with IDEs.

Revision as of 16:41, 31 July 2017

Yocto provides cross toolchains including the native tools and required arm files. First get the toolchain by right clicking and "Save as":

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

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

To build an application first source the environment for the toolchain:

source /opt/poky/2.2.2/environment-setup-cortexa9hf-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 the paths this sets up.
$ echo $CC
arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/poky/2.2.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi

It is also possible to develop over the serial console or ssh on the board itself. Yocto includes development tools such as vim, gcc, g++, gdb, make, autoconf, binutils, and more. See the next sections for using the cross toolchain with IDEs.