Closed hankedan000 closed 1 year ago
Really good job!
One thing left in my opinion:
Can you also move the fixed usage of TXB0 into the sendMessage
method so it's similar to the readMessage
implementation?
Thank you again!
Using the default config, we (you!) were able save 724 to 770 bytes depending on the used MCU. 🎉
MCU | Size before | Size after | Diff |
---|---|---|---|
ATmega32 | 3640 | 2916 | 724 |
ATmega328P | 3698 | 2974 | 724 |
ATmega64 | 3698 | 2974 | 724 |
ATmega644P | 3700 | 2976 | 724 |
ATmega128 | 3778 | 3020 | 758 |
ATmega1284P | 3816 | 3058 | 758 |
ATmega2560 | 3954 | 3184 | 770 |
That's perfekt!
This saving makes it possible to finally include the (optional) bitrate detection support into the main branch without needing 4k words bootloader section.
@crycode-de I was able to reduce the size of the bootloader with these commits. It saved ~600bytes of flash memory, which isn't too much, but I thought it was worth checking out. From my usage/testing, I haven't noticed any issue with these changes (so far).
Usage Before (main branch built for ATmega328P)
Usage After (size-optimization branch built for ATmega328P)
In the title of each commit message, I included how many bytes each change saved. Let me know what you think. Maybe you'll only want to take a few of the commits.