I have a ROS node that contains code generated by Matlab coder. This code has been generated to make use of the NEON instruction set on ARM Cortex A CPUs. I want to compile this code on a Hardkernel Odroid XU4 (which runs on a Samsung Exynos5422 Cortex™-A15 2Ghz and Cortex™-A7 Octa core CPU). However I am not successful in compiling/linking my code.
I have added the the following compiler flags in the packages CMakeLists.txt:
-mfloat-abi=softfp -mfpu=neon -O2.
Yet, during compilation I get the following error message:
/usr/lib/gcc/arm-linux-gnueabihf/4.8/include/arm_neon.h:32:2: error:
#error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
This is followed by many more errors about unknown types:
/home/odroid/catkin_ws/src/vio_ros/src/codegen/mw_neon.c:12:2: error: unknown type name ‘float32x4_t’
/home/odroid/catkin_ws/src/vio_ros/src/codegen/mw_neon.c:36:2: error: unknown type name ‘int32x4_t’
...
And many more. All of these types seem to be defined in arm_neon.h
What do I need to do to be able to compile my code?
Thanks for your help