TS-4900 Application Development: Difference between revisions

From embeddedTS Manuals
No edit summary
No edit summary
Line 1: Line 1:
The default Yocto image provides both onboard libraries, and cross toolchains which are available here (right click and "Save as"):
The default Yocto image provides both onboard libraries, and cross toolchains which are available here (right click and "Save as"):
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/fido/toolchain/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.8.sh x86_64]
* [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]
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/fido/toolchain/poky-glibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.8.sh i686]
* [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 the case of either toolchain you would run these commands to install them:
<source lang=bash>
<source lang=bash>
chmod a+x poky-*.sh
chmod a+x poky-*.sh
sudo ./poky-eglibc-*.sh
sudo ./poky-*.sh
</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/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
source /opt/poky/2.0.2/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi


# Assuming you have a hello.c:
# Assuming you have a hello.c:
Line 17: Line 17:


#If you cat the environment file you can see all of the paths this sets up.
#If you cat the environment file you can see all of the paths this sets up.
echo $CC
$ echo $CC
$ echo $CC
#arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon  
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
#    -mtune=cortex-a9 --sysroot=/opt/poky/1.8/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.
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 11:54, 17 November 2016

The default Yocto image provides both onboard libraries, and cross toolchains which are available here (right click 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

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

source /opt/poky/2.0.2/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
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

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.