Merge branch 'feature/load_old_phy_parameter' into 'release/v3.1'

Add feature to copy old RF parameters to new SDK partition

See merge request sdk/ESP8266_RTOS_SDK!874
This commit is contained in:
Dong Heng
2019-04-18 09:47:03 +08:00
7 changed files with 167 additions and 34 deletions

View File

@ -226,6 +226,19 @@ config ESP8266_OTA_FROM_OLD
The old RTOS SDK(before V3.0) or NonOS SDK can download the firmware to its partition and run it as it self's application.
config LOAD_OLD_RF_PARAMETER
bool "(**Expected**)Load old RF Parameters"
default n
depends on ESP8266_OTA_FROM_OLD
select ESP_PHY_INIT_DATA_IN_PARTITION
help
The function is not released.
Enable this option, after updating from old SDK to new SDK, bootloader will copy RF
parameters from old SDK partition to new SDK partition.
Then application can read the RF parameters from new partition directly.
config ESP8266_BOOT_COPY_APP
bool "(**Expected**)Boot copy app"
default n

View File

@ -40,9 +40,9 @@ ESPTOOL_ALL_FLASH_ARGS += $(PHY_DATA_OFFSET) $(PHY_INIT_DATA_BIN)
ESP8266_COMPONENT_PATH := $(COMPONENT_PATH)
$(PHY_INIT_DATA_OBJ): $(ESP8266_COMPONENT_PATH)/source/phy_init_data.h $(BUILD_DIR_BASE)/include/sdkconfig.h
$(PHY_INIT_DATA_OBJ): $(ESP8266_COMPONENT_PATH)/include/internal/phy_init_data.h $(BUILD_DIR_BASE)/include/sdkconfig.h
$(summary) CC $(notdir $@)
printf "#include \"source/phy_init_data.h\"\n" | $(CC) -I $(BUILD_DIR_BASE)/include -I $(ESP8266_COMPONENT_PATH) -I $(ESP8266_COMPONENT_PATH)/include -c -o $@ -xc -
printf "#include \"internal/phy_init_data.h\"\n" | $(CC) -I $(BUILD_DIR_BASE)/include -I $(ESP8266_COMPONENT_PATH) -I $(ESP8266_COMPONENT_PATH)/include -c -o $@ -xc -
$(PHY_INIT_DATA_BIN): $(PHY_INIT_DATA_OBJ)
$(summary) BIN $(notdir $@)
@ -118,7 +118,7 @@ endif
@echo [GEN] $(OTA_BIN)
ifdef CONFIG_ESP8266_OTA_FROM_OLD
$(OTA_V2_TO_V3_BIN): all_binaries
$(OTA_V2_TO_V3_BIN): all
@python $(IDF_PATH)/tools/pack_fw.py --output $(OTA_V2_TO_V3_BIN) --app $(PROJECT_NAME).bin pack3 $(ESPTOOL_ALL_FLASH_ARGS)
@echo [GEN] $(OTA_V2_TO_V3_BIN)
endif

View File

@ -27,7 +27,7 @@
#include "nvs_flash.h"
#include "sdkconfig.h"
#include "phy_init_data.h"
#include "internal/phy_init_data.h"
#include "phy.h"
static const char *TAG = "phy_init";