Skip to content

Commit

Permalink
ULP LP support
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Sep 16, 2024
1 parent 4e91faa commit 7a030d8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 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 All @@ -43,7 +43,7 @@ def prepare_ulp_env_vars(env):

toolchain_path_ulp = platform.get_package_dir(
"toolchain-esp32ulp"
if idf_variant in ("esp32", "esp32s2", "esp32s3")
if sdk_config.get("ULP_COPROC_TYPE_FSM", False)
else ""
)

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_EXPORT_COMPILE_COMMANDS=ON",
Expand All @@ -108,7 +112,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 7a030d8

Please sign in to comment.