avr-hal icon indicating copy to clipboard operation
avr-hal copied to clipboard

Add support for programming AVR EEPROM memory if .eeprom section foun…

Open cr1901 opened this issue 2 years ago • 2 comments

…d in ELF file.

Tested locally and working. This is meant to complement a set of crates I'm working on...

cr1901 avatar Mar 30 '23 06:03 cr1901

What's your take on this?

Sure, I can add a flag to disable EEPROM flashing.

I think most Rust cases using the .eeprom section would want the EEPROM to be reflashed if e.g. cargo triggered a rebuild of the crate(s) providing an .eeprom section. But I can envision use cases where a Rust firmware is provided an .eeprom section as part of an C or asm object file/library, and you don't necessarily want to reflash the EEPROM every time.

cr1901 avatar Mar 31 '23 19:03 cr1901

Please do not merge yet, I believe this patch is incorrect/imprecise (It's not .eeprom section name that's special. Rather, I think avrdude is checking the ELF's program headers for data for references to the EEPROM address space).

I'll work on fixing it in the coming days.

cr1901 avatar Apr 02 '23 02:04 cr1901