set(otatool_py ${python} ${COMPONENT_DIR}/otatool.py)
add_custom_target(read_otadata DEPENDS "${PARTITION_CSV_PATH}"
- COMMAND ${otatool_py} --partition-table-file ${PARTITION_CSV_PATH} read_otadata)
+ COMMAND ${otatool_py}
+ --partition-table-file ${PARTITION_CSV_PATH}
+ --partition-table-offset ${PARTITION_TABLE_OFFSET}
+ read_otadata)
add_custom_target(erase_otadata DEPENDS "${PARTITION_CSV_PATH}"
- COMMAND ${otatool_py} --partition-table-file ${PARTITION_CSV_PATH} erase_otadata)
+ COMMAND ${otatool_py}
+ --partition-table-file ${PARTITION_CSV_PATH}
+ --partition-table-offset ${PARTITION_TABLE_OFFSET}
+ erase_otadata)
esptool_py_flash_project_args(otadata ${otadata_offset} "${blank_otadata_file}" FLASH_IN_PROJECT)
endif()
ESPTOOL_ALL_FLASH_ARGS += $(OTA_DATA_OFFSET) $(BLANK_OTA_DATA_FILE)
erase_otadata: $(PARTITION_TABLE_CSV_PATH) partition_table_get_info | check_python_dependencies
- $(OTATOOL_PY) --partition-table-file $(PARTITION_TABLE_CSV_PATH) erase_otadata
+ $(OTATOOL_PY) --partition-table-file $(PARTITION_TABLE_CSV_PATH) \
+ --partition-table-offset $(PARTITION_TABLE_OFFSET) \
+ erase_otadata
read_otadata: $(PARTITION_TABLE_CSV_PATH) partition_table_get_info | check_python_dependencies
- $(OTATOOL_PY) --partition-table-file $(PARTITION_TABLE_CSV_PATH) read_otadata
+ $(OTATOOL_PY) --partition-table-file $(PARTITION_TABLE_CSV_PATH) \
+ --partition-table-offset $(partition_table_offset) \
+ read_otadata
erase_ota: erase_otadata
@echo "WARNING: erase_ota is deprecated. Use erase_otadata instead."
partition_table_get_info: $(PARTITION_TABLE_BIN)
$(eval PHY_DATA_OFFSET:=$(shell $(GET_PART_INFO) --partition-table-file $(PARTITION_TABLE_BIN) \
+ --partition-table-offset $(PARTITION_TABLE_OFFSET) \
get_partition_info --partition-type data --partition-subtype phy --info offset))
$(eval APP_OFFSET:=$(shell $(GET_PART_INFO) --partition-table-file $(PARTITION_TABLE_BIN) \
+ --partition-table-offset $(PARTITION_TABLE_OFFSET) \
get_partition_info --partition-boot-default --info offset))
$(eval OTA_DATA_OFFSET:=$(shell $(GET_PART_INFO) --partition-table-file $(PARTITION_TABLE_BIN) \
+ --partition-table-offset $(PARTITION_TABLE_OFFSET) \
get_partition_info --partition-type data --partition-subtype ota --info offset))
$(eval OTA_DATA_SIZE:=$(shell $(GET_PART_INFO) --partition-table-file $(PARTITION_TABLE_BIN) \
+ --partition-table-offset $(PARTITION_TABLE_OFFSET) \
get_partition_info --partition-type data --partition-subtype ota --info size))
$(eval FACTORY_OFFSET:=$(shell $(GET_PART_INFO) --partition-table-file $(PARTITION_TABLE_BIN) \
+ --partition-table-offset $(PARTITION_TABLE_OFFSET) \
get_partition_info --partition-type app --partition-subtype factory --info offset))
export APP_OFFSET