uint32_t 似乎在 CMSIS 数学文件中未知?

uint32_t seems to be unknown in the CMSIS Math files?

我遇到错误:

CMSIS/DSP/Include/arm_math.h:3943:3: error: unknown type name 'uint32_t'; did you mean 'wint_t'?

我可以将 stdint.h 添加到 arm_math.h,但我认为我首先做错了什么。 如果需要,CMSIS 开发人员肯定会添加一个包含吗? 有什么建议怎么办?我用的是arm-none-eabi-gcc.

stdint.hincluded in the header file for the relevant core, which - in turn - will be included as long as you define one of ARM_MATH_CM4ARM_MATH_CM7 等..

I could add stdint.h to the arm_math.h but I assume I did something wrong in the first place.

是:我认为您只需要确保定义了 afore-mentioned 宏之一。

来自CMSIS-DSP documentation

Define the appropriate pre processor MACRO ARM_MATH_CM7 or ARM_MATH_CM4 or ARM_MATH_CM3 or ARM_MATH_CM0 or ARM_MATH_CM0PLUS depending on the target processor in the application.