Forums - Problem running cornerApp (Hexagon 2.0) on Open-Q 820

14 posts / 0 new
Last post
Problem running cornerApp (Hexagon 2.0) on Open-Q 820
ezg
Join Date: 16 Feb 16
Posts: 12
Posted: Sat, 2016-04-23 11:20

Hi,

I am trying to run sample app (cornerApp) in Hexagon SDK 2.0 plus Add on for HVX.

by following the steps in C:/Qualcomm/Hexagon_SDK/2.0/docs/Environments_Eclipse.html?q=hexagon+tool on Open-Q 820.

The variants are set to hexagon_ReleaseG_dynamic_tool72_v60 and android_ReleaseG_aarch64. When running "./cornerApp" on the target, the init failed with the following message.

error in dspCV_initQ6: -1
init failed!! status 1
 
Is there any steps that I missed?
 
Thanks!
 
 
 
  • Up0
  • Down0
chenna
Join Date: 4 Feb 16
Posts: 54
Posted: Wed, 2016-05-11 00:11

can you please verify whether you are able to run calculator successfully or not ? 
Please run C:\Qualcomm\Hexagon_SDK\2.0\tools\scripts\calculator_walkthrough.cmd

  • Up0
  • Down0
ezg
Join Date: 16 Feb 16
Posts: 12
Posted: Mon, 2016-05-16 23:17

I got the same error error " dspCV_initQ6: -1" when running calculator_walkthrough on either SDK2.0 or SDK 3.0

  • Up0
  • Down0
ezg
Join Date: 16 Feb 16
Posts: 12
Posted: Mon, 2016-05-16 23:17

I got the same error error " dspCV_initQ6: -1" when running calculator_walkthrough on either SDK2.0 or SDK 3.0

  • Up0
  • Down0
chenna
Join Date: 4 Feb 16
Posts: 54
Posted: Tue, 2016-05-17 21:32

can you please provide the calc_walkthrough script output ? and Please run QXDM by configuring QDSP6 msgs before running calculator 

If you dont have access to QXDM Please run minidm.exe before running calculator as follows 

minidm.exe --comport <comport number>

comport number can be obtained by running com_finder.py script  

Mindim.exe is located @ <SDK_ROOT>tools\debug\mini-dm\WinNT_Debug in 3.0 

  • Up0
  • Down0
chenna
Join Date: 4 Feb 16
Posts: 54
Posted: Tue, 2016-05-17 21:33
  • Up0
  • Down0
ezg
Join Date: 16 Feb 16
Posts: 12
Posted: Mon, 2016-05-23 22:22

When running cornerApp walkthrough python script, the app gets stuck after  printing "dspCV_initQ6 ...".

Below is the snippet of the python output.. remount succeeded 299 KB/s (19156 bytes in 0.062s) testsig generated sucessfully ---- Push Test Signature ---- mkdir: '/system/lib/rfsa': File exists mkdir: '/system/lib/rfsa/adsp': File exists 387 KB/s (24784 bytes in 0.062s) Done ---- root/remount device ---- restarting adbd as root remount succeeded ---- Push Android components ---- 2079 KB/s (780148 bytes in 0.366s) 227 KB/s (7264 bytes in 0.031s) ---- Push Hexagon Components ---- 345 KB/s (11048 bytes in 0.031s) 816 KB/s (26096 bytes in 0.031s) 2404 KB/s (1149281 bytes in 0.466s) 1107 KB/s (52400 bytes in 0.046s) ---- Run cornerApp Example on aDSP ---- initq6 done...

And the output of minidm is shown below:

Running mini-dm version: 3.0 Opening port COM5 Port COM5 opened! mini-dm is waiting for a DMSS connection... DMSS is connected. Running mini-dm... [08500/03] 05:25.821 dspCV_dummy_function weak ref not found, return _rtld_sym_zero@_rtld_objmain 0336 symbol.c [08500/02] 05:25.825 Entering dspCV_initQ6()... 0222 dspCV_imp.c [08500/02] 05:25.825 Detected Chip Family 56. Using heap ID 25 0119 dspCV_imp.c [08500/02] 05:25.845 block allocated F0449B20 1048576 0116 apps_mem_heap.c [08500/00] 05:25.845 block getsize F0449B20 1048576 0057 apps_mem_heap.c [08500/02] 05:25.845 dspCV_initRemoteHeap initializing remote heap, SUCCESS 0131 dspCV_imp.c [08500/02] 05:25.845 Setting app type to COMPUTE_CLIENT_CLASS 0397 fastrpc_kpower.c [08500/02] 05:25.845 Setting clock - mipsTotal: 1000 mipsPerThread: 500 0233 fastrpc_kpower.c [08500/02] 05:25.845 Setting bus_bw - bwBytePerSec: 12000000000 usagePercentage: 100 0249 fastrpc_kpower.c [08500/02] 05:25.845 Setting latency 1000 0267 fastrpc_kpower.c [08500/02] 05:25.847 dspCV_initQ6 votes 1000 total MCPS, 500 MCPS per thread. 0418 dspCV_imp.c [08500/02] 05:25.847 dspCV_initQ6 votes bus BW 12000 MB/sec, bus usage 100 percent, and max latency 1000 uSec 0420 dspCV_imp.c

  • Up0
  • Down0
mcastell
Join Date: 24 Apr 13
Posts: 11
Posted: Tue, 2016-05-24 09:43

It looks like initially you had test signature issues. But the hanging behavior now is unexpected. It looks like it completes initial fastRPC calls to dspCV, the rest should also go through fine. As a next step could you also provide the output from 'adb logcat' running in a second terminal, while running the cornerApp walkthrough?

Thanks.

Michael

  • Up0
  • Down0
ezg
Join Date: 16 Feb 16
Posts: 12
Posted: Tue, 2016-05-24 11:14

Here is the logcat output:

01-01 01:05:24.070  2966  2966 E adsprpc : src/rpcmem_android.c:271::error: -1: 0 <= ioctl(m->fd, ION_IOC_ALLOC_KK, &alloc)
01-01 01:05:24.070  2966  2966 E adsprpc : src/rpcmem_android.c:271::error: -1: 0 <= ioctl(m->fd, ION_IOC_ALLOC_KK, &alloc)
01-01 01:05:24.071  2966  2966 E adsprpc : src/rpcmem_android.c:271::error: -1: 0 <= ioctl(m->fd, ION_IOC_ALLOC_KK, &alloc)
01-01 01:05:24.071  2966  2966 E adsprpc : src/rpcmem_android.c:271::error: -1: 0 <= ioctl(m->fd, ION_IOC_ALLOC_KK, &alloc)
  • Up0
  • Down0
mcastell
Join Date: 24 Apr 13
Posts: 11
Posted: Tue, 2016-05-24 12:43

Looks like something is getting mixed up with the ION heap ID.

Is this SDK 2.0 or 3.0? Can you try 3.0? That has a cleaner handling of ION heap ID.

BTW, running the cornerApp script is going to build the DSP code as V5, not V60. But it should still work...

 

Michael

  • Up0
  • Down0
ezg
Join Date: 16 Feb 16
Posts: 12
Posted: Tue, 2016-05-24 13:44

This uses SDK 3.0...

  • Up0
  • Down0
mcastell
Join Date: 24 Apr 13
Posts: 11
Posted: Tue, 2016-05-24 16:40

Ok. I tried from a 3.0 SDK and found the script is not working. It tries to build an old variant that the SDK no longer supports. As a result, I suspect you failed to overwrite some old objects on your device from SDK 2.0, which may have been selecting the wrong ION heap.

Here's a snippet when i try to run the script

glue/defines.min:16: *** "hexagon_Release_dynamic" is not a supported build variant. Supported variants: android_Debug android_Release android_ReleaseG hexagon_Debug_dynamic_toolv72_v60 hexagon_Debug_dynamic_toolv74 hexagon_Debug_dynamic_toolv74_v60 hexagon_Debug_dynamic_toolv74_v62 hexagon_Debug_toolv72_v60 hexagon_Debug_toolv74 hexagon_Debug_toolv74_v60 hexagon_Debug_toolv74_v62 hexagon_Release_dynamic_toolv72_v60 hexagon_Release_dynamic_toolv74 hexagon_Release_dynamic_toolv74_v60 hexagon_Release_dynamic_toolv74_v62 hexagon_Release_toolv72_v60 hexagon_Release_toolv74 hexagon_Release_toolv74_v60 hexagon_Release_toolv74_v62 hexagon_ReleaseG_dynamic_toolv72_v60 hexagon_ReleaseG_dynamic_toolv74 hexagon_ReleaseG_dynamic_toolv74_v60 hexagon_ReleaseG_dynamic_toolv74_v62 hexagon_ReleaseG_toolv72_v60 hexagon_ReleaseG_toolv74 hexagon_ReleaseG_toolv74_v60 hexagon_ReleaseG_toolv74_v62 . Stop.

For now, i suggest you clean off any cornerApp related objects, and dependencies such as libfastcvadsp.so, libdspCV_skel.so, and libapps_mem_heap.so, from your device (in /data, /data/local, /vendor/lib, /vendor/lib64, /system/lib, /system/lib64, /vendor/lib/rfsa/adsp, /system/lib/rfsa/adsp), and try these commands (this works for me):

make tree V=android_ReleaseG

make tree V=hexagon_ReleaseG_dynamic_toolv72_v60

adb root

adb remount

adb shell mkdir -p /system/lib/rfsa/adsp

adb push android_ReleaseG/ship/libcornerApp.so /system/lib

adb push android_ReleaseG/ship/cornerApp /data/local

adb shell chmod 755 /data/local/cornerApp

adb push hexagon_ReleaseG_dynamic_toolv72_v60/ship/libcornerApp_skel.so /system/lib/rfsa/adsp

adb push ../../../libs/fastcv/dspCV/hexagon_ReleaseG_dynamic_toolv72_v60/ship/libdspCV_skel.so /system/lib/rfsa/adsp

adb push ../../../libs/fastcv/fastcv/hexagon_ReleaseG_dynamic_toolv72_v60/libfastcvadsp.so /system/lib/rfsa/adsp

adb push ../../../libs/common/apps_mem_heap/ship/hexagon_ReleaseG_dynamic_toolv72_v60/libapps_mem_heap.so /system/lib/rfsa/adsp

adb shell /data/local/cornerApp

  • Up0
  • Down0
ezg
Join Date: 16 Feb 16
Posts: 12
Posted: Tue, 2016-05-24 18:34

These solve the issues. Thanks!

  • Up0
  • Down0
Procoller
Profile picture
Join Date: 15 Jun 15
Posts: 5
Posted: Wed, 2016-12-14 00:23

Hello mcastell,

           Thanks for the steps. I have performed your steps but got the same error message at Logcat.

(1) Here are the Logcat messages,

user:~/Hexagon_SDK/3.0/examples/common/calculator$ adb logcat -s adsprpc

--------- beginning of main
--------- beginning of system
 
01-01 01:33:57.241  4051  4051 E adsprpc : src/rpcmem_android.c:271::error: -1: 0 <= ioctl(m->fd, ION_IOC_ALLOC_KK, &alloc)
01-01 01:33:57.242  4051  4051 E adsprpc : src/rpcmem_android.c:271::error: -1: 0 <= ioctl(m->fd, ION_IOC_ALLOC_KK, &alloc)
01-01 01:33:57.242  4051  4051 E adsprpc : src/rpcmem_android.c:271::error: -1: 0 <= ioctl(m->fd, ION_IOC_ALLOC_KK, &alloc)
01-01 01:33:57.247  4051  4051 E adsprpc : src/rpcmem_android.c:271::error: -1: 0 <= ioctl(m->fd, ION_IOC_ALLOC_KK, &alloc)
 
(2) Here are the mini-dm messages,
 
user:~/Hexagon_SDK/3.0/tools/debug/mini-dm/Linux_Debug$ ./mini-dm 
Running mini-dm version: 3.0
Device found with Product ID 0xhhhh. Continuing...
mini-dm is waiting for a DMSS connection...
DMSS is connected. Running mini-dm...
 
[08500/02]  33:57.831  uimg not supported  0519  map_object.c
[08500/02]  33:57.837  spawn for /frpc/f04624e0 cornerA returned asid 2  0634  fastrpc_loader.c
[08500/02]  33:57.840  registered HVX adsppm client id 25  0082  fastrpc_kpower.c
[08500/02]  33:57.853  a6:uimg not supported  0519  map_object.c
[08500/02]  33:57.870  a6:uimg not supported  0519  map_object.c
[08500/03]  33:57.880  10a9:dspCV_dummy_function weak ref not found, return _rtld_sym_zero@_rtld_objmain  0336  symbol.c
[08500/03]  33:57.880  10a9:VA 0xFFB00000 outside ELF segment  0924  rtld.c
[08500/02]  33:57.883  10a9:Entering dspCV_initQ6()...  0222  dspCV_imp.c
[08500/02]  33:57.883  10a9:Detected Chip Family 56. Using heap ID 25  0119  dspCV_imp.c
[08500/02]  33:57.892  10a9:block allocated A9C16520 1048576  0116  apps_mem_heap.c
[08500/00]  33:57.892  10a9:block getsize A9C16520 1048576  0057  apps_mem_heap.c
[08500/02]  33:57.892  10a9:dspCV_initRemoteHeap initializing remote heap, SUCCESS  0131  dspCV_imp.c
[08500/02]  33:57.892  Setting app type to COMPUTE_CLIENT_CLASS  0397  fastrpc_kpower.c
[08500/02]  33:57.892  Setting clock - mipsTotal: 1000 mipsPerThread: 500  0233  fastrpc_kpower.c
[08500/02]  33:57.892  Setting bus_bw -  bwBytePerSec: 12000000000 usagePercentage: 100   0249  fastrpc_kpower.c
[08500/02]  33:57.892  Grew HAP diag queue. unused=17 total=32  0085  HAP_diag.c
[08500/02]  33:57.892  Setting latency 1000  0267  fastrpc_kpower.c
[08500/02]  33:57.895  10a9:dspCV_initQ6 votes 1000 total MCPS, 500 MCPS per thread.  0418  dspCV_imp.c
[08500/02]  33:57.895  10a9:dspCV_initQ6 votes bus BW 12000 MB/sec, bus usage 100 percent, and max latency 1000 uSec  0420  dspCV_imp.c
[08500/02]  33:57.908  a6:uimg not supported  0519  map_object.c
[08500/02]  33:57.915  a6:uimg not supported  0519  map_object.c
[08500/02]  33:57.963  requesting hvx power for client 25  0347  fastrpc_kpower.c
[08500/02]  33:58.380  10a9:Entering dspCV_deinitQ6()...   0466  dspCV_imp.c
[08500/02]  33:58.381  Deprecated method called. Please use HAP_power_get() / HAP_power_set() instead.  0103  fastrpc_kpower.c
[08500/02]  33:58.381  Max MIPS=825  0663  fastrpc_kpower.c
[08500/02]  33:58.381  Max bus bw=614400000  0673  fastrpc_kpower.c
[08500/02]  33:58.381  Setting latency -1  0267  fastrpc_kpower.c
[08500/02]  33:58.381  releasing hvx power for client 25  0350  fastrpc_kpower.c
 
----------------------------------------------------------------------------------------------------------------
On shell, and in mini-dm applicaiton gives successful message. But at logcat it gives the upper- error of ION memory allocation. So i don't know my application is running fine or not..??
 
I am using SDK 3.0 for 820(msm8996) processor.
Any help much appriciated.
Thanks in advance.
 
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.