From ff6ec884d6576f5717c1687f7351f8046a24c406 Mon Sep 17 00:00:00 2001 From: valeros Date: Mon, 13 Nov 2023 13:58:24 +0200 Subject: [PATCH] Properly handle precompiled static archives located outside IDF project root Resolves #1230 --- builder/frameworks/espidf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index e35e92a57..9fff3a8fc 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -63,7 +63,7 @@ IDF_ENV_VERSION = "1.0.0" FRAMEWORK_DIR = platform.get_package_dir("framework-espidf") TOOLCHAIN_DIR = platform.get_package_dir( - "toolchain-%s" % ("riscv32-esp" if mcu in ("esp32c3","esp32c6") else ("xtensa-%s" % mcu)) + "toolchain-%s" % ("riscv32-esp" if mcu in ("esp32c3", "esp32c6") else ("xtensa-%s" % mcu)) ) @@ -373,8 +373,8 @@ def _add_archive(archive_path, link_args): elif fragment.endswith(".a"): archive_path = fragment # process static archives - if archive_path.startswith(FRAMEWORK_DIR): - # In case of precompiled archives from framework package + if os.path.isabs(archive_path): + # In case of precompiled archives _add_archive(archive_path, link_args) else: # In case of archives within project