Closed
Description
When compiling an Arduino sketch that is slightly larger than the Flash memory size of the ATmega4809, code is generated (in the hex file) past the end of Flash memory without any errors or warnings.
It appears that the "avr-size" tool is incorrectly determining the size of the program storage space.
Arduino Environment
Arduino 1.8.8 on a Windows XP machine
Board: "Arduino Nano Every"
Registers emulation: "None (ATMEGA4809)"
Example Output:
"....\\Local Settings\\Application Data\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino5/bin/avr-size" -A "....\\LOCALS~1\\Temp\\arduino_build_140636/Test.ino.elf"
Sketch uses 48880 bytes (99%) of program storage space. Maximum is 49152 bytes.
Global variables use 290 bytes (4%) of dynamic memory, leaving 5854 bytes for local variables. Maximum is 6144 bytes.
The actual code size is: 49165 bytes (0xC00D)
End of hex file:
:10BFFA0080000013001400280024F400C0D40100BB
:04C00A00FF01010031
:00000001FF
If the compiled Sketch uses more than 48874 bytes (99%), code, this problem occurs.