cancel
Showing results for 
Search instead for 
Did you mean: 

SW4STM32/Ac6 - Printf long long with ''%''PRId64 or ''%lld'' specifier

Kamil Panek
Associate
Posted on June 27, 2018 at 12:27

Hello,

There is probably a bug in SW4STM32 toolchain.

When I'm trying to do (var is long long type):

snprintf(buf, 64, '%lld', var);

or

snprintf(buf, 64, '%'PRId64, var);

there is just 'ld' in output buffer.

How to add support for 64-bits numbers to printf-related functions? Is there any linker flag similiar to '-u _printf_float'? My current flags are: '-specs=nosys.specs -specs=nano.specs -u _printf_float'.

BR,

Kamil

Edit:

I solved it. Well, there should't be '-specs=nano.specs' flag. 

#stm32 #ac6 #sw4stm32
0 REPLIES 0