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
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]
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
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?- 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>
Thanks for your kind help ^_^
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
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?- 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>
Thanks for your kind help ^_^
I have solved this problem. If anyone meet similar problem, please make free to contact me. My email [email protected]
I am working on the same project, and encounter same error, can you still remember how you solved it?