[U-Boot] [U-Boot, 3/4, v3] lib/tiny-printf.c: Add tiny printf function for space limited environments
Tom Rini
trini at konsulko.com
Mon Nov 23 23:44:59 CET 2015
On Mon, Nov 23, 2015 at 07:00:22AM +0100, Stefan Roese wrote:
> This patch adds a small printf() version that supports all basic formats.
> Its intented to be used in U-Boot SPL versions on platforms with very
> limited internal RAM sizes.
>
> To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This
> will result in the SPL using this tiny function and the main U-Boot
> still using the full-blown printf() function.
>
> This code was copied from:
> http://www.sparetimelabs.com/printfrevisited
> With mostly only coding style related changes so that its checkpatch
> clean.
>
> The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp
> (Marvell AXP) SPL:
>
> Without this patch:
> 58963 18536 1928 79427 13643 ./spl/u-boot-spl
>
> With this patch:
> 56542 18536 1956 77034 12cea ./spl/u-boot-spl
>
> Note:
> To make it possible to compile tiny-printf.c instead of vsprintf.c when
> CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are
> moved from common/console.c into vsprintf.c in this patch.
>
> Signed-off-by: Stefan Roese <sr at denx.de>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Hans de Goede <hdegoede at redhat.com>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Albert Aribaud <albert.u.boot at aribaud.net>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151123/fb1232ea/attachment.sig>
More information about the U-Boot
mailing list