bloombloombloom / Bloom

A debug interface for AVR-based embedded systems development on GNU/Linux.
https://bloom.oscillate.io/
Other
64 stars 3 forks source link

Refactor `preserveEeprom` implementation to make use of the EESAVE fuse bit #81

Closed navnavnav closed 1 year ago

navnavnav commented 1 year ago

Currently, when the preserveEeprom target config param is set to true, Bloom takes a backup of the target's EEPROM, just before chip erase. Then it restores the backup upon completion of the erase.

This can be quite slow on some targets/debug tools.

I want to replace this implementation with a quicker one, where we just ensure that the EESAVE fuse bit is set to the appropriate value, to ensure that we don't erase EEPROM during a chip erase cycle.

We should always restore the EESAVE fuse bit at the end of the programming session. And if it was already set to the desired value, we should do nothing with it.

More to follow.

navnavnav commented 1 year ago

Development work for this is complete.

When the user sets preserveEeprom to true, Bloom will ensure that the EESAVE fuse bit is programmed at the beginning of a programming session. And it will restore the fuse bit to its original value at the end of the programming session.

Changes have been merged into develop. Will be released with v1.0.0.

Closing this now.