Forums - How to link with QuRT in FastRPC application?

15 posts / 0 new
Last post
How to link with QuRT in FastRPC application?
pyosifov
Join Date: 6 Aug 13
Posts: 19
Posted: Wed, 2014-03-26 10:30

When I need QuRT in FastRPC application (called app), I link my libapp_skell.so with QuRT object files (in Qualcomm/Hexagon_SDK/1.0.0/lib/common/qurt/core/kernel/qurt/install/ADSPv5MP/lib/) in hexagon.min file:

QURT_IMAGE_DIR = ../../../../lib/common/qurt
RTOS_DIR = $(QURT_IMAGE_DIR)/core/kernel/qurt/install/ADSPv5MP

libapp_skel_LIBS+=$(RTOS_DIR)/lib/libqurt
libapp_skel_LIBS+=$(RTOS_DIR)/lib/libqurtkernel
libapp_skel_LIBS+=$(RTOS_DIR)/lib/libqurtcfs
libapp_skel_LIBS+=$(RTOS_DIR)/lib/libposix

---end of cut---

Is it right way? Some QuRT functions seems working but another - causes crash !

PS. I'm see DspCV is linked with QuRT in another way, may be not with these object files... And glue/ dir looks differently...

  • Up0
  • Down0
ashapiro
Join Date: 30 Dec 13
Posts: 26
Posted: Wed, 2014-08-27 13:58

Hi,

Did you ever find a solution to this issue? I'm trying to take advantage of QuRT but I can't figure out what I need to link in to do so. I've tried linking in the same libraries as you, but it looks like they're all compiled as static libraries (.a) without -fpic so I get the following:

c:/qualcomm/hexagon_tools/5.0.13/gnu/bin/../lib/gcc/hexagon/4.4.0/../../../../hexagon/bin/ld.exe: C:\Qualcomm\Hexagon_SDK\1.1.0/lib/common/qurt/core/kernel/qurt/install/ADSPv5MP/lib/libqurt.a(qurt_rmutex.o): relocation R_HEX_32_6_X in section `.text' cannot be handled in a shared object; recompile with `-fpic'
C:\Qualcomm\Hexagon_SDK\1.1.0/lib/common/qurt/core/kernel/qurt/install/ADSPv5MP/lib/libqurt.a: could not read symbols: Bad value
Not entirely sure that's even what I'm supposed to be linking in though.
 
My library compiles fine with the qurt calls in it, they're just unresolved. I initially thought qurt might be on the device already as a shared object so I tried running it but I get the following when I do:
08-05 04:58:13.176: E/adsprpc(20039): vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:196::error: -5: 0 == (nErr = dlerr)
08-05 04:58:13.176: E/adsprpc(20039): vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:199:adsp dlopen error: rtl_uat ./librtl_uat_skel.so: Undefined PLT symbol "HAP_pls_add_lookup" (symnum = 77)

Any advice?

Thanks,

Adam

  • Up0
  • Down0
jeff4s Moderator
Join Date: 4 Nov 12
Posts: 106
Posted: Wed, 2014-08-27 14:48

For Hexagon SDK issue, there is a forums for it. There are more Hexagon experts there to answer related questions.

  • Up0
  • Down0
ashapiro
Join Date: 30 Dec 13
Posts: 26
Posted: Wed, 2014-08-27 16:18

Sorry, I'm confused. Is this thread not posted in the Hexagon SDK tools/installation forum? Note the link at the top of the page below the menu bar:

  1. Forums
  2. Maximize Hardware
  3. Multimedia Optimization (Hexagon SDK)
  4. Tools/Installation
  5. How to link with QuRT in FastRPC application?

I can't seem to find this thread if I search for it or if I look through Tools/Installation manually, but it shows up in a Google search for QuRT.

Should it be in HLOS? It's not always entirely clear to me which of the forum categories is correct. I'm happy to repost in the appropriate place if necessary.

Thanks,

Adam

  • Up0
  • Down0
Admin User
Join Date: 10 Aug 12
Posts: 2079
Posted: Wed, 2014-08-27 16:20
Hello - forum admin here. Saw your post in the FastCV forum earlier today so I moved it over to the Hexagon SDK forum.
  • Up0
  • Down0
ashapiro
Join Date: 30 Dec 13
Posts: 26
Posted: Sat, 2014-08-30 12:23

All,

I was able to resolve this issue by re-pushing the SDK's adsp image to my device using push_adsp.cmd. Apparently the image included in the BSP for the Intrinsyc DragonBoard does not include QuRT support and my previous attempt with push_adsp.cmd didn't work. If you have an image with QuRT support, you should not need to link your skel library to anything. You will just need to add the following include path when compiling:

$(HEXAGON_SDK_ROOT)/lib/common/qurt/core/api/kernel/qurt

Hope this helps.

Adam

  • Up0
  • Down0
khushi.shah
Join Date: 15 Jun 15
Posts: 14
Posted: Mon, 2015-08-03 23:32

I want to know on which board you have tried qurt linking with  application?

  • Up0
  • Down0
jmay Moderator
Join Date: 11 Sep 13
Posts: 34
Posted: Tue, 2015-08-04 08:59

QuRT libraries and object files are only linked in when running on the simulator.

On target, the DSP image already has QuRT linked in, to take advantage of it from a shared object you must include the QuRT headers when you build the shared object which will result in unresolved symbols in the shared object (the linker won't complain).  Then when the shared object is loaded on target the loader will resolve those symbosl to symbols in the DSP image.

  • Up0
  • Down0
khushi.shah
Join Date: 15 Jun 15
Posts: 14
Posted: Tue, 2015-08-04 23:25

I am  using  hexagon sdk 1.2.2 and board 410c. I have inluded necessary qurt header files (qurt.h and qurt_thread.h) . When i tried to build example  it gives  me undefined  reference to thread_create. So i tried to link  libraries qurt and qurt_kernel but it gives me error no rule to make target libqurt.a

  • Up0
  • Down0
jmay Moderator
Join Date: 11 Sep 13
Posts: 34
Posted: Wed, 2015-08-05 10:04

Hexagon SDK is not supported on the 410c, please use 810, 805, or 800

  • Up0
  • Down0
khushi.shah
Join Date: 15 Jun 15
Posts: 14
Posted: Wed, 2015-08-05 11:23
Calculator example build from hexagon sdk 1.2.2 is working on 410c. I have read 410c and 800 both have dsp version 5 architecture then what is the main difference so that down scale example is working on 800 but not on 410c . Is there any way to do multi threading in 410c ?
  • Up0
  • Down0
jmay Moderator
Join Date: 11 Sep 13
Posts: 34
Posted: Wed, 2015-08-05 12:30

I'm suprised that calculator is working on 410c.  410c only has an mDSP (no aDSP) and the calculator walkthrough talks to the aDSP.  You can take advantage of the mDSP by running calculator_multi_walkthrough.cmd but we have not done any verification that that has been enabled on 410c.

We are in the process of enabling 410c and will update the post when we know that's working.

You should be able to do multi-threading on any of the other platforms by following the qurt_multithread example.

 

  • Up0
  • Down0
khushi.shah
Join Date: 15 Jun 15
Posts: 14
Posted: Wed, 2015-08-05 21:46

I have tried multi-threading example(downscaleBy 2) on 800 platform  and it is working but  not SD600. SD600 supports qurt mutithreading or not?

  • Up0
  • Down0
jmay Moderator
Join Date: 11 Sep 13
Posts: 34
Posted: Thu, 2015-08-06 00:06

The Hexagon SDK support starts with the SD800, SD600 is not supported at this time.

  • Up0
  • Down0
khushi.shah
Join Date: 15 Jun 15
Posts: 14
Posted: Thu, 2015-08-27 23:28

SD600 supports qurt multi-threading . I am able to do 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.