Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically erase or repair NVS partition if corrupt #134

Open
kasperl opened this issue Feb 17, 2022 · 1 comment
Open

Automatically erase or repair NVS partition if corrupt #134

kasperl opened this issue Feb 17, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@kasperl
Copy link
Member

kasperl commented Feb 17, 2022

Jaguar doesn't behave very well if the NVS partition becomes corrupt. We've seen it fail in the flash_kv_init primitive, so maybe we can catch that error and clear the NVS partition? Maybe that is too much, but let's consider it.


My guess would be that somehow the NVS partition has become corrupt. Maybe Jaguar needs to handle that and erase the partition? Or maybe it should report it in a nicer way so it is possible for the user to erase the flash manually.

Originally posted by @kasperl in toitlang/toit#458 (comment)

@floitsch
Copy link
Member

floitsch commented Feb 18, 2022

In the meantime here are work-arounds to get into a good state again:

According to https://esp32.com/viewtopic.php?t=15530 calling idp.py -p PORT_NUMBER erase_flash should erase the NVS Flash.

Alternatively one could write the following Arduino program and run it:

#include <nvs_flash.h>

void setup() {
  nvs_flash_erase();
}

void loop() {
  delay(3000);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants