How could blocks from Robotics System Toolbox be built into embedded code running on Arm Cortex-A9?
3 views (last 30 days)
I'm trying to build the simulink model posted below into embedded code, which is intended to run on Arm Cortex-A9. After several tries, I got error like these:
D:/Matlab/toolbox/shared/robotics/robotcore/builtins/libsrc/collisioncodegen/collisioncodegen_CollisionGeometry.cpp:43:14: error: 'Type' is not a class or namespace case Type::Box: // for box primitive
D:/Matlab/toolbox/shared/robotics/robotcore/builtins/libsrc/collisioncodegen/collisioncodegen_CollisionGeometry.cpp:77:27: error: expected primary-expression before ':' token.
Are there any suggestions. Many thanks!
Version of my tools, matlab 2020b, simulink 2020b, Robotics System Toolbox 3.2, Embedded Coder 7.5
Karsh Tharyani on 28 Apr 2022
My best guess is that the C++ compiler on the ARM Cortex-A9 doesn't support C++11. We are using scoped enums (the enum in question is Type), and rvalue references which are features available since C++11.
Unfortunately, there is no workaround for this without modifying the generated source code or having a compiler which supports C++11.
If your application is not restricted to an A9, you can try using an ARM Cortex-A57 which should successfully compile the generated code.