cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
1,304 Views
Registered: ‎02-25-2014

Error using xfopencv library example as accelerator in zc702

Jump to solution

Hello,

I do not know why this message was considered as a spam !

Using the xfopencv library ( gaussian filter function),  I ran successfully the example when I do not use it as an accelerator.

When I toggle the function GaussianBlur to the HW, I get the following error:

Create data motion intermediate representation
Performing accelerator source linting for w0_xf_GaussianBlur
Performing pragma generation
INFO: [PragmaGen 83-3231] Successfully generated tcl script: ../Debug/_sds/vhls/w0_xf_GaussianBlur.tcl
Moving function w0_xf_GaussianBlur to Programmable Logic
ERROR: [SdsCompiler 83-5019] Exiting sds++ : Error when calling '/opt/Xilinx/Vivado/2017.4/bin/vivado_hls .../Debug/_sds/vhls/w0_xf_GaussianBlur_run.tcl -l w0_xf_GaussianBlur_vivado_hls.log'

I get this error in the log file

PetaLinux/xilinx_zc702_2017_4/build/tmp/sysroots/plnx_arm/usr/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
# include <gnu/stubs-soft.h>
          ^
1 error generated.
C preprocessor failed.

So the stubs-soft file in the gnu folder is missing. I tried the following suggestions and It did not work:

1- I added these flags to the compiler: -mcpu=cortex-a9  -mfpu=vfpv3 -mfloat-abi=hard to the compiler. I think these flags only work for bare metal application.

2- I tried to add the soft stubs missing file in the petalinux environment; rebuild the rootfs but I could not do that. It makes sense because the arm processor has already a floating point unit.

So my question is how can I implement xfopencv function as an accelerator for the zc702

Thank you
Hassen

1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
1,452 Views
Registered: ‎02-25-2014

Hello,

Finally, I ran successfully my first example using xfopencv as hardware accelerator in zc702 board.
I followed this article here

After export the SYSROOT variable (linux root file system) and add the xfopencv library to your project, just delete all the paths in SDS++Compiler/Directories which are automatically generated..

Then you add the path of the xfopencv/include and your opencv libraries from the rootfs: here I just added  the include path where only 2 folders are present: opencv and opencv2, because when I added all the folders the vivado hls will generate others errors like this "soft-stubs missing file".

In the SDS++ Linker -> Libraries: add the library "opencv_highgui" if missing.

This works for me.

Best regards,
Hassen

View solution in original post

1 Reply
Highlighted
Contributor
Contributor
1,453 Views
Registered: ‎02-25-2014

Hello,

Finally, I ran successfully my first example using xfopencv as hardware accelerator in zc702 board.
I followed this article here

After export the SYSROOT variable (linux root file system) and add the xfopencv library to your project, just delete all the paths in SDS++Compiler/Directories which are automatically generated..

Then you add the path of the xfopencv/include and your opencv libraries from the rootfs: here I just added  the include path where only 2 folders are present: opencv and opencv2, because when I added all the folders the vivado hls will generate others errors like this "soft-stubs missing file".

In the SDS++ Linker -> Libraries: add the library "opencv_highgui" if missing.

This works for me.

Best regards,
Hassen

View solution in original post