diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index dffaa2c5c..9125560bb 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -1023,11 +1023,14 @@ def compile_source_files( # Canonical, symlink-resolved absolute path of the components directory components_dir_path = (Path(FRAMEWORK_DIR) / "components").resolve() for source in config.get("sources", []): - if source["path"].endswith(".rule"): + src_path = source["path"] + if src_path.endswith(".rule"): + continue + # Always skip dummy_src.c to avoid duplicate build actions + if os.path.basename(src_path) == "dummy_src.c": continue compile_group_idx = source.get("compileGroupIndex") if compile_group_idx is not None: - src_path = source.get("path") if not os.path.isabs(src_path): # For cases when sources are located near CMakeLists.txt src_path = str(Path(project_src_dir) / src_path) @@ -1130,7 +1133,10 @@ def get_lib_ignore_components(): lib_handler = _component_manager.LibraryIgnoreHandler(config, logger) # Get the processed lib_ignore entries (already converted to component names) - lib_ignore_entries = lib_handler._get_lib_ignore_entries() + get_entries = getattr(lib_handler, "get_lib_ignore_entries", None) + lib_ignore_entries = ( + get_entries() if callable(get_entries) else lib_handler._get_lib_ignore_entries() + ) return lib_ignore_entries except (OSError, ValueError, RuntimeError, KeyError) as e: @@ -1662,7 +1668,6 @@ def get_python_exe(): if not os.path.isfile(python_exe_path): sys.stderr.write("Error: Missing Python executable file `%s`\n" % python_exe_path) env.Exit(1) - return python_exe_path