Skip to content

Commit

Permalink
Update project_include.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Aug 29, 2024
1 parent 55c3dfe commit f852389
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions components/ulp/project_include.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ function(ulp_embed_binary app_name s_sources exp_dep_srcs)
string(REPLACE ";" "|" ulp_s_sources "${ulp_s_sources}")

idf_build_get_property(sdkconfig_header SDKCONFIG_HEADER)
idf_build_get_property(sdkconfig_cmake SDKCONFIG_CMAKE)
idf_build_get_property(idf_path IDF_PATH)
idf_build_get_property(idf_target IDF_TARGET)
idf_build_get_property(python PYTHON)
Expand All @@ -42,11 +41,17 @@ function(ulp_embed_binary app_name s_sources exp_dep_srcs)
elseif(IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3")
if(CONFIG_ULP_COPROC_TYPE_RISCV STREQUAL "y")
set(TOOLCHAIN_FLAG ${idf_path}/components/ulp/cmake/toolchain-ulp-riscv.cmake)
set(ULP_IS_RISCV ON)
else()
set(TOOLCHAIN_FLAG ${idf_path}/components/ulp/cmake/toolchain-${idf_target}-ulp.cmake)
set(ULP_IS_RISCV OFF)
endif()
elseif(CONFIG_ULP_COPROC_TYPE_LP_CORE)
set(TOOLCHAIN_FLAG ${idf_path}/components/ulp/cmake/toolchain-lp-core-riscv.cmake)
set(ULP_IS_LP_CORE_RISCV ON)
if(CONFIG_ESP_ROM_HAS_LP_ROM)
set(CONFIG_ESP_ROM_HAS_LP_ROM ON)
endif()
endif()

externalproject_add(${app_name}
Expand All @@ -62,8 +67,10 @@ function(ulp_embed_binary app_name s_sources exp_dep_srcs)
-DIDF_TARGET=${idf_target}
-DIDF_PATH=${idf_path}
-DSDKCONFIG_HEADER=${SDKCONFIG_HEADER}
-DSDKCONFIG_CMAKE=${SDKCONFIG_CMAKE}
-DPYTHON=${python}
-DULP_COCPU_IS_RISCV=${ULP_IS_RISCV}
-DULP_COCPU_IS_LP_CORE=${ULP_IS_LP_CORE_RISCV}
-DCONFIG_ESP_ROM_HAS_LP_ROM=${CONFIG_ESP_ROM_HAS_LP_ROM}
${extra_cmake_args}
BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/${app_name} --target build
BUILD_BYPRODUCTS ${ulp_artifacts} ${ulp_artifacts_extras} ${ulp_ps_sources}
Expand Down

0 comments on commit f852389

Please sign in to comment.