Jump to content
  • 0

sdsoc_opencv error


kotra sharmila

Question

hi ,

this is sharmila i installed SDx tools i am new to this.

->first time creating the project application project we need to add platform zybo is not there in platform list.

->I am tried so many methods to add custom platform for sdx 2017.4 and petalinux also 2017.4.

->and also any one share how to generate platform and creation of project in SDx guidelines in step by step.

any answer will help to me.

Thanks in advance,

K sharmila

Link to comment
Share on other sites

Recommended Posts

hi,

am following the above steps and created the sample project with default SDx example vector add its worked properly and created binaries , elf and all.

but am going for next step copy the src files from that revision pcam5 project sources and runned it showing the same error.

what can i do...

Workspace 1_057.png

Link to comment
Share on other sites

Try to use the following steps from Digilent SDSoC Platform README:

To install this platform and run the sample programs, do the following:

1. Set the SYSROOT environment variable and launch SDx. This is done in Linux by
   opening a new terminal and running:

   source /opt/Xilinx/SDx/2017.4/settings64.sh
   export SYSROOT=<extracted platform absolute path>/zybo_z7_20/sw/sysroot
   sdx
 
   In Windows, go to Start->Control Panel->System->Advanced->Environment Variables
   and create a new environment variable called SYSROOT with the value:

   <extracted platform absolute path>\zybo_z7_20\sw\sysroot

   Then launch SDx 2017.4 as normal.

2. Point to an empty directory to use as a workspace.

*NOTE* If you are also using the platform source then make sure you use a new,
       empty workspace, not the workspace with the platform generator project.
       SDx currently has a bug that breaks the ability to hardware accelerate
       functions in a platform's include path when that platform's project is
       also in the workspace.

3. In the top menu bar, click "Xilinx->Add Custom Platform..."
4. In the new window, click "Add Custom Platform..." and select the folder with
   the extracted platform (the folder this document is found in).
5. Click OK.
6. Now, in the top menu bar, click "File->New->SDx Project...".
7. Select Application Project and then press Next.
8. Name the project and press Next.
9. Select zybo_z7_20 and click Next.
10. Select Linux from the System Configuration drop-down.
11. Click Next, no other options should need to be changed on this page.
12. Select a sample application to run and click finish to create the project.

*NOTE* When creating a project that uses xfopencv, it is best to always use a
       sample project as a starting point. The source files can be replaced with
       the new project's source. This is because the sample project sets up a
       lot of build settings like include paths, libraries, and symbols that are
       required for the libraries to build.

13. Click the hammer button to build the project. This can take between 5-30 min
    on typical host machines.

If the build process is successful, using a sample project, your system is set correctly. Let me know if you encounter any issues using the above mentioned steps.

From this point you can try to replace the sources from the sample project with your code and try to build again.

Link to comment
Share on other sites

On 1/31/2019 at 6:25 AM, kotra sharmila said:

thanks for your quick reply can you please tell me how to run that project what you have attatched in sdsoc there is no cpp files . 

how can i run in gui 

regards

k sharmila

 

Hello,

I didn't attached any project. Do you mean the sample project that I mentioned?

Link to comment
Share on other sites

Hello @kotra sharmila,

From the logs that you provided I observed that you have some errors in the linking stage, some libraries cannot be found (opencv_videoio, opencv_flann, opencv_highgui, opencv_core, opencv_imgcodecs) and a warning generated by the fact that you compare a signed integer variable with an unsigned integer variable.

To solve the linking stage errors, use a xfopencv sample project as start point. Find more details in SDSoC platform readme.

Quote

*NOTE* When creating a project that uses xfopencv, it is best to always use a sample project as a starting point. The source files can be replaced with the new project's source. This is because the sample project sets up a lot of build settings like include paths, libraries, and symbols that are required for the libraries to build.

To solve the comparison warning, you can change

int i=0

to

unsigned int i=0

Let me know if you have any questions.

Link to comment
Share on other sites

thanks for your quick reply

actually i got the below error now

 

 

09:34:45 **** Incremental Build of configuration Debug for project face_web ****
make pre-build main-build
sdsoc_make_clean Debug
 
Building target: face_web.elf
Invoking: SDS++ Linker
sds++ -L/usr/lib --remote_ip_cache /home/roash-sw-linux/Desktop/projects/ip_cache -o "face_web.elf"  ./src/main.o   -lopencv_videoio -lopencv_flann -lopencv_highgui -lopencv_core -lopencv_imgcodecs -dmclkid 0  -sds-sys-config linux -sds-proc linux -sds-pf "/home/roash-sw-linux/Desktop/SdSoC-Zybo-z7-20/SDSoC-Zybo-Z7-20-master/sdsoc/zybo_z7_20/export/zybo_z7_20"
Removing implementation files from previous run
Analyzing object files
... /home/roash-sw-linux/Desktop/projects/face_web/Debug/src/main.o
Using prebuilt hardware
Skipping block diagram (BD), address map, port information and device registration for partition 0
Prepare hardware access API functions
Create accelerator stub functions
Compile hardware access API functions
Compile accelerator stub functions
Enable generation of boot files
Compile hardware access API functions
Link application ELF file
/home/roash-sw-linux/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/6.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_videoio
/home/roash-sw-linux/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/6.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_flann
/home/roash-sw-linux/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/6.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_highgui
/home/roash-sw-linux/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/6.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_core
/home/roash-sw-linux/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/6.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_imgcodecs
collect2: error: ld returned 1 exit status
ERROR: [SdsCompiler 83-5019] Exiting sds++ : Error when calling 'arm-linux-gnueabihf-g++     /home/roash-sw-linux/Desktop/projects/face_web/Debug/src/main.o /home/roash-sw-linux/Desktop/projects/face_web/Debug/_sds/swstubs/portinfo.o -L/usr/lib -lopencv_videoio -lopencv_flann -lopencv_highgui -lopencv_core -lopencv_imgcodecs   -L /home/roash-sw-linux/opt/Xilinx/SDx/2017.4/target/aarch32-linux/lib -L/home/roash-sw-linux/Desktop/projects/face_web/Debug/_sds/swstubs -Wl,--start-group  -Wl,--end-group -Wl,--start-group    -lpthread -lsds_lib -lxlnk_stub  -Wl,--end-group -o /home/roash-sw-linux/Desktop/projects/face_web/Debug/_sds/swstubs/face_web.elf'
sds++ log file saved as /home/roash-sw-linux/Desktop/projects/face_web/Debug/_sds/reports/sds.log
ERROR: [SdsCompiler 83-5004] Build failed

make: *** [face_web.elf] Error 1
makefile:45: recipe for target 'face_web.elf' failed

09:35:00 Build Finished (took 14s.913ms)

 

 

sds.log

sds_main.log

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...