Skip to content

Commit b4e3147

Browse files
committed
Allow IDF's managed_components folder overwrite
1 parent ac5510a commit b4e3147

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

builder/frameworks/espidf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,13 @@ def populate_idf_env_vars(idf_env):
271271
if "IDF_TOOLS_PATH" in idf_env:
272272
del idf_env["IDF_TOOLS_PATH"]
273273

274+
# Unlike IDF, PlatformIO allows multiple targets per environment. This
275+
# difference may cause CMake configuration errors if the automatically
276+
# handled folder "managed_components" was modified on the disk by
277+
# a previous target
278+
if board.get("build.esp-idf.overwrite_managed_components", "yes") == "yes":
279+
idf_env["IDF_COMPONENT_OVERWRITE_MANAGED_COMPONENTS"] = "1"
280+
274281

275282
def get_target_config(project_configs, target_index, cmake_api_reply_dir):
276283
target_json = project_configs.get("targets")[target_index].get("jsonFile", "")

0 commit comments

Comments
 (0)