Open WestfW opened 3 years ago
Huh. optiboot_x SHRINKS by two bytes. Which is especially odd since it looks like the part of code that grows is NOT the actual flash writing (which is substantially different.)
Not particularly useful, but...
avr-gcc 5.4:
00007fc0 00000020 t do_spm
00007fb2 0000000e t getNch
00007f7e 00000018 T getch
00007e04 0000016c T main
00007ffe 00000002 R optiboot_version
00007e00 00000004 T pre_main
00007f70 0000000e T putch
00007fa2 00000010 T verifySpace
00007f96 0000000c T watchdogConfig
avr-gcc 7.3.0:
00007fce 00000020 t do_spm
00007fc0 0000000e t getNch
00007f8c 00000018 T getch
00007e04 0000017a T main
00007ffe 00000002 R optiboot_version
00007e00 00000004 T pre_main
00007f7e 0000000e T putch
00007fb0 00000010 T verifySpace
00007fa4 0000000c T watchdogConfig
I ran "make atmega328p" with GCC 11.1.0 and it shrunk 2 bytes compared to your 7.3.0 GCC 12 will have the mode_cc changes to the AVR target, which is already in master
Please refer to here as well.
avr-gcc 7.3.0 is always worse than avr-gcc 5.4.0 when compiling optiboot.
Compiled with the version of avr-gcc (7.3.0) distributed with recent Arduino IDEs (1.8.13), optiboot grows 14 bytes. The normal versions still fit in 512 bytes, but attempts to build a non-blinking, EEPROM-support version (documented as possible) fail...
The area of code growth is not obvious :-(
See https://github.com/Optiboot/optiboot/issues/300