Skip to content

Commit

Permalink
fix ULP LP compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 committed Sep 16, 2024
1 parent aa76a86 commit 47395cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion builder/frameworks/espidf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,7 @@ def _skip_prj_source_files(node):

ulp_dir = os.path.join(PROJECT_DIR, "ulp")
if os.path.isdir(ulp_dir) and os.listdir(ulp_dir) and mcu not in ("esp32c2", "esp32c3", "esp32h2"):
env.SConscript("ulp.py", exports="env sdk_config project_config idf_variant")
env.SConscript("ulp.py", exports="env sdk_config project_config app_includes idf_variant")

#
# Process OTA partition and image
Expand Down
8 changes: 6 additions & 2 deletions builder/frameworks/ulp.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from SCons.Script import Import

Import("env sdk_config project_config idf_variant")
Import("env sdk_config project_config app_includes idf_variant")

ulp_env = env.Clone()
platform = ulp_env.PioPlatform()
Expand Down Expand Up @@ -93,6 +93,10 @@ def _generate_ulp_configuration_action(env, target, source):
else:
ulp_toolchain = "toolchain-lp-core-riscv.cmake"

comp_includes = ";".join(get_component_includes(target_config))
plain_includes = ";".join(app_includes["plain_includes"])
comp_includes = comp_includes + plain_includes

cmd = (
os.path.join(platform.get_package_dir("tool-cmake"), "bin", "cmake"),
"-DCMAKE_GENERATOR=Ninja",
Expand All @@ -107,7 +111,7 @@ def _generate_ulp_configuration_action(env, target, source):
"-DULP_S_SOURCES=%s" % ";".join([fs.to_unix_path(s.get_abspath()) for s in source]),
"-DULP_APP_NAME=ulp_main",
"-DCOMPONENT_DIR=" + os.path.join(ulp_env.subst("$PROJECT_DIR"), "ulp"),
"-DCOMPONENT_INCLUDES=%s" % ";".join(get_component_includes(target_config)),
"-DCOMPONENT_INCLUDES=" + comp_includes,
"-DIDF_TARGET=%s" % idf_variant,
"-DIDF_PATH=" + fs.to_unix_path(FRAMEWORK_DIR),
"-DSDKCONFIG_HEADER=" + os.path.join(BUILD_DIR, "config", "sdkconfig.h"),
Expand Down

0 comments on commit 47395cd

Please sign in to comment.