From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 20 Nov 2015 22:27:31 -0500 Subject: [U-Boot] [PATCH 3/4 v2] lib/tiny-printf.c: Add tiny printf function for space limited environments In-Reply-To: <1447683994-25930-3-git-send-email-sr@denx.de> References: <1447683994-25930-1-git-send-email-sr@denx.de> <1447683994-25930-3-git-send-email-sr@denx.de> Message-ID: <20151121032731.GR9551@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Nov 16, 2015 at 03:26:33PM +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 > Cc: Simon Glass > Cc: Hans de Goede > Cc: Tom Rini > Cc: Albert Aribaud This doesn't quite apply now, somehow and my attempt at making it apply was either somehow wrong, or there's other problems with the series: +(PMC440,lschlv2,zynq_zc702,zynq_zed,zynq_zc706,lsxhl,zynq_picozed,zynq_zybo) examples/a pi/vsprintf.o: In function `printf': +(PMC440,lschlv2,zynq_zc702,zynq_zed,zynq_zc706,lsxhl,zynq_picozed,zynq_zybo) build/../l ib/vsprintf.c:865: multiple definition of `printf' +(PMC440,lschlv2,zynq_zc702,zynq_zed,zynq_zc706,lsxhl,zynq_picozed,zynq_zybo) examples/a pi/libgenwrap.o:build/../examples/api/libgenwrap.c:23: first defined here And smartweb has a longer and different failure. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: