mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	Copy esp32 custom partition files to build folder (#5919)
This commit is contained in:
		| @@ -497,10 +497,11 @@ async def to_code(config): | ||||
|         add_idf_sdkconfig_option("CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0", False) | ||||
|         add_idf_sdkconfig_option("CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1", False) | ||||
|  | ||||
|         if CONF_PARTITIONS in config: | ||||
|             cg.add_platformio_option("board_build.partitions", config[CONF_PARTITIONS]) | ||||
|         else: | ||||
|         cg.add_platformio_option("board_build.partitions", "partitions.csv") | ||||
|         if CONF_PARTITIONS in config: | ||||
|             add_extra_build_file( | ||||
|                 "partitions.csv", CORE.relative_config_path(config[CONF_PARTITIONS]) | ||||
|             ) | ||||
|  | ||||
|         for name, value in conf[CONF_SDKCONFIG_OPTIONS].items(): | ||||
|             add_idf_sdkconfig_option(name, RawSdkconfigValue(value)) | ||||
| @@ -639,6 +640,7 @@ def _write_sdkconfig(): | ||||
| # Called by writer.py | ||||
| def copy_files(): | ||||
|     if CORE.using_arduino: | ||||
|         if "partitions.csv" not in CORE.data[KEY_ESP32][KEY_EXTRA_BUILD_FILES]: | ||||
|             write_file_if_changed( | ||||
|                 CORE.relative_build_path("partitions.csv"), | ||||
|                 get_arduino_partition_csv( | ||||
| @@ -647,6 +649,7 @@ def copy_files(): | ||||
|             ) | ||||
|     if CORE.using_esp_idf: | ||||
|         _write_sdkconfig() | ||||
|         if "partitions.csv" not in CORE.data[KEY_ESP32][KEY_EXTRA_BUILD_FILES]: | ||||
|             write_file_if_changed( | ||||
|                 CORE.relative_build_path("partitions.csv"), | ||||
|                 get_idf_partition_csv( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user