Skip to main content
SRavn.1
Associate II
May 26, 2022 12:14 AM UTC
Question

Hi, Is there any limitations in the application examples (APP_LOG) provided with the STM32WL regarding printing %lu or %llu? I am using STM32CUBEIDE - with "Runtime library: "Standard C" ticked off.."inttypes.h" included...

..

This topic has been closed for replies.

3 replies

Pavel A.
May 26, 2022 6:51 AM UTC

In the "newlib" runtime library provided with CubeIDE, uint32_t is defined as unsigned long (though unsigned int is actually the same thing).

So format %lu should be used to print uint32_t (and unsigned long), and %u to print unsigned int.

64-bit integers (%llu) are NOT supported by the "minimal" variant of the library.

SRavn.1
SRavn.1Author
Associate II
May 26, 2022 7:01 AM UTC

Thanks for the input @Pavel A.​ !

I am using the "Standard C" as runtime library not the "Reduced C".

Tried both %lu for 32bit and %llu / "%"PRIu64 without any success,,

Pavel A.
May 26, 2022 5:34 PM UTC

Cannot confirm... %lu works for me.