cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube_FW_G0_V1.6.3 precompiled math.lib Inconsistent wchar_t size with IAR 9.20 and up

nico23
Senior III

I'm using the latest library provided by the STM32Cube_FW_G0_V1.6.3, specifically STM32Cube_FW_G0_V1.6.3\Drivers\CMSIS\DSP\Lib\ARM\arm_cortexM0l_math.lib

but when using IAR 9.20 I'm having the warning

	Warning[Lt009]: Inconsistent wchar_t size			
	            arm_sin_f32.o(arm_cortexM0l_math.lib) and 1 other objects in arm_cortexM0l_math.lib have wchar_t size 16 bits			
	            my_file.o and 54 other objects, some of them in rt6M_tl.a and 5 other libraries have wchar_t size 32 bits			

How do I avoid the mismatch?

I would like to avoid to link the source code for the cortex M math library and compile it myself.

2 REPLIES 2
Pavel A.
Super User

In your main project, how is wchar_t defined? Do you use any text functions (trace, logs...) with wide chars?

See also: 

https://mypages.iar.com/iarlogin/s/article/Library-built-with-7-xx-causes-warning-message-in-8-xx-or-later?language=en_US

 

I'm using stdlib.h and stddef.h, which define

#ifndef _WCHART
  #define _WCHART
  typedef _Wchart wchar_t;
#endif

But I'm not directly defining it nor using trace, logs, or any text function.