Strange problem with bsp library and CMSIS library

Hi,

I'm developing code for the nrf5340 network core. I am including the file ../nordic_bsp/modules/nrfx/mdk/nrf5340_network.h in one of my source files. This file has the following:

#define __DSP_PRESENT                  0        /*!< DSP present or not

When I build, I get the following error and the build aborts:

../../../thirdparty/nordic-bsp/components/toolchain/cmsis/include/core_cm33.h:146:8: error: #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)"
  146 |       #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)"

Looking at core_cm33.h:

#if defined ( __CC_ARM )
  #if defined (__TARGET_FPU_VFP)
    #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
      #define __FPU_USED       1U
    #else
      #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
      #define __FPU_USED       0U
    #endif
  #else
    #define __FPU_USED         0U
  #endif
  #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U)
    #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U)
      #define __DSP_USED       1U
    #else
      #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)"
      #define __DSP_USED         0U
    #endif
  #else
    #define __DSP_USED         0U
  #endif

So the test for __DSP_PRESENT correctly determines that it is not so why does it throw an error? This surely is normal, not an error.

Any advice would be appreciated.

Regards,

AC

Parents Reply Children
Related