cancel
Showing results for 
Search instead for 
Did you mean: 

Integer types u_int32_t and uint32_t

wickeLine228
Associate II

Hello. Why STM32CubeIDE suggesting me to autocomplete u (unsigned type) as a u_int32_t if it doesn't built? However uint32_t works well. What is the difference using u_intXX_t and uintXX_t?

1 ACCEPTED SOLUTION

Accepted Solutions
Sarra.S
ST Employee

Hello @wickeLine228 

The types u_intXX_t and uintXX_t are both used to represent unsigned integers of a specific size. However, uintXX_t is from the C standard library and u_intXX_t is not part of the standard C library, and its definition varies depending on the platform and compiler being used.

The STM32CubeIDE is based on the C standard library, which is why uint32_t works well. The u_int32_t might not be recognized because it's not included in the standard library used by STM32CubeIDE.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Sarra.S
ST Employee

Hello @wickeLine228 

The types u_intXX_t and uintXX_t are both used to represent unsigned integers of a specific size. However, uintXX_t is from the C standard library and u_intXX_t is not part of the standard C library, and its definition varies depending on the platform and compiler being used.

The STM32CubeIDE is based on the C standard library, which is why uint32_t works well. The u_int32_t might not be recognized because it's not included in the standard library used by STM32CubeIDE.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.