Skip to content

Commit 352c004

Browse files
authored
prepare LP ULP support
1 parent 33c9ee4 commit 352c004

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

builder/frameworks/ulp.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ def get_component_includes(target_config):
7979
def generate_ulp_config(target_config):
8080
def _generate_ulp_configuration_action(env, target, source):
8181
riscv_ulp_enabled = sdk_config.get("ULP_COPROC_TYPE_RISCV", False)
82+
lp_core_ulp_enabled = sdk_config.get("ULP_COPROC_TYPE_LP_CORE", False)
83+
84+
if lp_core_ulp_enabled == False:
85+
ulp_toolchain = "toolchain-%sulp%s.cmake"% (
86+
"" if riscv_ulp_enabled else idf_variant + "-",
87+
"-riscv" if riscv_ulp_enabled else "",
88+
)
89+
else:
90+
ulp_toolchain = "toolchain-lp-core-riscv"
8291

8392
cmd = (
8493
os.path.join(platform.get_package_dir("tool-cmake"), "bin", "cmake"),
@@ -89,11 +98,7 @@ def _generate_ulp_configuration_action(env, target, source):
8998
"components",
9099
"ulp",
91100
"cmake",
92-
"toolchain-%sulp%s.cmake"
93-
% (
94-
"" if riscv_ulp_enabled else idf_variant + "-",
95-
"-riscv" if riscv_ulp_enabled else "",
96-
),
101+
ulp_toolchain,
97102
),
98103
"-DULP_S_SOURCES=%s" % ";".join([fs.to_unix_path(s.get_abspath()) for s in source]),
99104
"-DULP_APP_NAME=ulp_main",

0 commit comments

Comments
 (0)