Building user programs

There are two distinct ways to build a user program to run on a target system under STLinux:

  • use a cross development toolchain executed on the host Linux system to generate an executable program to run on the target Linux system

  • use a native development toolchain executing on the target Linux system itself to generate an executable program which also runs on the target Linux system.

It is usually more convenient to cross-compile programs in the host Linux environment, because the host system is designed as a software development platform and has the resources to execute the necessary tools efficiently. The target Linux system is designed to be an embedded device and may not have the necessary resources to run the development tools efficiently, or even at all.

For this reason, this guide concentrates on the cross development strategy. However, for most architectures, a complete set of native development tools are also provided and can be used on the target if convenient and if the target platform is suitable. The descriptions in the following sections generally apply to both scenarios.