token-vesting icon indicating copy to clipboard operation
token-vesting copied to clipboard

Minimal printf() takes up more space than default printf()

Open CoryParsnipson opened this issue 1 year ago • 0 comments

  • Using Arduino IDE 1.18.13, as recommended.
  • MegaTinyCore version 2.6.10.
  • Compiling to ATTiny402. (Also tried on ATTiny202, so this looks to happen independent of target chip.)

You can select the implementation of printf() in the board options of megaTinyCore underneath the "Tools" menu. It appears that if I select "Minimal" for printf, it actually takes up more program space than the "Default" for printf. Judging from the descriptions on both options, it sounds like the opposite is intended.

printf

When compiling a certain program with "Default" printf():

Sketch uses 1906 bytes (46%) of program storage space. Maximum is 4096 bytes.

When compiling the same program with "Minimal" printf():

Sketch uses 2878 bytes (70%) of program storage space. Maximum is 4096 bytes.

Thank you!

CoryParsnipson avatar Feb 15 '24 07:02 CoryParsnipson