UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor eshea
Visitor
559 Views
Registered: ‎10-19-2017

Does Cmake support SDx compilers?

I am using SDx 2018.1 and Ubuntu 16.04 LTS. When I try to build source code with the sdscc/sds++ compilers, Cmake complains and says "The C compiler "/opt/Xilinx/SDx/2018.1/bin/sdscc" is not able to compile a
simple test program." I am running the below command and set the $CC and $CXX variables to /opt/Xilinx/SDx/2018.1/bin/sdscc and /opt/Xilinx/SDx/2018.1/bin/sds++, respectively:

 

cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE:string="Release" -DBUILD_SHARED_LIBS:bool=on -DCMAKE_INSTALL_PREFIX:path="%USERPROFILE%" -DCMAKE_LIBRARY_PATH:path="%USERPROFILE%" -DCMAKE_INCLUDE_PATH:path="%USERPROFILE%\include" ../openjpeg-2.3.0

 

When I execute this command with gcc/g++ compilers, it works - I am able to open it in Eclipse, and build the project to create the executables. When I execute this command with arm-linux-gnueabihf-gcc and arm-linux-gnueabihf-g++, it is able to build (3rd image down). However, using the sdscc and sds++ compilers creates the error below so it's not able to build, and opening it in SDx does not work when I try to compile. My error and output log files are attached.

 

cmake_build_errors.png

 

more_errors.png

 

arm_compilers.png

Tags (1)
0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
399 Views
Registered: ‎07-19-2018

Re: Does Cmake support SDx compilers?

Hi Eshea,

 

We are using CMake based cross-compilation in combination with xfOpenCV to create Computer Vision designs, see https://github.com/Xilinx/PYNQ-ComputerVision/tree/master/overlays

 

More specifically, we have collected all necessary cross-compilation settings in a .cmake toolchain file: https://github.com/Xilinx/PYNQ-ComputerVision/blob/master/frameworks/cmakeModules/toolchain_sdx2017.4.cmake

 

This cross compilation file as passed into cmake using -DCMAKE_TOOLCHAIN_FILE, for example:

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=<properPath>/toolchain_sdx2017.4.cmake

 

For more details, please have a look at: https://github.com/Xilinx/PYNQ-ComputerVision/blob/master/overlays/README.md

 

Regards,

 

Kristof 

0 Kudos