-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Wrong flash space for Arduino MEGA in boards.txt #2277
Comments
What you say seems to make sense. I haven't verified against the datasheet yet, but perhaps you'd care to prepare a pullrequest to fix this? Best fix it in the ide-1.5.x branch, btw. |
@matthijskooijman I have submitted the said pull request. Would please take a look at it |
Fixed with #2313 for Mega 2560 and ADK. For the Mega 1280 I see:
i.e. it reserves 2048w = 4096b, so the existing value 126976 == (128-4)*1024 is correct. |
set correct max size for mega2560 (to address issue #2277)
It seems that there's an issue in the memory reserved for the bootloader on the Arduino MEGA2560 boards.
This is an extract of the Arduino MEGA2560 entry in the boards.txt:
mega2560.upload.protocol=wiring
mega2560.upload.maximum_size=258048
mega2560.upload.speed=115200
mega2560.bootloader.low_fuses=0xFF
mega2560.bootloader.high_fuses=0xD8
As you can notice, the entry tells the IDE that it can use up to 252K of Flash (258,048 bytes) for the user's sketches, so you lead to think that the bootloader space is only 4K wide:
256K => 262,144b
262,144 - 258,048 => 4,096b
But you can also notice that the high fuse, that sets the size of the bootloader area, reserves 4,096w (words), that are 8,192b (bytes). Its value is $D8. The page for the Arduino MEGA2560 says: "Flash Memory 256 KB of which 8 KB used by bootloader". So the size set by the fuse is correct but the maximum_size isn't.
Same for Arduino MEGA1280.
The text was updated successfully, but these errors were encountered: