MCUdude / MightyCore

Arduino hardware package for ATmega1284, ATmega644, ATmega324, ATmega324PB, ATmega164, ATmega32, ATmega16 and ATmega8535
Other
637 stars 181 forks source link

Question: Enable floating points in platform.txt #266

Closed PHXChris closed 1 year ago

PHXChris commented 1 year ago

I have tried the various suggestions on the Internet for enabling floats in sprintf on the AVR in platform.txt but they do not seem to enable on Mightycore.

Am I missing something or is it missing the support in the Mightycore files?

PHXChris commented 1 year ago

Actual place they have to be placed in platform.txt is different than most recommendations - correct location is:

compiler.c.elf.flags=-Wl,-u,vfprintf -lprintf_flt -lm {compiler.warning_flags} -Os -Wl,--gc-sections,--section-start=.FAR_MEM1=0x10000