Can't deploy the executable on Raspberry Pi and Matlab Coder doesn't generate the .elf file
10 次查看(过去 30 天)
显示 更早的评论
I've succesfully modified a deep learning matlab script to use it on a Raspberry Pi: i've done the code generation using Matlab Coder without any error and i've also tried the script directly on Matlab with the raspi connected to the pc. But if i try to deploy it as a standlone application on the raspi, i've got an error.
I've also tried to generate the code as an executable and even if the success message appears in the report saying that the output file is an .elf file, it doesn't appear in the folder or anywhere
I don't know if there is another possible way to deploy it on the raspi or to find out why the .elf file doesn't appear in the folder.
I post the options i used to generate the code and to deploy it, if they can be more useful.
Code Generation:
Deploy:
11 个评论
Prasanth Sunkara
2021-8-18
It is posible that the elf is running on the hw(raspberry pi). Try using the "Raspberry Pi resource monitor" app to confirm this.
Also, could you please share the error you saw on the MATLAB command window when the deployment failed. It would have some hints on why it failed.
-Prasanth
Walter Roberson
2021-8-18
The deploy error says that you cannot use an infinite loop. So put a finite but large loop instead. Or perhaps detect sufficiently dark image and terminate the loop, so you could break by covering the lens.
Pietro Ventrella
2021-8-18
I've modified the script used here ( https://it.mathworks.com/videos/deep-learning-with-raspberry-pi-and-matlab-1567791721457.html ) and the infinite loop generates just a simple warning.
Pietro Ventrella
2021-8-18
These is what is shown in the command window when i try to deploy the application on the raspi.
The "main" script is the script with the commands to deploy the application that i've shown in the original post and the error report is the one above
Walter Roberson
2021-8-18
I cannot read the entire error. Something about an error executing touch ?
Pietro Ventrella
2021-10-6
@Walter Roberson in order to have more informations, can i send you the entire build log?
Pietro Ventrella
2021-10-8
Log related to the deploy of the function “raspi_faceRecognition”
Error executing command "touch -c /home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/*.*;make -f raspi_faceRecognition_rtw.mk all MATLAB_WORKSPACE="/home/pi/MATLAB_ws/R2021a" -C /home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition". Details:
STDERR: vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<cv::Point3_<double>*, std::vector<cv::Point3_<double> > >’ changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’ changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h: In member function ‘virtual void cv::CascadeClassifierInvoker::operator()(const cv::Range&) const’:
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’ changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:69,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include/opencv2/core/types.hpp:53,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include/mwcore.hpp:58,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/mwcascadedetect.cpp:42:
/usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_range_insert(std::vector<_Tp, _Alloc>::iterator, _ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >; _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/8/bits/vector.tcc:672:7: note: parameter passing for argument of type ‘std::vector<double, std::allocator<double> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’} changed in GCC 7.1
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/vector.tcc:672:7: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’ changed in GCC 7.1
/usr/include/c++/8/bits/vector.tcc:672:7: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’ changed in GCC 7.1
In file included from /usr/include/c++/8/vector:64,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include/opencv2/core/types.hpp:53,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include/mwcore.hpp:58,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/mwcascadedetect.cpp:42:
/usr/include/c++/8/bits/stl_vector.h: In member function ‘virtual bool cv::MWCascadeClassifier::detectSingleScale(const cv::Mat&, int, cv::Size, int, int, double, std::vector<cv::Rect_<int> >&, std::vector<int>&, std::vector<double, std::allocator<double> >&, bool)’:
/usr/include/c++/8/bits/stl_vector.h:1549:4: note: parameter passing for argument of type ‘std::vector<double, std::allocator<double> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’} changed in GCC 7.1
_M_range_insert(__pos, __first, __last,
^~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1549:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’ changed in GCC 7.1
In file included from /usr/include/c++/8/vector:69,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include/opencv2/core/types.hpp:53,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include/opencv2/core.hpp:58,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include/opencv2/core/types_c.h:126,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include/opencv2/core/core_c.h:48,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include/precomp_objdetect.hpp:51,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/mwhaar.cpp:44:
/usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<double, std::allocator<double> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’} changed in GCC 7.1
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include/opencv2/core/types.hpp:53,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include/opencv2/core.hpp:58,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include/opencv2/core/types_c.h:126,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include/opencv2/core/core_c.h:48,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include/precomp_objdetect.hpp:51,
from /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/mwhaar.cpp:44:
/usr/include/c++/8/bits/stl_vector.h: In member function ‘virtual void cv::HaarDetectObjects_ScaleImage_Invoker::operator()(const cv::Range&) const’:
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’ changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
/usr/bin/ld: /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/win64/lib/opencv_core420.lib: error adding symbols: file format not recognized
collect2: error: ld returned 1 exit status
make: *** [raspi_faceRecognition_rtw.mk:319: /home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/raspi_faceRecognition.elf] Error 1
STDOUT: 2021a/D/Matlab2021a/extern/include -o "imregionalmax.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/imregionalmax.cpp"
g++ -c -MMD -MP -MF"isrow.cpp.dep" -MT"isrow.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/examples -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "isrow.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/isrow.cpp"
g++ -c -MMD -MP -MF"isequal.cpp.dep" -MT"isequal.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/examples -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "isequal.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/isequal.cpp"
g++ -c -MMD -MP -MF"bwlookup.cpp.dep" -MT"bwlookup.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/examples -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "bwlookup.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/bwlookup.cpp"
g++ -c -MMD -MP -MF"ind2sub.cpp.dep" -MT"ind2sub.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/examples -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "ind2sub.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/ind2sub.cpp"
g++ -c -MMD -MP -MF"excludePointsOutsideROI.cpp.dep" -MT"excludePointsOutsideROI.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/examples -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "excludePointsOutsideROI.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/excludePointsOutsideROI.cpp"
g++ -c -MMD -MP -MF"bsxfun.cpp.dep" -MT"bsxfun.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "bsxfun.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/bsxfun.cpp"
g++ -c -MMD -MP -MF"mod.cpp.dep" -MT"mod.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "mod.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/mod.cpp"
g++ -c -MMD -MP -MF"imresize.cpp.dep" -MT"imresize.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/examples -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "imresize.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/imresize.cpp"
g++ -c -MMD -MP -MF"unique.cpp.dep" -MT"unique.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/examples -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "unique.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/unique.cpp"
g++ -c -MMD -MP -MF"classify.cpp.dep" -MT"classify.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/examples -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "classify.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/classify.cpp"
g++ -c -MMD -MP -MF"predict.cpp.dep" -MT"predict.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/examples -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "predict.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/predict.cpp"
g++ -c -MMD -MP -MF"postProcessOutputToReturnCategorical.cpp.dep" -MT"postProcessOutputToReturnCategorical.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/examples -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/extern/include -o "postProcessOutputToReturnCategorical.cpp.o" "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition/postProcessOutputToReturnCategorical.cpp"
g++ -c -MMD -MP -MF"strtrim.cpp.dep" -MT"strtrim.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition -I/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace -I/home/pi/MATLAB_ws/R2021a/C/ProgramData/MATLAB/SupportPackages/R2021a_1/toolbox/realtime/targets/linux/include -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocv/include -
(.......)
echo "### Creating standalone executable "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/raspi_faceRecognition.elf" ..."
### Creating standalone executable /home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/raspi_faceRecognition.elf ...
g++ -lrt -lpthread -ldl -L"/opt/ComputeLibrary/lib" -rdynamic -larm_compute -larm_compute_core -Wl,-rpath,"/opt/ComputeLibrary/lib":-L"/opt/ComputeLibrary/lib" -fopenmp `sdl2-config --cflags --libs` -lmwraspiperipheral -o /home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/raspi_faceRecognition.elf MWCNNLayer.cpp.o MWElementwiseAffineLayer.cpp.o MWFCLayer.cpp.o MWFusedConvReLULayer.cpp.o MWInputLayer.cpp.o MWMaxPoolingLayer.cpp.o MWNormLayer.cpp.o MWOutputLayer.cpp.o MWReLULayer.cpp.o MWSoftmaxLayer.cpp.o MWTensorBase.cpp.o MWElementwiseAffineLayerImpl.cpp.o MWFCLayerImpl.cpp.o MWFusedConvReLULayerImpl.cpp.o MWInputLayerImpl.cpp.o MWMaxPoolingLayerImpl.cpp.o MWNormLayerImpl.cpp.o MWOutputLayerImpl.cpp.o MWReLULayerImpl.cpp.o MWSoftmaxLayerImpl.cpp.o MWCNNLayerImpl.cpp.o MWTargetNetworkImpl.cpp.o MWACLUtils.cpp.o MWCustomLayerForARMNEON.cpp.o MW_SDL2_video_display.c.o CascadeClassifierCore.cpp.o mwcascadedetect.cpp.o mwhaar.cpp.o mwpersistence.cpp.o cgCommon.cpp.o pointTrackerCore.cpp.o insertShapeUtilsCore.cpp.o cvstDraw.cpp.o insertShapeAndMarkerUtils.cpp.o insertMarkerUtilsCore.cpp.o raspi_faceRecognition_main_terminate.cpp.o raspi_faceRecognition_data.cpp.o rt_nonfinite.cpp.o rtGetNaN.cpp.o rtGetInf.cpp.o raspi_faceRecognition_initialize.cpp.o raspi_faceRecognition_terminate.cpp.o raspi_faceRecognition.cpp.o DeepLearningNetwork.cpp.o rectint.cpp.o detectMinEigenFeatures.cpp.o harrisMinEigen.cpp.o padarray.cpp.o imfilter.cpp.o power.cpp.o findPeaks.cpp.o minOrMax.cpp.o imregionalmax.cpp.o isrow.cpp.o isequal.cpp.o bwlookup.cpp.o ind2sub.cpp.o excludePointsOutsideROI.cpp.o bsxfun.cpp.o mod.cpp.o imresize.cpp.o unique.cpp.o classify.cpp.o predict.cpp.o postProcessOutputToReturnCategorical.cpp.o strtrim.cpp.o cellstr_sort.cpp.o strcmp.cpp.o find.cpp.o sprintf.cpp.o insertText.cpp.o sum.cpp.o insertMarker.cpp.o main.cpp.o nullAssignment.cpp.o insertionsort.cpp.o introsort.cpp.o insertObjectAnnotation.cpp.o webcam.cpp.o CascadeObjectDetector.cpp.o SDLVideoDisplay.cpp.o raspi.cpp.o PointTracker.cpp.o cornerPoints.cpp.o categorical.cpp.o NeighborhoodProcessor.cpp.o pointTrackerBuildable.cpp.o cascadeClassifierBuildable.cpp.o raspi_faceRecognition_rtwutil.cpp.o MW_raspi_init.c.o MW_Pyserver_control.c.o /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/win64/lib/opencv_core420.lib /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/win64/lib/opencv_imgproc420.lib /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/win64/lib/opencv_objdetect420.lib /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/win64/lib/opencv_calib3d420.lib /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/win64/lib/opencv_features2d420.lib /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/win64/lib/opencv_flann420.lib /home/pi/MATLAB_ws/R2021a/D/Matlab2021a/toolbox/vision/builtins/src/ocvcg/opencv/win64/lib/opencv_video420.lib -lm -lm -lstdc++
make: uscita dalla directory "/home/pi/MATLAB_ws/R2021a/D/Politecnico/Tesi_Prof.Giorgio/Matlab/RaspberryPi/MultipleFace/codegen/exe/raspi_faceRecognition"
Walter Roberson
2021-10-8
David Fink
2021-10-19
Note on "I've also tried to generate the code as an executable and even if the success message appears in the report saying that the output file is an .elf file, it doesn't appear in the folder or anywhere":
The "Generate code only" checkbox on the code generation options page prevents the makefile from being invoked, so only the C++ sources are generated, and the C++ compiler is not invoked.
Based on later comments, it looks like you were able to invoke the makefile via the deployment workflow.
Pietro Ventrella
2021-10-19
"The "Generate code only" checkbox on the code generation options page prevents the makefile from being invoked, so only the C++ sources are generated, and the C++ compiler is not invoked."
I've realized that shortly after. But even if I successfully generate code for an executable and run the "make -f filename.m" command I get errors.
Anyway i keep getting errors on the deployment phase even using different toolchains. In particular i have used "Microsoft Visual C++ 2019 v16.0 | nmake (64-bit Windows)" (which is also the specific compiler required on windows by functions that call opencv components, like the cascade object detector) but i got this error:
****************************************************************************************************************************************
cl /TP -c -nologo -GS -W4 -DWIN32 -D_MT -MT -EHs -D_CRT_SECURE_NO_WARNINGS /wd4251 /O2 /Oy- -std=c++11 -mfpu=neon -fopenmp /source-charset:utf-8 /openmp /wd4101 -D_MW_MATLABTGT_ -DUSE_19_05_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_MATLABTARGET -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=raspi_singleFaceRecognition @raspi_singleFaceRecognition_rtw_comp.rsp -Fo"MWAvgPoolingLayer.obj" D:\Politecnico\Tesi_Prof.Giorgio\Matlab\RaspberryPi\Riconoscimento_Singolo\codegen\exe\raspi_singleFaceRecognition\MWAvgPoolingLayer.cpp
cl : warning della riga di comando D9002 : l'opzione sconosciuta '-std=c++11' verrà ignorata
cl : warning della riga di comando D9002 : l'opzione sconosciuta '-mfpu=neon' verrà ignorata
cl : warning della riga di comando D9002 : l'opzione sconosciuta '-fopenmp' verrà ignorata
MWAvgPoolingLayer.cpp
D:\VisualStudio\VC\Tools\MSVC\14.29.30037\include\arm_neon.h(21): fatal error C1189: #error: This header is specific to ARM targets
NMAKE : fatal error U1077: 'D:\VisualStudio\VC\Tools\MSVC\14.29.30037\bin\HostX64\x64\cl.EXE' : codice restituito '0x2'
Stop.
The make command returned an error of 2
Error(s) encountered while building "raspi_singleFaceRecognition"
****************************************************************************************************************************************
回答(1 个)
Walter Roberson
2021-10-8
The error:
So opencv_core420.lib was not compiled with the same compiler.
You are compling with MinGW 7.1 or later, but you are using R2020b, which needs MinGW 6.3 https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/system-requirements-release-2020b-supported-compilers.pdf
8 个评论
Pietro Ventrella
2021-10-9
编辑:Pietro Ventrella
2021-10-9
I'm currently using R2021a, in fact if you notice the log I sent you recently it's not the copy of the one I posted some time ago, but it is related to the same error as I have not modified the script since then.
Regarding to the compiler i'm using Visual Studio C++ 2019 compiler for both C and C++, cause i've seen it's the only Windows supported compiler for code generation for functions that use openCV libraries
In fact if i try to generate the code using minGW compiler i receive this error
that redirects me to this page: https://www.mathworks.com/help/vision/ug/portable-c-code-generation-for-functions-that-use-opencv-library.html
Walter Roberson
2021-10-9
The logs in https://www.mathworks.com/matlabcentral/answers/887539-can-t-deploy-the-executable-on-raspberry-pi-and-matlab-coder-doesn-t-generate-the-elf-file#comment_1773986 are clear they are R2020b and using GCC 7.1 or later . If it had been built with VS C++ then the logs would not be mentioning g++
Pietro Ventrella
2021-10-9
Using the command "gcc -v" in the powershell i see that i've installed the version 9.2.0
But if i run this command in matlab it shows that i've version 6.3.0
Walter Roberson
2021-10-9
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’ changed in GCC 7.1
I guarantee that gcc 6.3 did not create that message.
The make process is picking up your newer gcc somehow.
Pietro Ventrella
2021-10-12
编辑:Pietro Ventrella
2021-10-12
Is it possible that the gcc version installed on the raspi is the problem?
I've also tried to deploy this code from a different PC that has not minGW compiler installed on it, but i get the same error.
Walter Roberson
2021-10-12
Is it possible that the gcc version installed on the raspi is the problem?
No, the build process is entirely on the MATLAB host, and does not ask the raspi to compile.
Pietro Ventrella
2021-10-12
so why did i get the same error while generating the code with a pc that has only visual studio 2019 compiler (and hasn't any version of minGW compiler installed) ?
With both PCs i have correctly generated this code https://it.mathworks.com/help/supportpkg/raspberrypiio/ref/identify-objects-within-video-using-resNet-50-on-raspberry-pi-hardware.html , so i don't get what is the problem with my code
Walter Roberson
2021-10-12
Sorry, I do not have a Windows development system to test with.
(Microsoft considers me a commercial developer when I am volunteering to help other people, and the commercial licenses I would need are several thousand dollars per year.)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
亚太
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)