Skip to content

Commit 13f0846

Browse files
authored
Fix compile issue with managed components
1 parent 5106663 commit 13f0846

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

builder/frameworks/espidf.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@
5353
env = DefaultEnvironment()
5454
env.SConscript("_embed_files.py", exports="env")
5555

56+
# Allow changes in folders of managed components
57+
os.environ["IDF_COMPONENT_OVERWRITE_MANAGED_COMPONENTS"] = "1"
58+
5659
platform = env.PioPlatform()
5760
board = env.BoardConfig()
5861
mcu = board.get("build.mcu", "esp32")
5962
idf_variant = mcu.lower()
6063

61-
# Required until Arduino switches to v5
6264
IDF5 = (
6365
platform.get_package_version("framework-espidf")
6466
.split(".")[1]
@@ -655,7 +657,8 @@ def generate_project_ld_script(sdk_config, ignore_targets=None):
655657
"sections.ld.in",
656658
)
657659

658-
if IDF5:
660+
framework_version = [int(v) for v in get_framework_version().split(".")]
661+
if framework_version[:2] > [5, 2]:
659662
initial_ld_script = preprocess_linker_file(
660663
initial_ld_script,
661664
os.path.join(
@@ -1257,7 +1260,7 @@ def _get_installed_pip_packages(python_exe_path):
12571260
"future": ">=0.18.3",
12581261
"pyparsing": ">=3.1.0,<4" if IDF5 else ">=2.0.3,<2.4.0",
12591262
"kconfiglib": "~=14.1.0" if IDF5 else "~=13.7.1",
1260-
"idf-component-manager": "~=1.5.2" if IDF5 else "~=1.0",
1263+
"idf-component-manager": "~=2.0.1" if IDF5 else "~=1.0",
12611264
"esp-idf-kconfig": ">=1.4.2,<2.0.0"
12621265
}
12631266

@@ -1414,7 +1417,8 @@ def get_python_exe():
14141417
"memory.ld.in",
14151418
))
14161419

1417-
if IDF5:
1420+
framework_version = [int(v) for v in get_framework_version().split(".")]
1421+
if framework_version[:2] > [5, 2]:
14181422
initial_ld_script = preprocess_linker_file(
14191423
initial_ld_script,
14201424
os.path.join(

0 commit comments

Comments
 (0)