Skip to content

Commit 04b83e3

Browse files
authored
prepare LP ULP support
1 parent 8c21dfa commit 04b83e3

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

builder/frameworks/ulp.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ def get_component_includes(target_config):
8181
def generate_ulp_config(target_config):
8282
def _generate_ulp_configuration_action(env, target, source):
8383
riscv_ulp_enabled = sdk_config.get("ULP_COPROC_TYPE_RISCV", False)
84+
lp_core_ulp_enabled = sdk_config.get("ULP_COPROC_TYPE_LP_CORE", False)
85+
86+
if lp_core_ulp_enabled == False:
87+
ulp_toolchain = "toolchain-%sulp%s.cmake"% (
88+
"" if riscv_ulp_enabled else idf_variant + "-",
89+
"-riscv" if riscv_ulp_enabled else "",
90+
)
91+
else:
92+
ulp_toolchain = "toolchain-lp-core-riscv"
8493

8594
cmd = (
8695
os.path.join(platform.get_package_dir("tool-cmake"), "bin", "cmake"),
@@ -91,11 +100,7 @@ def _generate_ulp_configuration_action(env, target, source):
91100
"components",
92101
"ulp",
93102
"cmake",
94-
"toolchain-%sulp%s.cmake"
95-
% (
96-
"" if riscv_ulp_enabled else idf_variant + "-",
97-
"-riscv" if riscv_ulp_enabled else "",
98-
),
103+
ulp_toolchain,
99104
),
100105
"-DULP_S_SOURCES=%s" % ";".join([fs.to_unix_path(s.get_abspath()) for s in source]),
101106
"-DULP_APP_NAME=ulp_main",

0 commit comments

Comments
 (0)