ARM platform binaries from C++ code generated for uavDubinsConnection

3 views (last 30 days)
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?

Accepted Answer

Yingao Zhang
Yingao Zhang on 2 May 2021
Edited: Yingao Zhang on 8 May 2021
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.

More Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!