esptool_py: create flash target functions

This commit is contained in:
Renz Christian Bagaporo
2019-12-20 09:55:02 +08:00
committed by bot
parent 5f803b8283
commit cc8bff703e
13 changed files with 211 additions and 219 deletions
+7 -3
View File
@@ -47,10 +47,14 @@ function(spiffs_create_partition_image partition base_dir)
ADDITIONAL_MAKE_CLEAN_FILES
${image_file})
idf_component_get_property(main_args esptool_py FLASH_ARGS)
idf_component_get_property(sub_args esptool_py FLASH_SUB_ARGS)
esptool_py_flash_target(${partition}-flash "${main_args}" "${sub_args}")
esptool_py_flash_target_image(${partition}-flash "${partition}" "${offset}" "${image_file}")
if(arg_FLASH_IN_PROJECT)
esptool_py_flash_project_args("${partition}" "${offset}" "${image_file}" FLASH_IN_PROJECT)
else()
esptool_py_flash_project_args("${partition}" "${offset}" "${image_file}")
esptool_py_flash_target_image(flash "${partition}" "${offset}" "${image_file}")
endif()
else()
set(message "Failed to create SPIFFS image for partition '${partition}'. "