bugfix: fix make compile phy multiple bin error
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_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
$(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 -
@@ -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)
$(summary) BIN $(notdir $@)
$(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-flash: $(BUILD_DIR_BASE)/phy_init_data.bin
+phy_init_data-flash: $(PHY_INIT_DATA_BIN)
@echo "Flashing PHY init data..."
$(PHY_INIT_DATA_FLASH_CMD)
+ifndef CONFIG_ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA_BIN
phy_init_data-clean:
rm -f $(PHY_INIT_DATA_BIN) $(PHY_INIT_DATA_OBJ)
+clean: phy_init_data-clean
+endif
+
all: phy_init_data
flash: phy_init_data
