-
-
Notifications
You must be signed in to change notification settings - Fork 7k
ATmega4809 code size exceeded without warning/error #8978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, |
The max size specified by the IDE is exactly 48k (49152). Assuming that this board has a bootloader like other AVR-based boards, that size should probably subtract the bootloader size (like other AVR boards do as well). |
No bootloader is used with the ATmega4809. Testing sketch is below that demonstrates the problem. The actual code was run on a Microchip Curiosity Nano board since the Arduino Nano Every is not yet available. However, the problem can be seen by simply checking the end of the hex file generated. Code execution is not necessary. In this case, the following results were shown:
End of hex file:
As can be seen from the hex file, the actual code size was 49176 bytes.Sketch:File: Test.ino
File: test.h
|
Hi @dlkeng, |
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:
The actual code size is: 49165 bytes (0xC00D)
End of hex file:
If the compiled Sketch uses more than 48874 bytes (99%), code, this problem occurs.
The text was updated successfully, but these errors were encountered: