TS-4900 Application Development: Difference between revisions

From embeddedTS Manuals
No edit summary
m (Links auto-updated for 2022 re-branding ( 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 →‎ https://files.embeddedTS.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))
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The default Yocto image provides both onboard libraries, and cross toolchains which are available here (right click and "Save as"):
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/jethro/toolchains/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-2.0.2.sh x86_64]
* [https://files.embeddedTS.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/jethro/toolchains/poky-glibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-2.0.2.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-*.sh
chmod a+x poky-*.sh
Line 9: Line 8:
</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/2.0.2/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
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
</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. See the next sections for using the cross toolchain with IDEs.
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.

Latest revision as of 16:55, 17 January 2022

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.