Testing Hexagon SDK 6.x example on rubikpi3

Hi everyone, I am trying to run the Hexagon SDK 6.x calculator example on rubikpi3, but got the error after executing all these commands.

make tree V=UbuntuARM_Debug_aarch64
make make tree V=hexagon_Debug_dynamic_toolv84_v68

Then I transfer the files UbuntuARM_Debug_aarch64\ship\calculator , UbuntuARM_Debug_aarch64\ship\libcalculator.so to /vendor/bin and hexagon_Debug_toolv87_v69\ship\libcalculator_skel.so to /vendor/lib/rfsa/adsp/ on rubikpi sbc. Error log after running the /vendor/bin//calculator -r 0 -d 3 -n 1000 -U 0 on sbc,

- Starting calculator test on domain 3
src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc

- allocate 4000 bytes from ION heap
- creating sequence of numbers from 0 to 999
- compute sum on domain 3
- retry attempt unsuccessful. Timing out....
ERROR 0x72: Failed to compute sum on domain 3
ERROR 0x72: Failed to find max on domain 3
src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- calculator example failed with nErr = 114

Does anyone know how to fix the domain 3 DSP communication or what might be missing on the board?

Dear customer,
we are currently syncing this issue internally.

Dear customer,
May I inquire which version you are currently using—Android, Linux, or Debian?
Have you attempted to rebuild using the toolchain that matches the SDK?
If the issue persists, please provide a complete dmesg log.

Sorry, I mistakenly mentioned the 6.x SDK, but it’s actually 4.2.3 downloaded from(https://docs.qualcomm.com/bundle/publicresource/topics/80-77512-1/hexagon-dsp-sdk-getting-started.html?product=1601111740010422) Qualcomm, and here is my os info.

PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.0
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"Preformatted text

See the complete dmesg logs
dmesg.txt (245.6 KB)

Dear customer,
we will check it and feedback soon

Hey guys any update on this?

Dear customer,
Please run the following command:
export LD_LIBRARY_PATH=/usr/lib
When it has completed, proceed with your original operations.

Hi, I tried this too. I used SDK version 6.4.0, following the directions cited in the SDK: 6.4.0.0/docs/examples/calculator/index.html
After building examples/calculator


sudo mkdir -p /usr/lib/rfsa/dsp/sdk
sudo chmod 777 /usr/lib/rfsa/dsp/sdk
Copy libcalculator_skel.so to /usr/lib/rfsa/dsp/sdk
Copy UbuntuARM_ReleaseG_aarch64/ship to /tmp/ship (also copy UbuntuARM_ReleaseG_aarch64/libcdsprpc.so to /tmp/ship)


export EXE_PATH=/tmp/ship
export LD_LIBRARY_PATH=/usr/lib:/tmp/ship
export DSP_LIBRARY_PATH=/usr/lib/rfsa/dsp/sdk


./calculator -r 0 -d 0 -n 1000 -U 0

Starting calculator test
Attempting to run on signed PD on domain 0

Allocate 4000 bytes from ION heap
ERROR 0x68: memory alloc failed
ERROR 0x68: Calculator test failed

ERROR 0x68: Calculator example failed


ubuntu@aus-sdk:/tmp/ship$ ./calculator -r 0 -d 3 -n 1000 -U 1

ERROR 0xffffffff: FastRPC Capability API failed. Falling back to signed pd.Unsigned PD is not supported on domain 3.
ERROR 0x1: Calculator example failed


I had to check the SDK documentation to get the ARM-GCC tools installed they are not present by default. I followed the OS build support page’s directions to get them loaded.

Here are my system details (freshly flashed)
Kernel : 6.8.0-1054-qcom
Ubuntu Release: VERSION=“24.04.3 LTS (Noble Numbat)”

BTW I tried every combination of domain/signed/unsigned, but -d 3 is for the CDSP according to the help.

We are currently syncing this issue internally.

Try using -r 1 it works for me.

Yes -r 1 will work but I wanted to try using the CDSP, so I was using -r 0 which gave errors.

I was missing the fastrpc package, this is the fix:
sudo apt-get install qcom-fastrpc1

This didn’t fix everything so I did the following:

  • Still see the following error:
    • ./calculator -r 0 -d 3ERROR 0xffffffff: FastRPC Capability API failed. Falling back to signed pd.Unsigned PD is not supported on domain 3.
      ERROR 0x1: Calculator example failed
  • Download fastrpc from github and build. I downloaded to my SDK tree: Qualcomm/Hexagon_SDK/6.5.0.0/fastrpc
    • Note: The configure of this is tricky you must install yaml on the rubikpi-target and copy the development headers and libraries to your cross build environment.
      • The cross tools you installed in the SDK need the following:
        • Hexagon_SDK/6.5.0.0/tools/gcc_tools_64/aarch64-none-linux-gnu/lib64
          • libyaml-0.so.2
            libyaml-0.so.2.0.9
            libyaml.a
            libyaml.so
        • Hexagon_SDK/6.5.0.0/tools/gcc_tools_64/aarch64-none-linux-gnu/libc/usr/include
          • yaml.h
  • Once configured and built I did the following:
    • make DESTDIR=/tmp/frpc
    • Carefully copy the install artifacts over to the target
      • Everything in /usr/local is fine
      • For artifacts in /lib/systemd/system I did the following
        • sudo cp cdsprpcd.service orig-cdsprpcd.service
        • copy new cdsprpcd.service to /lib/systemd/system
          • Change this line:
            • ExecStart=/usr/bin/cdsprpcd
            • to
            • ExecStart=/usr/local/bin/cdsprpcd
  • Reboot
    • export DSP_LIBRARY_PATH=/home/ubuntu/calculator/hexagon_Debug_toolv84_v68
    • export LD_LIBRARY_PATH=/usr/local/lib:/home/ubuntu/calculator/UbuntuARM_Debug_aarch64
  • Run:
  • ./calculator -d 3 -r 0 -n 100Starting calculator test
    Attempting to run on unsigned PD on domain 3Allocate 400 bytes from ION heap
    Creating sequence of numbers from 0 to 99
    Compute sum on domain 3Call calculator_sum on the DSP
    Sum = 4950Call calculator_max on the DSP
    Max value = 99
    Success