[PATCH] tiny-printf: Add support for upper case hex values

Tom Rini trini at konsulko.com
Thu Mar 20 14:53:04 CET 2025


On Thu, Mar 20, 2025 at 12:49:17PM +0100, Marek Vasut wrote:
> On 3/20/25 11:23 AM, Christoph Niedermaier wrote:
> > If tiny printf is used with 0x%08X (upper case X) the output is
> > always 0x00000000. It could be confusing if upper case instead
> > of lower case is used intentionally or accidentally because the
> > actual value is not output. To avoid this confusion, tiny printf
> > is extended to support also the formatting with %X.
> > 
> > Signed-off-by: Christoph Niedermaier <cniedermaier at dh-electronics.com>
> TINY_PRINTF is meant to be tiny, i.e. not consume a lot of space, at the
> expense of functionality. This is meant to be used in size constrained
> environments, like the SPL. If you need full vsprintf() formatting support,
> disable TINY_PRINTF in your config and use the regular vsprintf()
> implementation.

Right. I could accept a patch to tiny-printf that treats %X like %x (so
that the value shown is correct) as that would be a minimal size change.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250320/8c82f5ce/attachment.sig>


More information about the U-Boot mailing list