1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00
Files
u-boot-megous/common
Stefan Roese 7d9cde1031 lib/tiny-printf.c: Add tiny printf function for space limited environments
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@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
2015-11-23 10:56:07 -05:00
..
2015-11-19 20:27:50 -07:00
2015-11-19 20:27:50 -07:00
2015-06-10 19:26:54 -06:00
2015-07-20 07:21:47 -06:00
2015-01-30 09:19:17 -05:00
2015-01-30 09:19:16 -05:00
2014-10-26 14:03:08 -04:00
2014-12-29 16:31:24 -05:00
2014-06-20 11:54:29 -06:00
2015-05-14 19:58:34 -06:00
2015-07-27 15:53:48 -07:00
2015-11-05 16:47:06 -05:00
2015-10-26 09:22:36 +01:00
2015-05-21 09:13:19 -04:00
2015-11-12 13:18:59 -05:00
2015-01-05 12:08:51 -05:00
2015-10-19 17:06:16 -04:00
2015-11-19 20:27:50 -07:00
2014-09-16 12:23:56 -04:00
2015-11-12 13:18:59 -05:00