cancel
Showing results for 
Search instead for 
Did you mean: 

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

SRavn.1
Associate II
 
3 REPLIES 3
Pavel A.
Evangelist III

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
Associate II

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,,

Cannot confirm... %lu works for me.