ARM platform binaries from C++ code generated for uavDubinsConnection

2 ビュー (過去 30 日間)
Yingao Zhang
Yingao Zhang 2021 年 4 月 30 日
編集済み: Yingao Zhang 2021 年 5 月 8 日
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