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: DSP firmware reproducing issue in opencl-monitor recipe

Part Number: AM5728


Hello, 

I need to use DSP to offload some OpenMP based algorithms. In order to use DSP's I followed the steps below: (i didnt mention all steps in detail here)

1) download and install Processor SDK for Linux ver. 6.01. Also install the gcc cross toolchain.

2) Create a SD-Card and boot the Beagleboard x15

3) Try to be sure that DSP's are running and OpenMP - OpenCL binaries are available. So I built "printf_debug" application in openmpacc examples directory.

4) This works without any glitches.

Then I built my own Kernel (linux-rt) and rootfs (for SDK 6.01 version) as shown in this link https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Overview_Building_the_SDK.html 

But, the printf_debug example application didnt run. Then I realize that DSP firmwares, which are dra7-dsp(1-2)-fw.xe66.opencl-monitor, are different from the SDK which comes from SDK 6.01. All logs of building command are in the file attached at the end of this forum entry. I followed all the required steps in the link above and, I run this command:

MACHINE=am57xx-evm ARAGO_RT_ENABLE=1 bitbake opencl-monitor

While investigaiton of the problem, I tried to change dra7-dsp(1-2)-fw.xe66.opencl-monitor DSP firmwares with the ones that come from SDK 6.01 installation and voila! it works on BB X15.

Now the result is that I can't reproduce DSP firmware binaries as given in the am57xx-evm-linux-rt-06.01.00.08.img.zip. Here are my questions:

1) Is there any difference between Yocto SDK 6.01 and TI SDK am57xx-evm-linux-rt-06.01.00.08.img.zip? When I run opencl-monitor bitbake, The output files dra7-dsp(1-2)-fw.xe66.opencl-monitor have different filesizes from the binaries in installed SDK 6.01.

2) How should I run opencl-monitor recipe to get the same firmware files with the firmware files in installed SDK 6.01 targetNFS/lib/firmware directory?

3) For OpenCL and OpenMP binaries and libraries, are there any important issue which force me to change the SDK version higher to 6.02 or 6.03?

Thanks in advance,

1263.temp.zip

  • Hi Mustafa,

       I cannot comment on the difference between your build of DSP firmware and the one shipped in the Processor SDK.

       For this comment "But, the printf_debug example application didnt run." with your own build of firmware.  Can you clarify on this?
       - Did you rebuild "printf_debug" with your new firmware/filesystem?  To avoid the confusion where "/usr/share/ti/opencl" is located, maybe rebuild "printf_debug" on the EVM itself.
       - Did you try rebuild other OpenCL examples and see if they run correctly with your build of firmware and filesystem?

    -Yuan

  • Hello Yuan,

     For this comment "But, the printf_debug example application didnt run." with your own build of firmware.  Can you clarify on this?

    Let me clarify this question. After installing shipped Processor SDK Linux (RT) 6.01 package, I setup cross-compilation environment and built all of the openmp examples. "printf_debug" is one of the examples which can demonstrate the DSP-offloading is enabled and can be used successfully. After the cross-compilation of printf_debug, I sent it to Beagleboard X15 and this example application didn't start or run on the target, there was no output on the console.

    After your advise to build natively of printf_debug on the target, I also tried it. The same results occurred, I mean no output on the console.

    Best regards,

    Mustafa

  • Hi Mustafa,

        Not sure what happened to your own build of firmware.  Have you tried the unmodified Processor SDK?  Have you tried other OpenCL examples?  TI's OpenMPAcc is implemented on top of TI's OpenCL.  You need a functioning OpenCL first.

        I have tested this on my AM57 EVM with Processor SDK 6.3.  Everything works as expected (see enclosed).

    -Yuan

    root@am57xx-evm:/usr/share/ti/examples/openmpacc/printf_debug# ./printf_debug 
    [core 0] Number of Processor Cores: 2
    [core 0] Maximum number of OpenMP threads: 2
    [core 0] Starting 1st parallel region..
    [core 0] 	Number of OpenMP threads in team: 2
    [core 0] 	Hello from thread: 0
    [core 0] Setting number of OpenMP threads to use to 4
    [core 1] 	Hello from thread: 1
    [core 0] Starting 2nd parallel region..
    [core 1] 	Hello from thread: 1
    [core 0] 	Number of OpenMP threads in team: 2
    [core 0] 	Hello from thread: 0
    root@am57xx-evm:/usr/share/ti/examples/openmpacc/printf_debug# make clean; make
    g++ -O3 -c printf_debug_main.cpp
    clacc --hc="-O3 -fopenmp  -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=/oe/bld/build-CORTEX_1/arago-tmp-external-arm-toolchain/work/armv7at2hf-neon-linux-gnueabi/openmpacc-examples/1.5.6.0-r0.1/recipe-sysroot" --tc="-O3" printf_debug_main.o printf_debug_target.c -o printf_debug
    root@am57xx-evm:/usr/share/ti/examples/openmpacc/printf_debug# ./printf_debug 
    [core 0] Number of Processor Cores: 2
    [core 0] Maximum number of OpenMP threads: 2
    [core 0] Starting 1st parallel region..
    [core 1] 	Hello from thread: 1
    [core 0] 	Number of OpenMP threads in team: 2
    [core 0] 	Hello from thread: 0
    [core 0] Setting number of OpenMP threads to use to 4
    [core 0] Starting 2nd parallel region..
    [core 1] 	Hello from thread: 1
    [core 0] 	Number of OpenMP threads in team: 2
    [core 0] 	Hello from thread: 0
    root@am57xx-evm:/usr/share/ti/examples/openmpacc/printf_debug# uname -a
    Linux am57xx-evm 4.19.94-gbe5389fd85 #1 SMP PREEMPT Sun Apr 19 02:36:36 UTC 2020 armv7l GNU/Linux