summaryrefslogtreecommitdiff
path: root/firmware/common
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-06-11 19:31:12 +0100
committerAidan MacDonald <amachronic@protonmail.com>2021-06-16 19:49:55 +0000
commita3f2b64a467c10307ba32ac5e7cd06f5fc27b47f (patch)
tree5e04591a09dcfeabeba00f32a8ddefced1b79459 /firmware/common
parentf6c7407cc3304f569ff58d4719e431a9f65e3840 (diff)
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
Diffstat (limited to 'firmware/common')
-rw-r--r--firmware/common/vuprintf.c11
1 files 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