Drimer
Drimer

Reputation: 115

uint32_t seems to be unknown in the CMSIS Math files?

I am getting the error:

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

I could add stdint.h to the arm_math.h but I assume I did something wrong in the first place. Surely the CMSIS developer would have added an include if neccessary? Any suggestions what to do? I used arm-none-eabi-gcc.

Upvotes: 1

Views: 1681

Answers (2)

Pascal_LRT
Pascal_LRT

Reputation: 1

For me adding this ARM_MATH_CM4 ( STM32F4 ) to the symbols tab in the Symbols Tab under

C/C++ General Paths and Symbols

worked.enter image description here

Before that it throwed 660 errors when I accidentially added ARM_MATH_CM4 to the other paths in the Includes tab.

Upvotes: 0

David Collins
David Collins

Reputation: 3032

stdint.h is included in the header file for the relevant core, which - in turn - will be included as long as you define one of ARM_MATH_CM4, ARM_MATH_CM7, etc..

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

Yes: I think you just need to ensure that one of the afore-mentioned macros is defined.

From the 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.

Upvotes: 4

Related Questions