Skip to content

Wrong flash space for Arduino MEGA in boards.txt #2277

Closed
@leomil72

Description

@leomil72

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions