From a3f2b64a467c10307ba32ac5e7cd06f5fc27b47f Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Fri, 11 Jun 2021 19:31:12 +0100 Subject: Enable float formatting in printf Needed for g#3415, and if the comment is to be believed, this needed updating for recent MIPS targets anyway. Just blanket enable everything for all targets with >= 8 MiB of RAM. The only targets with less than this are the Sansa Clip, c200v2, and m200v4, which all have 2 MB of RAM. The added code size is around 4 KiB to 7 KiB, depending on the target. Change-Id: I5773482a13543dabb1f93f713a21f1382a9c5a22 --- firmware/common/vuprintf.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/firmware/common/vuprintf.c b/firmware/common/vuprintf.c index fb053ae7da..6a3b29388b 100644 --- a/firmware/common/vuprintf.c +++ b/firmware/common/vuprintf.c @@ -30,13 +30,10 @@ #ifndef BOOTLOADER -/* Only the Quake plugin needs float formatting */ -#if defined(HAVE_LCD_COLOR) && \ - (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE)) && \ - (PLUGIN_BUFFER_SIZE > 0x14000) && (CONFIG_PLATFORM & PLATFORM_NATIVE) && defined(CPU_ARM) -/* turn everything on */ -#define FMT_LENMOD (0xffffffff) -#define FMT_RADIX (0xffffffff) +/* Turn everything on if we have enough RAM. */ +#if MEMORYSIZE >= 8 +# define FMT_LENMOD (0xffffffff) +# define FMT_RADIX (0xffffffff) #endif #endif -- cgit v1.2.3