feat(esp8266): add phy APIs

1. support save cal data in nvs;
2. support use phy partition to store init data;

In old SDK, we use (max_sec - 3) as init data sector, and (max_sec - 4) as cal data sector. This is changed in IDF style SDK, and these 2 sectors can be used for other perpose.
This commit is contained in:
Wu Jian Gang
2018-06-29 20:51:12 +08:00
parent 4a372f8e4d
commit a411ce44c9
6 changed files with 543 additions and 23 deletions

View File

@ -1,4 +1,4 @@
#ifdef CONFIG_ESP8266_LEGACY
ifdef CONFIG_ESP8266_LEGACY
BOOTLOADER_FIRMWARE_DIR := $(abspath $(COMPONENT_PATH))/firmware
@ -24,7 +24,7 @@ ESP_INIT_DATA_DEFAULT_BIN := $(BOOTLOADER_FIRMWARE_DIR)/esp_init_data_default.bi
ESPTOOL_ALL_FLASH_ARGS += $(ESP_INIT_DATA_DEFAULT_BIN_OFFSET) $(ESP_INIT_DATA_DEFAULT_BIN)
#else
else
ifdef CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION
@ -59,7 +59,7 @@ flash: phy_init_data
endif # CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION
#endif
endif
# global CFLAGS for ESP8266
CFLAGS += -DMEMLEAK_DEBUG -DICACHE_FLASH