Compiler Toolchain Support

The SDSoC environment uses the same GNU ARM cross-compiler toolchains included with the Xilinx Software Development Kit (SDK). The Linaro-based GCC compiler toolchains support the Zynq®-7000 and Zynq UltraScale+™ family devices, and this section includes additional information on toolchain usage that might be useful.

When compiling and linking applications, use only object files and libraries built using the same compiler toolchain and options as those used by the SDSoC environment. All SDSoC provided software libraries and software components (Linux kernel, root filesystem, BSP libraries, and other pre-built libraries) are built with the included toolchains. If you use sdscc or sds++ to compile object files, the tools automatically insert a small number of options, and if you invoke the underlying toolchains, you must use the same options. For example, if you use a different Zynq-7000 floating-point application binary interface (ABI), your binary objects are incompatible and cannot be linked with SDSoC Zynq-7000 binary objects and libraries.

The table below summarizes sdscc and sds++ usage of Zynq-7000 toolchains and options. Where options are listed, you only need to specify them if you use the toolchain gcc and g++ commands directly instead of invoking sdscc and sds++.

Usage Description
Zynq-7000 ARM bare-metal compiler and linker options -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard
Zynq-7000 ARM bare-metal linker options

-Wl,--build-id=none -specs=

where the contains

*startfile:

crti%O%s crtbegin%O%s
Zynq-7000 ARM bare-metal compiler

${SDSOC_install}/SDK/gnu/aarch32//gcc-arm-none-eabi/bin

Toolchain prefix: arm-none-eabi

gcc executable: arm-none-eabi-gcc

g++ executable: arm-none-eabi-g++
Zynq-7000 SDSoC bare-metal software (lib, include) ${SDSOC_install}/aarch32-none
Zynq-7000 ARM Linux compiler

${SDSOC_install}/SDK/gnu/aarch32//gcc-arm-linux-gnueabi/bin

Toolchain prefix: arm-linux-gnueabihf-

gcc executable: arm-linux-gnueabihf-gcc

g++ executable: arm-linux-gnueabihf-g++
Zynq-7000 SDSoC Linux software (lib, include) ${SDSOC_install}/aarch32-linux

The table below summarizes sdscc and sds++ usage of Zynq UltraScale+ Cortex-A53 toolchains and options. Where options are listed, you only need to specify them if you use the toolchain gcc and g++ commands directly instead of invoking sdscc and sds++.

Usage Description
Zynq UltraScale+ ARM bare-metal compiler and linker options Use default options
Zynq UltraScale+ ARM bare-metal linker options -Wl,--build-id=none
Zynq UltraScale+ ARM bare-metal compiler

${SDSOC_install}/SDK/gnu/aarch64//aarch64-none/bin

Toolchain prefix: aarch64-none-elf

gcc executable: aarch64-none-elf-gcc

g++ executable: aarch64-none-elf-g++
Zynq UltraScale+ SDSoC bare-metal software (lib, include) ${SDSOC_install}/aarch64-none
Zynq UltraScale+ ARM Linux compiler

${SDSOC_install}/SDK/gnu/aarch64//aarch64-linux/bin

Toolchain prefix: aarch64-linux-gnu-

gcc executable: aarch64-linux-gnu-gcc

g++ executable: aarch64-linux-gnu-g++
Zynq UltraScale+ SDSoC Linux software (lib, include) ${SDSOC_install}/aarch64-linux

The table below summarizes sdscc and sds++ usage of Zynq UltraScale+ Cortex-R5 toolchains and options. Where options are listed, you only need to specify them if you use the toolchain gcc and g++ commands directly instead of invoking sdscc and sds++.

Usage Description
Zynq UltraScale+ ARM bare-metal compiler and linker options Use default options
Zynq UltraScale+ ARM bare-metal linker options -Wl,--build-id=none
Zynq UltraScale+ ARM bare-metal compiler

${SDSOC_install)/SDK/gnu/armr5//gcc-arm-none-eabi/bin

Toolchain prefix: armr5-none-eabi

gcc executable: armr5-none-eabi-gcc

g++ executable: armr5-none-eabi-g++
Zynq UltraScale+ SDSoC bare-metal software (lib, include) ${SDSOC_install}/armr5-none

When using sdscc and sds++ to compile Zynq-7000 source files, be aware that SDSoC tools that process and analyze source files issue errors if they contain NEON instrinsics. If hardware accelerator (or caller) source files contain NEON intrinsics, guard them using the__SDSCC__and__SDSVHLS__macros. For source files that don't contain hardware accelerators or callers but do use NEON intrinsics, you can either compile them directly using the GNU toolchain and link the objects with sds++, or you can add the sdscc/sds++ command line option-mno-irfor these source files. The option prevents clang-based tools from being invoked to create an intermediate representation (IR) used in analysis, because we know they are not required (i.e., no accelerators or callers). For the latter solution, if you are using the SDSoC environment, you can apply the option on a per-file basis by right-clicking the source file, selectPropertiesand go to theSettingsdialog underC/C++ Build Settings>Settings.