
Dear Jerry Van Baren,
In message 49E32C3C.8090404@ge.com you wrote:
Since flash can change 1s to 0s, but cannot change them back, you could redefine the env storage to be <next><crc><env><NUL>[undefined] (note the added <next> at the start). By definition, the valid env's <next> == 0xFFFFFFFF. To write a new env, simply write the offset of [undefined] into the <next> location and then write a new env lump.
I see problems with this:
- it's incompatible with the current format, i. e. detection of existing old formats needs a special case which is something I always consider ugly.
- it works only on NOR flash, not on any media that can be accessed only in blocks
- handling of redundant environment becomes a lot more complicated
BTW: what was the exact problem we were trying to solve? Saving the time it takes to erase one flash sector?
If we have to pay for this with introducing a new, incomptible environment format, and probably having to handle NOR flash and other storage media differently, I doubt if this is worth the effort.
Best regards,
Wolfgang Denk