ARM platform binaries from C++ code generated for uavDubinsConnection

2 次查看(过去 30 天)
When I generate C++ code from MATLAB function blocks in Simulink using uavDubinsConnection (Dubins path connection for UAV - MATLAB (mathworks.com)) objects, there's commonly two binaries included in the generated source code: libmwautonomouscodegen.so and libmwuavdubinscodegen.so. However, since the source codes are emitted from a x86 development computer, porting the code on to an ARM-based embedded target results in failure due to binary imcompatibility:
Note that I've already selected Device vendor to be ARM compatible, and Device type to be ARM 64-bit (LLP64) in Hardware Implementation. How can I resolve this problem?

采纳的回答

Yingao Zhang
Yingao Zhang 2021-5-2
编辑:Yingao Zhang 2021-5-8
Ok, I've already solved this problem. It's due to the fact that uavdubinscodegen_connection.hpp header file contains the following definition:
Previously, when I ported the code to a different platform, I didn't manually add the -DIS_NOT_MATLAB_HOST option to the compiler, which resulted in compile time error reporting two missing files of the two tbb version .hpp. I actually manually copied these two tbb version .hpp to the generated file directory as well as the corresponding .so files from <matlabroot>.
I don't know if this manual addition of the -DIS_NOT_MATLAB_HOST option is as intented from the UAV Toolbox design or not. If this is indeed the case, could this necessity of manual compiler option definition be mentioned in the documentation? Such as the case for -DPORTABLE_WORDSIZES, etc.

更多回答(0 个)

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by