Skip to content

Commit

Permalink
Correct issue #220 : use of DSP extension when CMSIS-Core not available.
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe0606 committed Dec 13, 2024
1 parent 4404d3e commit b2478c9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Include/arm_math_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,16 @@ extern "C"
#include <limits.h>

/* 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
Expand Down

0 comments on commit b2478c9

Please sign in to comment.