I noticed that the size of our code just seems to be ever expanding. I was trying out someones test example that used sprintf and floats and its resulting compiled size was ~36k for a bluepill. This seems excessive. I did some more digging around and came across this post.
Basically the author suggests using '-specs=nosys.specs -specs=nano.specs -u _printf_float' specifically in that order. The intent was to use most of the nano.specs library but revert back to the normal printf floating point behavior. I gave it a try by modifying my board setting:
I went from ~36k to ~25k .. and floating point was still working with sprintf.$ git diff
diff --git a/STM32F1/boards.txt b/STM32F1/boards.txt
index 49c1293..029aecf 100644
@@ -410,7 +410,8 @@ genericSTM32F103C.menu.cpu_speed.speed_128mhz.build.f_cpu=128000000L
+genericSTM32F103C.menu.opt.osstd.build.flags.ldspecs=-specs=nosys.specs -specs=nano.specs -u _printf_float
genericSTM32F103C.menu.opt.oslto=Smallest Code with LTO
This might be something to try if you are annoyed by the ever expanding flash waistline.