I am programming ATMega1284p with Atmel Studio 7 on Windows 10.
Several times now I have had a long debugging session only to discover that the program flash section has either overflowed the available flash or into the bootloader area or the eeprom overflowed.
It took a long time to find because it never occured to me to check the post-build step output showing the flash and eeprom sizes.
I am aware of "avr-size" but, as far as I can tell, it only displays the information. I have so far not found a utility that will check the sizes against a specified parameter that, for example, causes an error if the flash size is over X bytes. Specifically NOT the device flash size since space needs to be reserved for different size bootloaders.
Is there such a utility or method in Atmel Studio or WinAVR to detect this issue?
Thanks in advance ...