Forums - calculator compute on DSP failed

6 posts / 0 new
Last post
calculator compute on DSP failed
zhaoyangstar
Join Date: 14 Apr 19
Posts: 23
Posted: Mon, 2019-07-22 04:27

Hi, I followed the step by step guide to building, loading and executing the calculator example on Android. Everything seems OK,  the example run on CPU passed while on DSP failed with no debug info except for `Error: compute on DSP failed`.

I also tried running the command `python examples/common/calculator/calculator_walkthrough.py -T sm8150`. But it also met error on DSP.

All I did is following the SDK guide. Does anyone meet the same problem? I am pleased to disscus with you.

SDK version: Hexagon_SDK 3.4.3 with android-ndk r14b

Device: MI9 with Snapdragon 855

 

 

  • Up0
  • Down0
fearollchan
Profile picture
Join Date: 20 May 19
Posts: 6
Posted: Mon, 2019-07-22 22:27

  I ever met the problem and sloved it.

 you can use

#on android adb shell command

adb logcat -c #clean log

./calculator 0 1000 #excute

adb logcat #see the log to find what is the problem 

we need to see your log 

you can contact me by e-mail [email protected]

  • Up0
  • Down0
zhaoyangstar
Join Date: 14 Apr 19
Posts: 23
Posted: Tue, 2019-07-23 06:10

Thanks for your reply!

I followed your steps and the log is as follows:

<code>--------- beginning of main
--------- beginning of system
07-23 20:45:02.061  7197  7198 D adsprpc : HAP_utils.c:303:0x20c5:10: CDSP: Logging mask set to 31
07-23 20:45:02.062  7197  7198 E adsprpc : sigverify.c:707:0x20d5:10: CDSP: testsig root: 0c,09,76,0d  (qc test)
07-23 20:45:02.063  7197  7198 E adsprpc : sigverify.c:722:0x20d5:10: CDSP:   image root[0]: b6,6f,91,3f
07-23 20:45:02.063  7197  7198 E adsprpc : sigverify.c:724:0x20d5:10: CDSP: :error: signature does not match image root
07-23 20:45:02.063  7197  7198 W adsprpc : sigverify.c:591:0x20d5:10: CDSP: OEM ID -----------------------> 0x72
07-23 20:45:02.064  7197  7198 W adsprpc : sigverify.c:592:0x20d5:10: CDSP: Debug Fuse Enabled -----------> No
07-23 20:45:02.064  7197  7198 W adsprpc : sigverify.c:593:0x20d5:10: CDSP: Testsig Enabled --------------> No
07-23 20:47:59.281  7226  7227 D adsprpc : HAP_utils.c:303:0x30d5:10: CDSP: Logging mask set to 31</code>

It seems that the test signature does not match and testsig is disabled!  But I followed the steps to generate a test signature and no error occured.

<code> > adb shell /data/getserial


####################Serial number (see below)###########################

Serial Num : 0x736b5bcf

####################Serial number (see above)###########################

> python tools/elfsigner/elfsigner.py -t 0x736b5bcf
Logging to /home/mylaptop/WORK/Qualcomm_SDK/Hexagon_SDK/3.4.3/output/Elfsigner_log.txt

        Attention:
        Use of this tool is conditioned upon your compliance with Qualcomm
        Technologies'(and its affiliates') license terms and conditions;
        including, without limitations, such terms and conditions addressing
        the use of such tools with open source software.

        Agree? [y/n]:
        y
Signing a file may take up to 3 minutes due to network connectivity. Please wait patiently.
------------------------------------------------------------
Signing complete! Output saved at /home/mylaptop/WORK/Qualcomm_SDK/Hexagon_SDK/3.4.3/output/testsig-0x736b5bcf.so

> adb push output/testsig-0x736b5bcf.so /system/lib/rfsa/adsp/
524 KB/s (24784 bytes in 0.046s)

> adb reboot

> adb wait-for-device

> adb root

> adb shell

> cepheus:/ # which calculator
/vendor/bin/calculator

> cepheus:/ # calculator 1 1000                                                  

- starting calculator test
- allocate 4000 bytes from ION heap
- creating sequence of numbers from 0 to 999
- compute sum locally
- sum = 499500
- success

cepheus:/ # calculator 0 1000                                                  

- starting calculator test
- allocate 4000 bytes from ION heap
- creating sequence of numbers from 0 to 999
- compute sum on the DSP
Error: compute on DSP failed

usage: calculator <1/0 run locally> <uint32 size></code>
Also, the errer happend again. I saw the SDK said: However these testsigs and signed .so files would not authenticate successfully on production devices such as OEM phones and tablets. Is this is a problem?

Thanks for your kind help ^_^

  • Up0
  • Down0
zhaoyangstar
Join Date: 14 Apr 19
Posts: 23
Posted: Tue, 2019-07-23 06:13

Thanks for your reply!

I followed your steps and the log is as follows:

--------- beginning of main
--------- beginning of system
07-23 20:45:02.061  7197  7198 D adsprpc : HAP_utils.c:303:0x20c5:10: CDSP: Logging mask set to 31
07-23 20:45:02.062  7197  7198 E adsprpc : sigverify.c:707:0x20d5:10: CDSP: testsig root: 0c,09,76,0d  (qc test)
07-23 20:45:02.063  7197  7198 E adsprpc : sigverify.c:722:0x20d5:10: CDSP:   image root[0]: b6,6f,91,3f
07-23 20:45:02.063  7197  7198 E adsprpc : sigverify.c:724:0x20d5:10: CDSP: :error: signature does not match image root
07-23 20:45:02.063  7197  7198 W adsprpc : sigverify.c:591:0x20d5:10: CDSP: OEM ID -----------------------> 0x72
07-23 20:45:02.064  7197  7198 W adsprpc : sigverify.c:592:0x20d5:10: CDSP: Debug Fuse Enabled -----------> No
07-23 20:45:02.064  7197  7198 W adsprpc : sigverify.c:593:0x20d5:10: CDSP: Testsig Enabled --------------> No
07-23 20:47:59.281  7226  7227 D adsprpc : HAP_utils.c:303:0x30d5:10: CDSP: Logging mask set to 31

It seems that the test signature does not match and testsig is disabled!  But I followed the steps to generate a test signature and no error occured.

> adb shell /data/getserial


####################Serial number (see below)###########################

Serial Num : 0x736b5bcf

####################Serial number (see above)###########################

> python tools/elfsigner/elfsigner.py -t 0x736b5bcf
Logging to /home/mylaptop/WORK/Qualcomm_SDK/Hexagon_SDK/3.4.3/output/Elfsigner_log.txt

        Attention:
        Use of this tool is conditioned upon your compliance with Qualcomm
        Technologies'(and its affiliates') license terms and conditions;
        including, without limitations, such terms and conditions addressing
        the use of such tools with open source software.

        Agree? [y/n]:
        y
Signing a file may take up to 3 minutes due to network connectivity. Please wait patiently.
------------------------------------------------------------
Signing complete! Output saved at /home/mylaptop/WORK/Qualcomm_SDK/Hexagon_SDK/3.4.3/output/testsig-0x736b5bcf.so

> adb push output/testsig-0x736b5bcf.so /system/lib/rfsa/adsp/
524 KB/s (24784 bytes in 0.046s)

> adb reboot

> adb wait-for-device

> adb root

> adb shell

> cepheus:/ # which calculator
/vendor/bin/calculator

> cepheus:/ # calculator 1 1000                                                  

- starting calculator test
- allocate 4000 bytes from ION heap
- creating sequence of numbers from 0 to 999
- compute sum locally
- sum = 499500
- success

cepheus:/ # calculator 0 1000                                                  

- starting calculator test
- allocate 4000 bytes from ION heap
- creating sequence of numbers from 0 to 999
- compute sum on the DSP
Error: compute on DSP failed

usage: calculator <1/0 run locally> <uint32 size>
Also, the errer happend again. I saw the SDK said: However these testsigs and signed .so files would not authenticate successfully on production devices such as OEM phones and tablets. Is this is a problem?

Thanks for your kind help ^_^

 

  • Up0
  • Down0
zhaoyangstar
Join Date: 14 Apr 19
Posts: 23
Posted: Thu, 2019-11-07 17:42

I have solved this problem. If anyone meet similar problem, please make free to contact me. My email [email protected]

  • Up0
  • Down0
liuhaixu3
Join Date: 18 May 21
Posts: 4
Posted: Tue, 2021-06-01 21:12

I am working on the same project, and encounter same error, can you still remember how you solved it?

  • 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.