From 552f17e260d14b2f87f9ee2c077711ccce06fc6f Mon Sep 17 00:00:00 2001 From: Renz Christian Bagaporo Date: Fri, 23 Nov 2018 16:08:41 +0800 Subject: [PATCH 1/2] ulp: fix passing ulp srcs due to cmake_args bug --- components/ulp/component_ulp_common.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/ulp/component_ulp_common.cmake b/components/ulp/component_ulp_common.cmake index af423ee42..6b0a631ee 100644 --- a/components/ulp/component_ulp_common.cmake +++ b/components/ulp/component_ulp_common.cmake @@ -21,6 +21,10 @@ if(NOT CMAKE_BUILD_EARLY_EXPANSION) ${ulp_artifacts_prefix}.sym ${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}/esp32.ulp.ld) + # Replace the separator for the list of ULP source files that will be passed to + # the external ULP project. This is a workaround to the bug https://public.kitware.com/Bug/view.php?id=16137. + string(REPLACE ";" "|" ulp_s_sources "${ulp_s_sources}") + externalproject_add(${ULP_APP_NAME} SOURCE_DIR ${IDF_PATH}/components/ulp/cmake BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME} @@ -29,6 +33,8 @@ if(NOT CMAKE_BUILD_EARLY_EXPANSION) -DCMAKE_TOOLCHAIN_FILE=${IDF_PATH}/components/ulp/cmake/toolchain-ulp.cmake -DULP_S_SOURCES=${ulp_s_sources} -DULP_APP_NAME=${ULP_APP_NAME} -DCOMPONENT_PATH=${COMPONENT_PATH} + # Even though this resolves to a ';' separated list, this is fine. This must be special behavior + # for generator expressions. -DCOMPONENT_INCLUDES=$ -DIDF_PATH=${IDF_PATH} -DSDKCONFIG=${SDKCONFIG_HEADER} @@ -36,6 +42,7 @@ if(NOT CMAKE_BUILD_EARLY_EXPANSION) BUILD_BYPRODUCTS ${ulp_artifacts} ${ulp_artifacts_extras} ${ulp_ps_sources} ${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}/${ULP_APP_NAME} BUILD_ALWAYS 1 + LIST_SEPARATOR | ) spaces2list(ULP_EXP_DEP_SRCS) From 3a02a12aa4c518eb3485c31c3be9b728e135bd62 Mon Sep 17 00:00:00 2001 From: Renz Christian Bagaporo Date: Thu, 22 Nov 2018 18:46:44 +0800 Subject: [PATCH 2/2] cmake: remove unecessary info passed to bootloader build --- components/bootloader/project_include.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/bootloader/project_include.cmake b/components/bootloader/project_include.cmake index 54799088c..d997510e9 100644 --- a/components/bootloader/project_include.cmake +++ b/components/bootloader/project_include.cmake @@ -51,8 +51,7 @@ if((NOT CONFIG_SECURE_BOOT_ENABLED) OR # TODO: support overriding the bootloader in COMPONENT_PATHS SOURCE_DIR "${IDF_PATH}/components/bootloader/subproject" BINARY_DIR "${bootloader_build_dir}" - CMAKE_ARGS -DSDKCONFIG=${SDKCONFIG} -DIDF_PATH=${IDF_PATH} -DEXTRA_COMPONENT_DIRS=${COMPONENT_DIRS} - -DTESTS_ALL=0 -DTEST_COMPONENTS="" + CMAKE_ARGS -DSDKCONFIG=${SDKCONFIG} -DIDF_PATH=${IDF_PATH} -DSECURE_BOOT_SIGNING_KEY=${secure_boot_signing_key} INSTALL_COMMAND "" BUILD_ALWAYS 1 # no easy way around this...