Skip to content

mega2560 bootloader doesn't support eeprom writes or erases [imported] #543

Closed
@cmaglie

Description

@cmaglie

This is Issue 543 moved from a Google Code project.
Added by 2011-05-18T17:09:42.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

What steps will reproduce the problem?

  1. avrdude -e
  2. avrdude -U eeprom:r:-:h

What is the expected output? What do you see instead?
Should be all 0xff, isn't actually erased.

  1. avrdude -U eeprom:w:blah.eep

What is the expected output? What do you see instead?
Should succeed, fails verification.

This is because the stk500v2 bootloader on the 8u2 chip on the arduino mega 2560 board has these pretty useful functions either defined out, or as a noop.

Please provide any additional information below.

At line 804, (case CMD_CHIP_ERASE_ISP:) in https://github.com/arduino/Arduino/blob/master/hardware/arduino/bootloaders/stk500v2/stk500boot.c you can see that chip erase is a NOOP. I think this should at least return something indicating that it wasn't done, not that it succeeded.

At line 858 in the same file,

if (!defined(AVR_ATmega1280) && !defined(AVR_ATmega2560) && !defined(AVR_ATmega2561))

You can see that the code for programming the EEPROM on the megas is simply defined out. if that code doesn't work on the megas, it should be replaced with code that does.

Metadata

Metadata

Assignees

Labels

Component: BootloaderThe bootloader is the program used to load the uploaded program into the microcontroller's memoryComponent: FirmwareLimited to the contents of the firmwares folder in the core packages

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions