bugfix: fix make compile phy multiple bin error

This commit is contained in:
ronghulin 2020-04-08 20:16:08 +08:00
parent d85d3d969f
commit f5f2cbcb50

View file

@ -1,14 +1,13 @@
ifdef CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION ifdef CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION
ESP_WIFI_COMPONENT_PATH := $(COMPONENT_PATH)
ifdef CONFIG_ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA_BIN
PHY_INIT_DATA_BIN = $(ESP_WIFI_COMPONENT_PATH)/phy_multiple_init_data.bin
else
PHY_INIT_DATA_OBJ = $(BUILD_DIR_BASE)/phy_init_data.o PHY_INIT_DATA_OBJ = $(BUILD_DIR_BASE)/phy_init_data.o
PHY_INIT_DATA_BIN = $(BUILD_DIR_BASE)/phy_init_data.bin PHY_INIT_DATA_BIN = $(BUILD_DIR_BASE)/phy_init_data.bin
# Command to flash PHY init data partition
PHY_INIT_DATA_FLASH_CMD = $(ESPTOOLPY_SERIAL) write_flash $(PHY_DATA_OFFSET) $(PHY_INIT_DATA_BIN)
ESPTOOL_ALL_FLASH_ARGS += $(PHY_DATA_OFFSET) $(PHY_INIT_DATA_BIN)
ESP_WIFI_COMPONENT_PATH := $(COMPONENT_PATH)
$(PHY_INIT_DATA_OBJ): $(ESP_WIFI_COMPONENT_PATH)/$(IDF_TARGET)/include/phy_init_data.h $(BUILD_DIR_BASE)/include/sdkconfig.h $(PHY_INIT_DATA_OBJ): $(ESP_WIFI_COMPONENT_PATH)/$(IDF_TARGET)/include/phy_init_data.h $(BUILD_DIR_BASE)/include/sdkconfig.h
$(summary) CC $(notdir $@) $(summary) CC $(notdir $@)
printf "#include \"phy_init_data.h\"\n" | $(CC) -I $(BUILD_DIR_BASE)/include -I $(ESP_WIFI_COMPONENT_PATH)/../esp_common/include -I $(ESP_WIFI_COMPONENT_PATH)/include -I $(ESP_WIFI_COMPONENT_PATH)/$(IDF_TARGET)/include -c -o $@ -xc - printf "#include \"phy_init_data.h\"\n" | $(CC) -I $(BUILD_DIR_BASE)/include -I $(ESP_WIFI_COMPONENT_PATH)/../esp_common/include -I $(ESP_WIFI_COMPONENT_PATH)/include -I $(ESP_WIFI_COMPONENT_PATH)/$(IDF_TARGET)/include -c -o $@ -xc -
@ -16,16 +15,25 @@ $(PHY_INIT_DATA_OBJ): $(ESP_WIFI_COMPONENT_PATH)/$(IDF_TARGET)/include/phy_init_
$(PHY_INIT_DATA_BIN): $(PHY_INIT_DATA_OBJ) $(PHY_INIT_DATA_BIN): $(PHY_INIT_DATA_OBJ)
$(summary) BIN $(notdir $@) $(summary) BIN $(notdir $@)
$(OBJCOPY) -O binary $< $@ $(OBJCOPY) -O binary $< $@
endif
# Command to flash PHY init data partition
PHY_INIT_DATA_FLASH_CMD = $(ESPTOOLPY_SERIAL) write_flash $(PHY_DATA_OFFSET) $(PHY_INIT_DATA_BIN)
ESPTOOL_ALL_FLASH_ARGS += $(PHY_DATA_OFFSET) $(PHY_INIT_DATA_BIN)
phy_init_data: $(PHY_INIT_DATA_BIN) phy_init_data: $(PHY_INIT_DATA_BIN)
phy_init_data-flash: $(BUILD_DIR_BASE)/phy_init_data.bin phy_init_data-flash: $(PHY_INIT_DATA_BIN)
@echo "Flashing PHY init data..." @echo "Flashing PHY init data..."
$(PHY_INIT_DATA_FLASH_CMD) $(PHY_INIT_DATA_FLASH_CMD)
ifndef CONFIG_ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA_BIN
phy_init_data-clean: phy_init_data-clean:
rm -f $(PHY_INIT_DATA_BIN) $(PHY_INIT_DATA_OBJ) rm -f $(PHY_INIT_DATA_BIN) $(PHY_INIT_DATA_OBJ)
clean: phy_init_data-clean
endif
all: phy_init_data all: phy_init_data
flash: phy_init_data flash: phy_init_data