
Dear James,
In message fcff97bb-d146-fc77-28e4-050cac0922f4@gmail.com you wrote:
I know my non-volatile copy of the environment is in NOR flash so I use the command
protect all off;erase <saved env address> +1
But, of course this is specific to NOR flash.
I'm not aware of a way to do this in the general case, independent of NV environment storage media and redundancy.
The idea applies to all kinds of persistent storage: just overwrite a few (4 or more) bytes at the beginning of each copy of the persistent envrionment.
In your case, you could save the "erase" by overwriting the first 4 bytes (where the CRC32 checksum is stored) with 0xFFFFFFFF.
I'd be supportive of having a way to do this.
No, I don't think we want to support this. The persistent copy of the environment is a precious resource, and I cannot think of a regular use case to invalidate this. If you do, the result is that you will use the default settings at next boot - and the samve effect can be acchieved by using "env reset" + "env save" as already recommended. [The only difference is that you will not see the "invalid CRC, using the default env" warning then, but I consider this a pro, not a con.]
Best regards,
Wolfgang Denk