Remove the workaround that erase flash before calling nvs_flash_init

This commit is contained in:
liuzhifu 2016-08-24 15:32:36 +08:00 committed by Wu Jian Gang
parent 2ca1b738d3
commit ad188c3854

View file

@ -206,15 +206,7 @@ void user_start_cpu0(void) {
ets_setup_syscalls(); ets_setup_syscalls();
do_global_ctors(); do_global_ctors();
// TODO: consider ethernet interface
#if CONFIG_WIFI_ENABLED #if CONFIG_WIFI_ENABLED
#if 1 //workaround
for (uint8_t i = 5; i < 8; i++) {
ets_printf("erase sector %d\n", i);
spi_flash_erase_sector(i);
}
#endif
ets_printf("nvs_flash_init\n"); ets_printf("nvs_flash_init\n");
esp_err_t ret = nvs_flash_init(5, 3); esp_err_t ret = nvs_flash_init(5, 3);
if (ret != ESP_OK) { if (ret != ESP_OK) {
@ -225,6 +217,7 @@ void user_start_cpu0(void) {
esp_event_init(NULL); esp_event_init(NULL);
// TODO: consider ethernet interface
tcpip_adapter_init(); tcpip_adapter_init();
#endif #endif