This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Error while compiling opencl-example projects of sdk-linux

Part Number: AM5728

Hi,

We are using AM5728 in our custom boards. I am trying to compile (in my Ubuntu 14.04LTS machine) OpenCL projects located in <path-to-sdk-linux>/example-applications/opencl-examples-1.2.00.02


But I am getting the below errors.

===============  offline  =================
Compiling main.cpp
main.cpp:29:10: fatal error: CL/cl.hpp: No such file or directory
 #include <CL/cl.hpp>
          ^~~~~~~~~~~
compilation terminated.
../make.inc:238: recipe for target 'main.o' failed
make[1]: *** [main.o] Error 1

===============  simple  =================
/home/user/Vijay_HS/UACE_2030/sdk-linux/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
/home/user/Vijay_HS/UACE_2030/sdk-linux/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
/home/user/Vijay_HS/UACE_2030/sdk-linux/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lOpenCL
/home/user/Vijay_HS/UACE_2030/sdk-linux/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find -locl_util
/home/user/Vijay_HS/UACE_2030/sdk-linux/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
collect2: error: ld returned 1 exit status
Makefile:7: recipe for target 'simple' failed
make[1]: *** [simple] Error 1

 

I think, OpenCL is not installed in my Ubuntu machine, and thats the reason these errors are occuring. I tried to install ti-opencl, but it is failing, looks like this is obsolete. Can I please get some help in installing the OpenCL components and resolving these errors. I am stuck with my project here, kindly please help me on priority.

Thanks & Regards

Vijay H.S

  • Vijay,

    Please see https://downloads.ti.com/mctools/esd/docs/opencl/faq/version.html  for how to check what version of OpenCL is installed.

    Also you can confirm you h ave set up TI_OCL_CGT_INSTALL properly for the cross compilation. It is available from the x86-64 sysroot in linux-devkit. Once set up correctly, cross compilation proceeds correctly. Please see below example.


    :~/tmp/test_clocl/cross_compile/examples/abort_exit$ cat ../../cross_compile_env.sh
    PSDK=/cgnas/ti-processor-sdk-linux-am57xx-evm-06.02.00.81-release

    export TARGET_ROOTDIR=${PSDK}/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi/
    export TI_OCL_CGT_INSTALL=${PSDK}/linux-devkit/sysroots/x86_64-arago-linux/usr/share/ti/cgt-c6x/
    export PATH=${PSDK}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH

    :~/tmp/test_clocl/cross_compile/examples/abort_exit$ source ../../cross_compile_env.sh
    :~/tmp/test_clocl/cross_compile/examples/abort_exit$ make
    Compiling kernel.cl
    env PATH=/cgnas/ti-processor-sdk-linux-am57xx-evm-06.02.00.81-release/linux-devkit/sysroots/x86_64-arago-linux/usr/share/ti/cgt-c6x//bin:/cgnas/ti-processor-sdk-linux-am57xx-evm-06.02.00.81-release/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:/home/a0323918/.local/bin:/home/a0323918/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/snap/bin clocl -t kernel.cl
    Compiling main.cpp
    arm-linux-gnueabihf-g++ -c -O3 "--sysroot=/cgnas/ti-processor-sdk-linux-am57xx-evm-06.02.00.81-release/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi/" -I/cgnas/ti-processor-sdk-linux-am57xx-evm-06.02.00.81-release/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi//usr/include -Wall -I/cgnas/ti-processor-sdk-linux-am57xx-evm-06.02.00.81-release/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi//usr/include main.cpp

  • Hi Dave,

    Thank you very much for your help. I tried the changes as per your suggestions and it is working now.

    Also, can you please suggest me which version of Code Composer Studio (CCS) to be used for this AM5728 and which JTAG to be used for debugging ARM and DSP.

    Thanks & Regards

    Vijay H.S

  • Vijay,

    The SDK6.3 release was done with CCS v9.3 -- see https://software-dl.ti.com/processor-sdk-linux/esd/AM57X/latest/index_FDS.html. However you can use the later 10.x versions as well. 

    For JTAG usage you can create a new target configuration for your board. See https://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/How_to_Guides/Hardware_Setup_with_CCS/AM572x_GP_EVM_Hardware_Setup.html#am572x-gp-evm-hardware-setup 

    It guides for the EVM, but you can see in the target configuration steps that you can create based on the device and emulator you have.

    Best regards,

    Dave

  • Hi Dave,

    Thank you very much for this information.

    Thanks & Regards

    Vijay H.S