Forums - Can't Use fastCV Functions in IDE - "unsupported ELF machine number 164"

6 posts / 0 new
Last post
Can't Use fastCV Functions in IDE - "unsupported ELF machine number 164"
mucklekaz
Join Date: 5 Jun 17
Posts: 8
Posted: Thu, 2017-07-27 07:33

Hello,

I'm trying to create a project that will allow me to make use of some fastCV functions in the Hexagon IDE. I have successfully run the cornerApp example frovided in the Hexagon SDK from command line, but have been unable to get this example running in the IDE. I have tried to create my own project which could make use of some of the fastCV functions but was getting an "undefined reference to <...>" error.

I added the fastCV library ("libfastcvadsp.a") from the folder below,

                         "/home/kaz/Qualcomm/Hexagon_SDK/3.2/libs/fastcv/fastcv/hexagon_ReleaseG_toolv80_v60"

This got rid of the "undefined reference" error but I got the following error instead,

/home/kaz/Qualcomm/Hexagon_SDK/3.2/tools/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: fatal error: /home/kaz/Qualcomm/Hexagon_SDK/3.2/libs/fastcv/fastcv/hexagon_ReleaseG_toolv80_v60/libfastcvadsp.a: unsupported ELF machine number 164

Has anyone been able to overcome this problem, or run fastCV functions from the Hexagon IDE?

Ideally I would like to use the IDE and carry out the fastCV function on the Hexagon aDSP instead of the CPU using fastRPC, but for the moment I am attempting to run the functions on the CPU to begin with,

Any help would be appreciated.

 

Cheers

  • Up0
  • Down0
mcastell
Join Date: 24 Apr 13
Posts: 11
Posted: Fri, 2017-07-28 09:50

It looks like you are somehow trying to link a hexagon library into an android binary. This won't work...

  • Up0
  • Down0
mucklekaz
Join Date: 5 Jun 17
Posts: 8
Posted: Tue, 2017-08-01 13:38

Okay, so would I then be right in thinking that would suggest that it's not possible to run fastCV functions on the CPU (ARM) of the Snapdragon Board?

Is it only possible to run fastCV tasks by offloading the task to the Hexagon aDSP?

Cheers

  • Up0
  • Down0
mcastell
Join Date: 24 Apr 13
Posts: 11
Posted: Tue, 2017-08-01 14:45
 Running FastCV on CPU is a valid option, but not achievable by linking the hexagon version of the fastCV library to CPU app. FastCV has 2 different usage models:
 
 1) Run the application on the CPU, and specifying the mode via fcvSetOperationMode(). Then, when you call a fastCV function, it will choose whether to service that call locally on the CPU, or remotely to the DSP, based on your mode selected and which function you called. To follow this model, you don't even need the Hexagon SDK. The CPU and DSP fastCV libraries are already populated to the Android file system in our standard releases. (someone from the FastCV team could maybe help you more here if you have further questions).
 2) Assuming you want to run a significant portion of an application on the DSP, and would like to locally call fastCV functions on the DSP from within that application, then you follow the Hexagon SDK example.
 
 Thanks,
 Michael
 
  • Up0
  • Down0
mucklekaz
Join Date: 5 Jun 17
Posts: 8
Posted: Thu, 2017-08-03 09:26

Thanks for replying again Michael,

My situation is that I would like to test a function (fcvFilterThresholdOtsuu8) on both the CPU and the DSP to provide a comparison between the two (presumably highlighting the benifits of carrying out the function on the DSP). I feel that this process should be relatively straightforward.

   - Inculde the fastcv header files

   - Link the project to the relevant fastCV library (since I'm usign the Snapdragon 820, I think it should be the library found in        fastcv/hexagon_ReleaseG_toolv80_v60)

   - Call the function in the script as you would any other function

I want to be able to work within the IDE if possible. I've managed to run other examples from the command line (cornerApp example etc.) but would like to be able to work from the IDE to write my own code. Do you know how it would be possible to correctly link to the fastCV library in the IDE so that I can make use of the functions?

Cheers

 

 

 

Running FastCV on CPU is a valid option, but not achievable by linking the hexagon version of the fastCV library to CPU app. FastCV has 2 different usage models:

 
 1) Run the application on the CPU, and specifying the mode via fcvSetOperationMode(). Then, when you call a fastCV function, it will choose whether to service that call locally on the CPU, or remotely to the DSP, based on your mode selected and which function you called. To follow this model, you don't even need the Hexagon SDK. The CPU and DSP fastCV libraries are already populated to the Android file system in our standard releases. (someone from the FastCV team could maybe help you more here if you have further questions).
 2) Assuming you want to run a significant portion of an application on the DSP, and would like to locally call fastCV functions on the DSP from within that application, then you follow the Hexagon SDK example.
 
 Thanks,
 Michael
  • Up0
  • Down0
mucklekaz
Join Date: 5 Jun 17
Posts: 8
Posted: Thu, 2017-08-03 09:26

Thanks for replying again Michael,

My situation is that I would like to test a function (fcvFilterThresholdOtsuu8) on both the CPU and the DSP to provide a comparison between the two (presumably highlighting the benifits of carrying out the function on the DSP). I feel that this process should be relatively straightforward.

   - Inculde the fastcv header files

   - Link the project to the relevant fastCV library (since I'm usign the Snapdragon 820, I think it should be the library found in        fastcv/hexagon_ReleaseG_toolv80_v60)

   - Call the function in the script as you would any other function

I want to be able to work within the IDE if possible. I've managed to run other examples from the command line (cornerApp example etc.) but would like to be able to work from the IDE to write my own code. Do you know how it would be possible to correctly link to the fastCV library in the IDE so that I can make use of the functions?

Cheers

 

 

 

Running FastCV on CPU is a valid option, but not achievable by linking the hexagon version of the fastCV library to CPU app. FastCV has 2 different usage models:

 
 1) Run the application on the CPU, and specifying the mode via fcvSetOperationMode(). Then, when you call a fastCV function, it will choose whether to service that call locally on the CPU, or remotely to the DSP, based on your mode selected and which function you called. To follow this model, you don't even need the Hexagon SDK. The CPU and DSP fastCV libraries are already populated to the Android file system in our standard releases. (someone from the FastCV team could maybe help you more here if you have further questions).
 2) Assuming you want to run a significant portion of an application on the DSP, and would like to locally call fastCV functions on the DSP from within that application, then you follow the Hexagon SDK example.
 
 Thanks,
 Michael
  • 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.