[U-Boot] [U-Boot,v2] tiny-printf: Add support for %p format

Tom Rini trini at konsulko.com
Fri Apr 14 21:10:01 UTC 2017


On Mon, Apr 10, 2017 at 12:23:22PM +0530, Vignesh R wrote:

> Add support for %p, %pa[p], %pM, %pm and %pI4 formats to tiny-printf.
> %pM and %pI4 are widely used by SPL networking stack and is required if
> networking support is desired in SPL.
> %p, %pa and %pap are mostly used by debug prints and hence supported
> only when DEBUG is enabled.
> 
> Before this patch:
> $ size spl/u-boot-spl
>    text	   data	    bss	    dec	    hex	filename
>   99325	   4899	 218584	 322808	  4ecf8	spl/u-boot-spl
> 
> After this patch (with CONFIG_SPL_NET_SUPPORT):
> $ size spl/u-boot-spl
>    text	   data	    bss	    dec	    hex	filename
>   99666	   4899	 218584	 323149	  4ee4d	spl/u-boot-spl
> 
> So, this patch adds ~350 bytes to code size.
> 
> If CONFIG_SPL_NET_SUPPORT is not enabled, this adds ~25 bytes.
> 
> If CONFIG_USE_TINY_PRINTF is disabled then:
> $ size spl/u-boot-spl
>   text	   data	    bss	    dec	    hex	filename
>  101116	   4899	 218584	 324599	  4f3f7	spl/u-boot-spl
> 
> So, there is still ~1.4K space saved even with support for %pM/%pI4.
> 
> Compiler used is to build is:
> arm-linux-gnueabihf-gcc (Linaro GCC 6.2-2016.11) 6.2.1 20161016
> 
> Signed-off-by: Vignesh R <vigneshr at ti.com>
> Reviewed-by: Tom Rini <trini at konsulko.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170414/835c976e/attachment.sig>


More information about the U-Boot mailing list