Part Number: AM5716
Tool/software: Linux
Dear TI Experts,
We using a open source decode library which is called zbar, during our test, we integrate the source code to AM5716 platform,
we need the DSP to run the decode library, to allow general standard C functions to be called from OpenCL C kernels can be used to dispatch code on the DSP's that make use of TI's BIOS APIs, we follow the link:
http://downloads.ti.com/mctools/esd/docs/opencl/extensions/bios-apis.html
By using BIOS API, we can get the example code to demo the shared buffer between DSP and ARM.
So We compiler the zbar source code with cl6x (ti-cgt-c6000-v8.1.0) for the zbar library, then compiler the kernel to call the zbar library, all the code run on DSP.
The decode library compiler with ARM A15, it can decode the raw data buffer correctly:
root@am57xx-evm:~/TestZbar# ./TestZbar
n = 1
decoded QR-Code symbol "http123Ⲳ���456"
len = 14
From the up log, we can get raw data buffer was decoded correctly, but with the same code, it will failed with DSP.
During the code compiler, it was passed:
env PATH=/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/share/ti/cgt-c6x/bin:/home/nemo/bin:/home/nemo/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin /home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/clocl -t -I./ kernel.cl dsp.obj zbar.obj warning #10247-D: creating output section ".cio" without a SECTIONS specification Compiling host.cpp /home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-g++ -c -O3 -I./persistent_common -D__linux__ "--sysroot=/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi" -I/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include -I/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include host.cpp Compiling persistent_common/host_assist.cpp /home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-g++ -c -O3 -I./persistent_common -D__linux__ "--sysroot=/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi" -I/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include -I/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include persistent_common/host_assist.cpp Linking TestMain /home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-g++ -O3 -I./persistent_common -D__linux__ "--sysroot=/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi" -I/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include -I/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include host.o host_assist.o "--sysroot=/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi" -L/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib -L/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/lib -L/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib -Wl,-rpath-link,/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/lib -Wl,-rpath-link,/home/nemo/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib -lOpenCL -locl_util -o TestMain
When We running it on the DSP, it will throw the e
root@am57xx-evm:~/TestZbar# ./TestMain Host Start [ 2824.341461] omap_hwmod: mmu0_dsp1: _wait_target_disable failed [ 2824.352219] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0 [ 2824.354754] systemd-journald[189]: Failed to send WATCHDOG=1 notification med [ 2824.375737] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0 [core 0] DSP RUN It seems hang on DSP.