Skip to main content
9 events
when toggle format what by license comment
Jun 9, 2020 at 7:26 vote accept VerySeriousSoftwareEndeavours
Jun 8, 2020 at 15:07 comment added Juraj the printf float support with -Wl,-u,vfprintf -lprintf_flt is somehow unconditional. it makes even Blink large
Jun 8, 2020 at 14:18 comment added Majenko @EdgarBonet That is a surprise it has to be said.
Jun 8, 2020 at 14:02 comment added Edgar Bonet I compiled both versions for the Uno with float support and, to my surprise, Juraj's is smaller (text: 4814, data: 68, bss: 166) than yours (text: 6226, data: 62, bss: 166).
Jun 8, 2020 at 12:02 comment added Majenko @Juraj Maybe on the Arduino, but then the Arduno printf lacks float support, which is included in the code here. If you take out the float support you will most likely find this code considerably smaller. Float support is massive.
Jun 8, 2020 at 12:00 comment added Juraj sorry. no. printf produces a little smaller code. I use my StreamLib for printf wrapper for Serial github.com/jandrassy/StreamLib/blob/…
Jun 8, 2020 at 11:49 comment added Majenko @Juraj A lot. Take a look at the link in my comment above for a "light weight" printf formatter and you'll see how much is involved in it.
Jun 8, 2020 at 11:48 comment added Juraj how much flash space does this save compared to printf? in my test none.
Jun 8, 2020 at 10:29 history answered Majenko CC BY-SA 4.0