From b2478c90dff7419ec9111f630ba1f4ae71c566c1 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Fri, 13 Dec 2024 08:37:09 +0000 Subject: [PATCH] Correct issue #220 : use of DSP extension when CMSIS-Core not available. --- Include/arm_math_types.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Include/arm_math_types.h b/Include/arm_math_types.h index b1934bbf..8c747ac8 100755 --- a/Include/arm_math_types.h +++ b/Include/arm_math_types.h @@ -112,10 +112,16 @@ extern "C" #include /* evaluate ARM DSP feature */ -/* Intrinsincs are defined in CMSIS Core that is not available when - * targeting Cortex-A or Cortex-R +/* __GNUC_PYTHON__ is disabling dependency to CMSIS Core. + * As consequence, DSP intrinsics (defined in CMSIS Core) + * cannot be used anymore even if __ARM_FEATURE_DSP is defined. + * It is the only way to build on a target not supported + * by CMSIS Core. + * + * ARM_MATH_NEON is used to enable the Neon variants. + * When Neon variants are enabled, the DSP extension are disabled */ -#if !defined(ARM_MATH_NEON) && !defined(ARM_MATH_NEON_EXPERIMENTAL) +#if !defined(__GNUC_PYTHON__) && !defined(ARM_MATH_NEON) && !defined(ARM_MATH_NEON_EXPERIMENTAL) #if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) #define ARM_MATH_DSP 1 #endif