CMSIS_5 icon indicating copy to clipboard operation
CMSIS_5 copied to clipboard

compiling for host (MacOS) gives compilation error in SupportFunctions/arm_q7_to_q31.c

Open sigurdpl opened this issue 5 years ago • 7 comments

I followed the advice in #1015 for compiling on MacOS.

I am now getting this error: /CMSIS_5-5.7.0/CMSIS/DSP/Source/SupportFunctions/arm_q7_to_q31.c:120:16: error: implicit declaration of function '__ROR' is invalid in C99 [-Werror,-Wimplicit-function-declaration] *pDst++ = (__ROR(in, 8)) & 0xFF000000;

cmake --build ../CMSIS_5-5.7.0/cmsis_test/cmake-build-debug --target testcmsisdsp -- -j 6

sigurdpl avatar Mar 16 '21 09:03 sigurdpl

Update, i tried the Development branch. It compiles. The problem one was the 5.7.0 release

sigurdpl avatar Mar 16 '21 12:03 sigurdpl

Only problem now is the SET(CMAKE_C_FLAGS_DEBUG "-D_DEBUG -D__GNUC_PYTHON__" CACHE INTERNAL "") seems to disable debugger

sigurdpl avatar Mar 16 '21 14:03 sigurdpl

@sigurdpl I don't think I am touching the CMAKE_C_FLAGS when building for host. What's inside your cmake-build-debug ?

christophe0606 avatar Mar 17 '21 05:03 christophe0606

@sigurdpl Note that there is a new option. You no more need to set the CMAKE_C_FLAGS to force __GNUC_PYTHON__

You can just use -DHOST=ON as a cmake option for the CMSIS-DSP.

christophe0606 avatar Mar 17 '21 06:03 christophe0606

Hi, thanks for the reply. I will definitely try that. This worked though: SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__GNUC_PYTHON__" CACHE INTERNAL "")

sigurdpl avatar Mar 17 '21 06:03 sigurdpl

But will definitely try with the -DHOST=ON option instead

sigurdpl avatar Mar 17 '21 06:03 sigurdpl

Removed completely the SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__GNUC_PYTHON__" CACHE INTERNAL "") Set -DHOST=ON

That totally worked!

sigurdpl avatar Mar 17 '21 06:03 sigurdpl