Installation of OPENCV to MCUxpresso

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Installation of OPENCV to MCUxpresso

457 Views
GaganaTN
Contributor I

As per the document AN13725 to install opencv to MCU, execueted all the steps mentioned but facing errors in the last two steps. Please note that i need opencv for video stitching application using evkimxrt1050 board in c language.

Here is the  error occured after cmake execution:

CMake Error in CMakeLists.txt:

export called with target "opencv_world" which requires target

"libprotobuf" that is not in the export set.

If the required target is not easy to reference in this call, consider using APPEND option with multiple seperate calls.

 

CMake Warning in CMakeLists.txt:

The buils directory is a subdirectory of the source directory.

This is not supported well by Eclipse. It is strongly recommended to use a build directory which is a sibling of the source directory.

 

 

Tried to proceed to next step even after this error manipulated many CMake.txt files but the error kept changing.

After exectuing the next step with the error,

[ 1%] Linking C static library ..\lib\libzlib.a
[ 1%] Building CXX object CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/alloc.cpp.obj
[ 1%] Linking C static library ..\..\lib\liblibopenjp2.a
[ 1%] Linking C static library ..\lib\libquirc.a
[ 1%] Linking C static library ..\lib\liblibjpeg-turbo.a
Error running link command: The parameter is incorrect
3rdparty\zlib\CMakeFiles\zlib.dir\build.make:457: recipe for target '3rdparty/lib/libzlib.a' failed
mingw32-make[2]: *** [3rdparty/lib/libzlib.a] Error 2
CMakeFiles\Makefile2:270: recipe for target '3rdparty/zlib/CMakeFiles/zlib.dir/all' failed
mingw32-makError running link command: eThe parameter is incorrect[
1]: *** [3rdparty/zlib/CMakeFiles/zlib.dir/all] Error 2
mingw32-make[1]: *** 3rdparWty\openjpeg\opaenjp2\CMakeFileis\libopenjp2t.dir\ibuild.nmake:613: recipe for target '3rdparty/lgib/li blibopfenjp2.oa' farile d
umnifnignwi3s2h-emda kjeo[b2s].:. .*.*
* [3rdparty/lib/liblibopenjp2.a] Error 2
[ 1%] Linking C static library ..\lib\liblibwebp.a
CMakeFiles\Makefile2[ 1%] :488: recipe for targeBuilding CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/common.cc.objt '3r
dparty/openjpeg/openjp2/CMakeFiles/libopenjp2.dir/all' failed
mingw32-make[1]: *** [3rdparty/openjpeg/openjp2/CMakeFiles/libopenjp2.dir/all] Error 2
Error running link command: The parameter is incorrect
3rdparty\quirc\CMakeFiles\quirc.dir\build.make:145: recipe for target '3rdparty/lib/libquirc.a' failed
mingw32-make[2]: *** [3rdparty/liError running link command: The parameter is incorrect
b/libquirc.a] Error 2
CMakeFiles\Makefile2:643: recipe for target '3rdparty/quirc/CMakeFiles/quirc.dir/all' failed
mingw32-make[1]: **3rdparty\lib*jpe g-turbo\CMakeFile[s\libjpe3g-turbo.rdir\buildd.mpake:1419: recaipe fror ttaryget '3rdpa/rtyq/lib/ulibliibjpeg-trurbo.a' fcai/leCd
MamkienFgiwl3e2s-/mqaukier[c2.]d:i r*/*a*l l[]3 rEdrpraorrt y2/
lib/liblibjpeg-turbo.a] Error 2
CMakeFiles\Makefile2:320: recipe for target '3rdparty/libjpeg-turbo/CMakeFiles/libjpeg-turbo.dir/all' failed
mingw32-make[1]: *** [3rdparty/libjpeg-turbo/CMakeFiles/libjpeg-turbo.dir/all] Error 2
[ 1%] Building CXX object CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/assert.cpp.obj
[ 1%] Building CXX object CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/check_cycles.cpp.obj
[ 1%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/once.cc.obj
[ 1%] Building CXX object CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/edge.cpp.obj
Error running link command: The parameter is incorrect
3rdparty\libwebp\CMakeFiles\libwebp.dir\build.make:3031: recipe for target '3rdparty/lib/liblibwebp.a' failed
mingw32-make[2]: *** [3rdparty/lib/liblibwebp.a] Error 2
CMakeFiles\Makefile2:420: recipe for target '3rdparty/libwebp/CMakeFiles/libwebp.dir/all' failed
mingw32-make[1]: *** [3rdparty/libwebp/CMakeFiles/libwebp.dir/all] Error 2
[ 1%] Building CXX object CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/execution_engine.cpp.obj
C:\Users\admin\Desktop\opencv_mcu\opencv\build\3rdparty\ade\ade-0.1.1f\sources\ade\source\alloc.cpp: In function 'void* ade::aligned_alloc(std::size_t, std::size_t)':
C:\Users\admin\Desktop\opencv_mcu\opencv\build\3rdparty\ade\ade-0.1.1f\sources\ade\source\alloc.cpp:31:16: error: 'posix_memalign' was not declared in this scope
31 | auto res = posix_memalign(&ret, std::max(sizeof(void*), alignment), size);
| ^~~~~~~~~~~~~~
CMakeFiles\ade.dir\build.make:61: recipe for target 'CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/alloc.cpp.obj' failed
mingw32-make[2]: *** [CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/alloc.cpp.obj] Error 1
mingw32-make[2]: *** Waiting for unfinished jobs....
[ 1%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/statusor.cc.obj
C:\Users\admin\Desktop\opencv_mcu\3rdparty\protobuf\src\google\protobuf\stubs\common.cc:52:2: error: #error "No suitable threading library available."
52 | #error "No suitable threading library available."
| ^~~~~
C:\Users\admin\Desktop\opencv_mcu\3rdparty\protobuf\src\google\protobuf\stubs\once.cc: In function 'void google::protobuf::{anonymous}::SchedYield()':
C:\Users\admin\Desktop\opencv_mcu\3rdparty\protobuf\src\google\protobuf\stubs\once.cc:59:3: error: 'sched_yield' was not declared in this scope; did you mean 'SchedYield'?
59 | sched_yield();
| ^~~~~~~~~~~
| SchedYield
3rdparty\protobuf\CMakeFiles\libprotobuf.dir\build.make:421: recipe for target '3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/once.cc.obj' failed
mingw32-make[2]: *** [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/once.cc.obj] Error 1
mingw32-make[2]: *** Waiting for unfinished jobs....
3rdparty\protobuf\CMakeFiles\libprotobuf.dir\build.make:349: recipe for target '3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/common.cc.obj' failed
mingw32-make[2]: *** [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/common.cc.obj] Error 1
CMakeFiles\Makefile2:593: recipe for target '3rdparty/protobuf/CMakeFiles/libprotobuf.dir/all' failed
mingw32-make[1]: *** [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/all] Error 2
CMakeFiles\Makefile2:220: recipe for target 'CMakeFiles/ade.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/ade.dir/all] Error 2
Makefile:161: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

 

 

This is the error occuered in the terminal.

 

Tried all possible solutions but no output , it will be of great help if anyone has the solution for it.

 

Thanks

 

0 Kudos
Reply
6 Replies

409 Views
GaganaTN
Contributor I

Hi @Gavin_Jia ,

I did enable disable thread system support as you mentioned, obtained this warning message.

CMake Warning in CMakeLists.txt:
The build directory is a subdirectory of the source directory.

This is not supported well by Eclipse. It is strongly recommended to use a
build directory which is a sibling of the source directory.

 

Procceded further with the step and this is response i received for the last step

[ 1%] Linking C static library ..\lib\libzlib.a
[ 1%] Linking C static library ..\..\lib\liblibopenjp2.a
Error running link command: Error running link command: The parameter is incorrectThe parameter is incorrect

33rrdparty\zlib\CMakeFiles\zlib.dir\build.make:457: recipe fodparty\openjpeg\openjp2\CMakeFiles\libopenjp2.dir\build.maker target '3rdparty/lib/libzlib.a' failed
:613: recipe for target '3rdparty/lib/liblibopenjp2.a' failed
mimnignwg3w23-2m-amkaek[e2[]2]:: ****** [[33rrddppaarrttyy//lliibb//lliibbzlliibbo.pae]n jEpr2r.oar] E2r
ror 2
CMakeFiles\Makefile2:221: recipe for target '3rdparty/openjpeg/openjp2/CMakeFiles/libopenjp2.dir/all' failed
mingw32-make[1]: *** [3rdparty/openjpeg/openjp2/CMakeFiles/libopenjp2.dir/all] Error 2
mingw32-make[1]: *** Waiting for unfinished jobs....
CMakeFiles\Makefile2:148: recipe for target '3rdparty/zlib/CMakeFiles/zlib.dir/all' failed
mingw32-make[1]: *** [3rdparty/zlib/CMakeFiles/zlib.dir/all] Error 2
Makefile:161: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

 

Regards,

Gagana

0 Kudos
Reply

361 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @GaganaTN ,

Sorry for my late reply, due to the backlog of work content over these times. The good news is that there is support from the internal team on this issue, I will be sending a separate private email with the details, please check the email from SFDC.

Best regards,
Gavin

0 Kudos
Reply

359 Views
GaganaTN
Contributor I

Hi @Gavin_Jia ,

Thanks a lot for the reply and we will be looking forward for the support mail

0 Kudos
Reply

358 Views
GaganaTN
Contributor I
Hi @Gavin_Jia,
Thanks for the reply, we will be looking forward for the mail.

Regards,
gagana
0 Kudos
Reply

426 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @GaganaTN ,

Thanks for your interest in NXP MIMXRT series!

Based on some previous experience, it is recommended to make sure CMAKE version is cmake-3.10.2-win64-x64. Other version can't get good result. THREAD support must be disabled.

 

Gavin_Jia_1-1717739214100.png

Best regards,
Gavin

0 Kudos
Reply

285 Views
GaganaTN
Contributor I

Hi @Gavin_Jia ,

Greetings from em electronix,
 
We have designed a board using the i.MXRT1050 evk board scheme, but nothing changed. We are unable to detect the board in serial boot mode.
Tried the same thing with the Evaluation board and its working fine checked with all the schemes compared with our manufactured board and evaluation board, but couldn't find any solution, and we are stuck at the final stage of our project. It would be of great help if there is any solution  for this you can provide.
 
Thanks & Regards,
Gagana
0 Kudos
Reply