From 783c5f02079c7a96b0cde6b312d87bff4ced37f0 Mon Sep 17 00:00:00 2001 From: Spence Konde Date: Wed, 16 Aug 2023 16:47:02 -0400 Subject: [PATCH] Update Ref_Printf.md --- megaavr/extras/Ref_Printf.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/megaavr/extras/Ref_Printf.md b/megaavr/extras/Ref_Printf.md index 34da8939..986939fe 100644 --- a/megaavr/extras/Ref_Printf.md +++ b/megaavr/extras/Ref_Printf.md @@ -41,11 +41,9 @@ Notice that there is no line for 64 bit types in the table above; these are not There are reports of memory corruption with printf suspect it is misunderstandign of above that is actually at hand here. ### General notes about DxC/mTC and printf()'y things. -* No matter how you come to printing with a format string, it's gonna end up pulling in all the same bloat. Most of the `[1-2 letters]printf()` functions are little more than wrappers around various ways of supplying input to using the output from master algorithm. -Note that using this method will pull in just as much bloat as `sprintf()` and is subject to the same limitations as printf - by default, floating point values aren't printed. You can use this with all serial ports -You can choose to have a full `printf()` implementation from a Tools submenu if you want to print floating point numbers, at a cost of some additional flash. --lprintf_min +No matter how you come to printing with a format string, it's gonna end up pulling in all the same bloat. Most of the `[1-2 letters]printf()` functions are little more than wrappers around various ways of supplying input to using the output from master algorithm. +You can choose to have a full `printf()` implementation from a Tools submenu if you want to print floating point numbers, at a cost of some additional flash. #### Selectable `printf()` Implementation A Tools submenu lets you choose from three levels of `printf()`: full `printf()` with all features, the default one that drops float support to save 1k of flash, and the minimal one drops almost everything and for another 450 bytes flash saving (will be a big deal on the 16k and 8k parts. Less so on 128k ones). Note that selecting any non-default option here *will cause it to be included in the binary even if it's never called* - and if it's never called, it normally wouldn't be included. So an empty sketch will take more space with minimal `printf()` selected than with the default, while a sketch that uses `printf()` will take less space with minimal `printf()` vs default.