feat(esp8266): Add feature to copy old RF parameters to new SDK partition

The old SDK's RF parameters is also kept.
This commit is contained in:
dongheng
2019-04-03 14:11:11 +08:00
parent 2b579ef758
commit 37ffcbe9e6
7 changed files with 169 additions and 36 deletions

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 $@)
@@ -120,7 +120,7 @@ endif
PYTHON ?= $(call dequote,$(CONFIG_PYTHON))
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