diff --git a/Source/FilteringFunctions/arm_levinson_durbin_f32.c b/Source/FilteringFunctions/arm_levinson_durbin_f32.c index d8f4999d..ae8037ac 100755 --- a/Source/FilteringFunctions/arm_levinson_durbin_f32.c +++ b/Source/FilteringFunctions/arm_levinson_durbin_f32.c @@ -48,7 +48,11 @@ @return none */ -#if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H) +#pragma GCC warning "Scalar version of arm_levinson_durbin_f32 built. Helium version has build issues with gcc." +#endif + +#if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(__CMSIS_GCC_H) #include "arm_helium_utils.h" diff --git a/Source/FilteringFunctions/arm_levinson_durbin_q31.c b/Source/FilteringFunctions/arm_levinson_durbin_q31.c index d6e92209..6b14dc40 100755 --- a/Source/FilteringFunctions/arm_levinson_durbin_q31.c +++ b/Source/FilteringFunctions/arm_levinson_durbin_q31.c @@ -107,7 +107,12 @@ __STATIC_FORCEINLINE q31_t divide(q31_t n, q31_t d) @param[in] nbCoefs number of autoregressive coefficients @return none */ -#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) + +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H) +#pragma GCC warning "Scalar version of arm_levinson_durbin_q31 built. Helium version has build issues with gcc." +#endif + +#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(__CMSIS_GCC_H) #define LANE23_MASK 0xFF00 diff --git a/gcc.cmake b/gcc.cmake index 9cb2f42b..809856d8 100644 --- a/gcc.cmake +++ b/gcc.cmake @@ -15,14 +15,17 @@ find_program(CMAKE_C_COMPILER NAMES arm-none-eabi-gcc arm-none-eabi-gcc.exe) find_program(CMAKE_CXX_COMPILER NAMES arm-none-eabi-g++ arm-none-eabi-g++.exe) find_program(CMAKE_ASM_COMPILER NAMES arm-none-eabi-gcc arm-none-eabi-gcc.exe) + +if (NOT ("${tools}" STREQUAL "")) +message(STATUS "Tools path is set") SET(CMAKE_AR "${tools}/bin/ar") SET(CMAKE_CXX_COMPILER_AR "${tools}/bin/ar") SET(CMAKE_C_COMPILER_AR "${tools}/bin/ar") - -#find_program(CMAKE_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe ) -#find_program(CMAKE_CXX_COMPILER_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe ) -#find_program(CMAKE_C_COMPILER_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe) - +else() +find_program(CMAKE_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe ) +find_program(CMAKE_CXX_COMPILER_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe ) +find_program(CMAKE_C_COMPILER_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe) +endif() #SET(CMAKE_LINKER "${tools}/bin/arm-none-eabi-g++") find_program(CMAKE_LINKER NAMES arm-none-eabi-g++ arm-none-eabi-g++.exe) @@ -48,10 +51,17 @@ if(NOT ARM_CPU) endif(NOT ARM_CPU) if (ARM_CPU STREQUAL "cortex-m55") +# For gcc 10q4 SET(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections -march=armv8.1-m.main+mve.fp+fp.dp" CACHE INTERNAL "C compiler common flags") SET(CMAKE_CXX_FLAGS "-ffunction-sections -fdata-sections -march=armv8.1-m.main+mve.fp+fp.dp" CACHE INTERNAL "C compiler common flags") SET(CMAKE_ASM_FLAGS "-march=armv8.1-m.main+mve.fp+fp.dp" CACHE INTERNAL "ASM compiler common flags") SET(CMAKE_EXE_LINKER_FLAGS "-fno-use-linker-plugin -march=armv8.1-m.main+mve.fp+fp.dp" CACHE INTERNAL "linker flags") +elseif (ARM_CPU STREQUAL "cortex-m55+nomve.fp+nofp") +# This case is not tested nor supported +SET(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections -march=armv8.1-m.main+dsp+fp.dp" CACHE INTERNAL "C compiler common flags") +SET(CMAKE_CXX_FLAGS "-ffunction-sections -fdata-sections -march=armv8.1-m.main+dsp+fp.dp" CACHE INTERNAL "C compiler common flags") +SET(CMAKE_ASM_FLAGS "-march=armv8.1-m.main+dsp+fp.dp" CACHE INTERNAL "ASM compiler common flags") +SET(CMAKE_EXE_LINKER_FLAGS "-fno-use-linker-plugin -march=armv8.1-m.main+dsp+fp.dp" CACHE INTERNAL "linker flags") else() SET(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections -mcpu=${ARM_CPU}" CACHE INTERNAL "C compiler common flags") SET(CMAKE_CXX_FLAGS "-ffunction-sections -fdata-sections -mcpu=${ARM_CPU}" CACHE INTERNAL "C compiler common flags")