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...")
 
m (FTP links auto-updated (http://ftp.embeddedarm.com/ftp/ →‎ https://files.embeddedarm.com/))
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The default Yocto image provides both onboard libraries, and cross toolchains which are available here:
Yocto provides a cross toolchain including the native tools and required ARM libraries. The cross toolchain is only available for 64bit Linux host PCs. Download the toolchain by saving the following link:
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/toolchain/poky-systemd-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh x86_64]
* [https://files.embeddedarm.com/ts-arm-sbc/ts-7990-linux/distributions/yocto/zeus/toolchain/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9t2hf-neon-tsimx6-toolchain-3.0.2.sh poky-glibc-x86_64-meta-toolchain-qt5-cortexa9t2hf-neon-tsimx6-toolchain-3.0.2.sh]
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/toolchain/poky-systemd-eglibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh i686]


In the case of either toolchain you would run these commands to install them:
In order to install the toolchain, use the following commands to run the installation script:
<source lang=bash>
<source lang=bash>
chmod a+x poky-systemd-*.sh
chmod a+x poky-*.sh
sudo ./poky-systemd-eglibc-*.sh
sudo ./poky-*.sh
</source>
</source>


When you want to build an application, you would first source the environment for the toolchain:
In order to use the toolchain, the environment for it must be sourced to the current terminal before it can be used to build applications:
To build an application 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/3.0.2/environment-setup-cortexa9t2hf-neon-poky-linux-gnueabi


# Assuming you have a hello.c:
# This command sets up paths for the shell along with a number of other
# environment variable. For example:
$ 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
 
# Cross compiling a simple hello world program:
$CC hello.c -o hello
$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
</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.
It is also possible to develop applications directly on the device via  serial console or ssh. Yocto includes development tools such as vim, gcc, g++, gdb, make, autoconf, binutils, etc. See the next sections for using the cross toolchain with IDEs.

Revision as of 08:38, 12 January 2021

Yocto provides a cross toolchain including the native tools and required ARM libraries. The cross toolchain is only available for 64bit Linux host PCs. Download the toolchain by saving the following link:

In order to install the toolchain, use the following commands to run the installation script:

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

In order to use the toolchain, the environment for it must be sourced to the current terminal before it can be used to build applications: To build an application first source the environment for the toolchain:

source /opt/poky/3.0.2/environment-setup-cortexa9t2hf-neon-poky-linux-gnueabi

# This command sets up paths for the shell along with a number of other
# environment variable. For example:
$ 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

# Cross compiling a simple hello world program:
$CC hello.c -o hello

It is also possible to develop applications directly on the device via serial console or ssh. Yocto includes development tools such as vim, gcc, g++, gdb, make, autoconf, binutils, etc. See the next sections for using the cross toolchain with IDEs.