TS-4900 Application Development: Difference between revisions
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)) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
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: | |||
* [ | * [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] | ||
In the | 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 | ||
sudo ./poky | sudo ./poky-*.sh | ||
</source> | </source> | ||
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/ | 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 | $CC hello.c -o hello | ||
</source> | </source> | ||
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.