Getting Started with the Intel® C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology

By Jeanette S Feldhousen,

Published:04/07/2020   Last Updated:04/07/2020

The Intel® C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology version 14.0 compiles C and C++ source files on Linux* OS systems. The compiler is supported on IA-32 and Intel® 64 architectures.

The root installation path for the compiler is /opt/intel/cembd_biend_14.0.u.nnn/, where u represents an update number and nnn > represents a 3-digit compiler package number. The term <install-dir> is used in the documentation to refer to this default installation path.

Setting the Environment Variables

You must "source" the compiler environment script, compilervars.sh (or compilervars.csh), to set the environment variables prior to invoking the compiler:

source <install-dir>/bin/compilervars.[c]sh <arg>

where <arg> is one of the following architecture arguments:
  • intel64: compilers and libraries for Intel® 64 architectures only
  • ia32: compilers and libraries for IA-32 architectures only

Using the Compiler from the Command Line

To compile a C language source file (for example, my_source_file.c), use the following command:

icc my_source_file.c

 

To compile C++ source files, use the following command:

icpc my_source_file.cpp

 

Following successful compilation, an executable named a.out is created in the current directory.

The Intel compiler also includes man pages. After sourcing the environment script, open the man page to view a complete list of compiler options:

man icc

 

You can read a summary of compiler options from the command line by invoking the compiler with the -help option:

 

 icc -help

Cross Compilation Support

The compiler supports cross compilation on IA-32 architecture. For cross compilation details see the sections below.

Building Applications on a Linux* Operating System Host for the QNX* Neutrino* RTOS Target (IA-32 Architecture Only)

The Intel® C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology compiles C and C++ applications on a Linux* OS system targeted for running on a QNX* Neutrino* Real Time Operating System (RTOS).

QNX* Neutrino* RTOS is a 32-bit operating system; use the Intel® IA-32 architecture compiler for compilation.

Installation Information

Before compiling applications for running on the target QNX* Neutrino* RTOS, you must install the QNX* Momentics* Software Development Kit (SDK) 6.4.0 first.

Note

To avoid errors, install the QNX* Momentics* SDK to the suggested default directory, which is /opt/qnx640.

Giving Commands to the Compiler for Building QNX-Targeted Applications

Each time you compile for QNX target, specify -platform=qnx640 option. If you do not specify the -platform option, the compiler will build a Linux* operating system native application. If you do not specify the qnx640 argument, you will receive an error message.

To compile a C language source file (for example, my_source_file.c) for QNX target, use a command similar to the following example:

icc -platform=qnx640 my_source_file.c

 

To compile a C++ source file (for example, my_source_file.cpp) for QNX target, use a command similar to the following example:

icpc -platform=qnx640 my_source_file.cpp

 

Following successful compilation, an executable named a.out is created in the current directory. Copy a.out onto target machine running QNX* Neutrino* RTOS and verify that a.out runs on target machine.

Driver support for QNX target

Compiler uses headers and libraries provided by the installed QNX* Momentics* SDK on the host (gcc 4.2.4 by default).

 

Building Applications on a Linux* Operating System Host for the NetBSD* OS Target (IA-32 Architecture Only)

The Intel® C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology compiles C and C++ applications on a Linux* OS system targeted for running on a NetBSD* Operating System (OS).

This release supports NetBSD* on Intel® IA-32 architecture only; use the Intel® IA-32 architecture compiler for compilation.

Installation Information

Before compiling applications for running on the target NetBSD* OS, you must install cross-compilation tools and system image for NetBSD* 5.1.

For details go to http://www.netbsd.org/docs/guide/en/chap-build.html.

Example:

  1. Download sources of the OS ( gnusrc.tar, sharesrc.tar, src.tar, syssrc.tar, xsrc.ar ) and unpack them into a temporary directory <TEMP>.
  2. Compile cross-compilation tools from <TEMP>/usr/src directory:
    ./build.sh -m i386 -T <NETBSD_TOOLS> tools

     

  3. Compile generic kernel:
    ./build.sh -m i386 -T <NETBSD_TOOLS> kernel=GENERIC

     

  4. Compile system image:
    ./build.sh -m i386 -T <NETBSD_TOOLS> -D <NETBSD_IMAGE> -U release

     

 

After tools and image are built, set 2 environment variables to match NetBSD tools and OS image directories:

export NETBSD_IMAGE=<NETBSD_IMAGE>

export NETBSD_TOOLS=<NETBSD_TOOLS>

 

See the Release Notes for installation requirements details.

Giving Commands to the Compiler for Building NetBSD-Targeted Applications

Each time you compile for NetBSD* OS target, specify -platform=netbsd51. If you do not specify the -platform option, the compiler will build a Linux* operating system native application. If you do not specify the netbsd51 argument, you will receive an error message.

To compile a C language source file (for example, my_source_file.c) for NetBSD* OS target, use a command similar to the following:

icc -platform=netbsd51 my_source_file.c

 

To compile a C++ source file (for example, my_source_file.cpp) for NetBSD* OS target, use a command similar to the following:

icpc -platform=netbsd51 my_source_file.cpp

 

Following successful compilation, an executable named a.out is created in the current directory. Copy a.out onto target machine running NetBSD* OS and verify that a.out runs on target machine.

Driver support for NetBSD target

Compiler uses headers and libraries provided by the installed NetBSD* OS tools and system image on the host.

 

Building Applications on a Linux* Operating System Host for the Wind River* Linux* OS Target (IA-32 Architecture Only)

The Intel® C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology compiles C and C++ applications on a Linux* OS system targeted for running on a Wind River* Linux* Operating System (OS).

Installation Information

Before compiling applications for running on the target Wind River* Linux* OS, you must install Wind River* Linux* 3.0.x and build sysroot for a target platform. For details on building sysroot for a Wind River Linux, please refer to the Wind River Linux Getting Started document.

After installation is completed and sysroot is created, set two environment variables to match cross-compilation tools directories:

  1. WRL_SDK_TOOLCHAIN: must contain the path to the directory inside the Wind River Linux installation tree where the toolchain for the target platform resides.
  2. WRL_SYSROOT: must contain the path to the built sysroot for the target platform.

For example, if you built 32-bit sysroot for a common_pc platform, please use the following values:

export WRL_SDK_TOOLCHAIN=/export/WRL/wrlinux-3.0/layers/wrll-toolchain-4.3-242/i586/toolchain/x86-linux2

export WRL_SYSROOT=/export/WRL-sysroot/common_pc_built/export/sysroot/common_pc-glibc_std

 

Adjust the value of WRL_SDK_TOOLCHAIN environment variable according to your Wind River Linux installation directory and target OS and WRL_SYSROOT according to the path to a required sysroot.

See the Release Notes for installation requirements details.

Giving Commands to the Compiler for Building Wind River* Linux*-Targeted Applications

Each time you compile for Wind River* Linux* target, specify -platform=wrl30 option. If you do not specify the -platform option, the compiler will build a Linux* operating system native application. If you do not specify the wrl30 argument, you will receive an error message.

To compile a language source file (for example, my_source_file.c) for Wind River* Linux* target, use a command similar to the following example:

icc -platform=wrl30 my_source_file.c

 

To compile a C++ source file (for example, my_source_file.cpp) for Wind River* Linux* target, use a command similar to the following example:

icpc -platform=wrl30 my_source_file.cpp

 

Following successful compilation, an executable named a.out is created in the current directory. Copy a.out onto target machine running Wind River* Linux* OS and verify that a.out runs on target machine.

Driver support for Wind River* Linux* target

Compiler uses headers and libraries provided by the Wind River Linux sysroot configured on the host and specified with the WRL_SYSROOT environment variable.

 

Locating the Documentation

The compiler documentation is installed under <install-dir>/Documentation/. See the Documentation Index (Doc_Index.htm) for a short description of each documentation component.

For more complete information about compiler optimizations, see our Optimization Notice.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804