esp-idf/components/esp32
Ivan Grokhotkov ecee175962 Merge branch 'bugfix/nvs_init_check_empty_pages' into 'master'
Error handling in NVS initialization

Previously nvs_flash_init worked under an assumption that there should always be at least one free page available. This is true during normal operation, but in some cases (such as when changing application partition table from a non-OTA to an OTA one), NVS partition may get truncated, which will cause empty pages to be lost.

This MR adds error checks for this condition, and updates code which calls `nvs_flash_init` to check for the return code.
For most examples, a simple `ESP_ERROR_CHECK` is added around `nvs_flash_init`. For NVS examples and the OTA example, more robust error handling is added.

This change also removes nvs_flash_init calls from examples which don't use NVS.

See merge request !582
2017-03-23 17:57:15 +08:00
..
hwcrypto mbedTLS SHA: Fix cloning of SHA-384 digests 2016-11-25 19:26:30 +11:00
include Feature: add ledc low speed channels 2017-03-17 17:26:30 +08:00
ld linker scripts: Add explicit symbols for _iram_start and _flash_cache_start 2017-03-21 16:45:13 +08:00
lib@c88869b1ac esp32: update wifi lib for some bugfix/features 2017-03-14 10:14:26 +08:00
test esp32,ulp: add tests for TSENS 2017-02-22 14:40:36 +08:00
brownout.c Add licenses, docbook, general cleanup 2016-10-25 18:18:11 +08:00
component.mk disable PHY and RF when stop WiFi and disable BT 2017-02-17 10:24:54 +08:00
core_dump.c esp32: Fixes watchdog problem when printing core dump to uart 2017-02-01 18:39:28 +03:00
cpu_freq.c phyinit: Use PHY config to enable, don't need phy_get_romfunc_addr to init 2017-01-19 11:18:44 +11:00
cpu_start.c tight 28k 2017-03-08 19:04:28 +08:00
cpu_util.c Add sdkconfig include to cpu_util.h so CONFIG_ESP32_DEBUG_OCDAWARE actually resolves 2017-01-07 18:44:20 +08:00
crosscore_int.c FreeRTOS: esp_crosscore_int_send_yield() should be in IRAM 2017-01-26 18:53:02 +11:00
deep_sleep.c ulp: make sure I_WAKE instruction works with ULP timer disabled 2017-02-22 17:10:52 +08:00
event_default_handlers.c wifi event_default_handlers/tcpip_adapter: Support disabling WiFi, keeping Ethernet 2017-02-24 14:46:23 +11:00
event_loop.c components/esp32: fix renaming of esp_event_set_cb, minor clean up 2016-09-26 12:35:09 +08:00
freertos_hooks.c Add comments/headers according to merge request comments 2016-11-15 12:10:02 +08:00
gdbstub.c Fix small bug in gdbstub where it sometimes would not return a valid stop reason, timing out gdb. Also clean up the code a bit. 2016-12-02 17:42:11 +08:00
heap_alloc_caps.c MR things 2017-03-09 19:59:09 +08:00
hw_random.c esp_random: XOR the RNG register value several times before returning it 2017-01-04 17:07:12 +11:00
int_wdt.c driver: timer 2016-11-23 17:23:21 +08:00
intr_alloc.c esp32: Fixes watchdog problem when printing core dump to uart 2017-02-01 18:39:28 +03:00
ipc.c components/esp32: add inter-processor call API and implement spi_flash through it 2016-09-12 18:54:45 +08:00
Kconfig esp32: menuconfig adds some WiFi options 2017-03-02 18:13:49 +08:00
lib_printf.c uart_tx_wait_idle: fix issue with last character not transmitted 2016-12-08 01:42:37 +08:00
libhal.a Initial public version 2016-08-17 23:08:22 +08:00
Makefile.projbuild phy init data: Read PHY init data partition offset from menuconfig 2016-11-18 20:11:16 +08:00
panic.c esp_err: Use separate code path for ESP_ERROR_CHECK assertion 2017-03-03 15:33:23 +11:00
phy_init_data.h phy init data update 2016-12-19 14:23:39 +08:00
phy_init.c phy_init: move NVS init into relevant function, check errors 2017-03-14 22:03:39 +08:00
phy.h phyinit: Use PHY config to enable, don't need phy_get_romfunc_addr to init 2017-01-19 11:18:44 +11:00
rtc.h update phy and rtc lib 2017-02-27 19:54:22 +08:00
spiram.h Initial public version 2016-08-17 23:08:22 +08:00
system_api.c Merge branch 'feature/add_user_set_mac' into 'master' 2017-03-02 17:34:14 +08:00
task_wdt.c Add interrupt allocation scheme / interrupt sharing. Also modifies drivers and examples. Also allows interrupts 2016-12-08 12:39:33 +08:00