Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

printf String formatting broken

Hi!

I am currently developing an application for nrf52832 and am using the uart module with retarget.c for output over uart via printf().

Now a few days ago I added FDS flash storage support and all of a sudden the String formatting using additional parameters for variables (apart from type) stopped working.

For example if I previously invoked

printf("%04X", 1);

I got "0001" as output but doing so now will result in "4X".

Similarly,

printf("%2.5f", 1.0);

will now lead to ".5f".

When deleting all of the additional parameters and only keep the type (%X, %f) everything works as expected.

Any help is much appreciated,

Julian

Parents Reply Children
No Data
Related