Closed tlyu closed 2 years ago
There's some clever stuff in here. I'd like to test on actual hardware before I merge, but generally it all looks good
Quick size comparison:
Before
avr-size --format=avr --mcu=attiny88 twi_slave.elf
AVR Memory Usage
----------------
Device: attiny88
Program: 1040 bytes (12.7% Full)
(.text + .data + .bootloader)
Data: 67 bytes (13.1% Full)
(.data + .bss + .noinit)
After
AVR Memory Usage
----------------
Device: attiny88
Program: 904 bytes (11.0% Full)
(.text + .data + .bootloader)
Data: 66 bytes (12.9% Full)
(.data + .bss + .noinit)
I had to tweak the start address for the "before" to get it to link, because it was just barely too big.
There's some clever stuff in here. I'd like to test on actual hardware before I merge, but generally it all looks good
Thanks! Note if you test on actual Model 01 hardware, you might find the unconditional 8-second watchdog timer annoying. (I reduced it to 60ms for my testing, and unifying the bootloader trigger conditions across models might help as well.)
Help the optimizer in modern GCC a little more, so the bootloader can fit in 1k on the Model 01 again.