Skip to content

Commit da13338

Browse files
committed
Process internal Arduino libraries in mixed Arduino/IDF projects
Resolves #1080
1 parent b7a3ee8 commit da13338

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

builder/frameworks/espidf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
PROJECT_DIR = env.subst("$PROJECT_DIR")
8585
PROJECT_SRC_DIR = env.subst("$PROJECT_SRC_DIR")
8686
CMAKE_API_REPLY_PATH = os.path.join(".cmake", "api", "v1", "reply")
87-
SDKCONFIG_PATH = os.path.expandvars(board.get(
87+
SDKCONFIG_PATH = os.path.expandvars(board.get(
8888
"build.esp-idf.sdkconfig_path",
8989
os.path.join(PROJECT_DIR, "sdkconfig.%s" % env.subst("$PIOENV")),
9090
))
@@ -1276,6 +1276,10 @@ def _create_venv(venv_dir):
12761276
"the `variant` field! The default `esp32` variant will be used."
12771277
)
12781278
extra_components.append(ARDUINO_FRAMEWORK_DIR)
1279+
# Add path to internal Arduino libraries so that the LDF will be able to find them
1280+
env.Append(
1281+
LIBSOURCE_DIRS=[os.path.join(ARDUINO_FRAMEWORK_DIR, "libraries")]
1282+
)
12791283

12801284
print("Reading CMake configuration...")
12811285
project_codemodel = get_cmake_code_model(

0 commit comments

Comments
 (0)