From 9c2f1800498ccb66d8832299fbfc4265b99ba822 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 31 Mar 2021 19:25:35 +1100 Subject: [PATCH] ulp: Fix bug where ULP linker script not regenerated for new config ULP linker script relies on value of CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM, when this value changes in config then it should be regenerated. --- components/ulp/cmake/CMakeLists.txt | 4 ++-- components/ulp/project_include.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/ulp/cmake/CMakeLists.txt b/components/ulp/cmake/CMakeLists.txt index 625ff97154..6eb57e091e 100644 --- a/components/ulp/cmake/CMakeLists.txt +++ b/components/ulp/cmake/CMakeLists.txt @@ -43,7 +43,7 @@ endif() set(ULP_MAP_GEN ${PYTHON} ${IDF_PATH}/components/ulp/esp32ulp_mapgen.py) -get_filename_component(sdkconfig_dir ${SDKCONFIG} DIRECTORY) +get_filename_component(sdkconfig_dir ${SDKCONFIG_HEADER} DIRECTORY) foreach(include ${COMPONENT_INCLUDES}) list(APPEND component_includes -I${include}) @@ -62,7 +62,7 @@ get_filename_component(ULP_LD_SCRIPT ${ULP_LD_TEMPLATE} NAME) add_custom_command(OUTPUT ${ULP_LD_SCRIPT} COMMAND ${CMAKE_C_COMPILER} -E -P -xc -o ${ULP_LD_SCRIPT} ${ULP_PREPROCESSOR_ARGS} ${ULP_LD_TEMPLATE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS ${ULP_LD_TEMPLATE} + DEPENDS ${ULP_LD_TEMPLATE} ${SDKCONFIG_HEADER} VERBATIM) add_custom_target(${ULP_APP_NAME}_ld_script DEPENDS ${ULP_LD_SCRIPT} diff --git a/components/ulp/project_include.cmake b/components/ulp/project_include.cmake index bb261688ea..27341b93ef 100644 --- a/components/ulp/project_include.cmake +++ b/components/ulp/project_include.cmake @@ -60,7 +60,7 @@ function(ulp_embed_binary app_name s_sources exp_dep_srcs) -DCOMPONENT_DIR=${COMPONENT_DIR} -DCOMPONENT_INCLUDES=$ -DIDF_PATH=${idf_path} - -DSDKCONFIG=${SDKCONFIG_HEADER} + -DSDKCONFIG_HEADER=${SDKCONFIG_HEADER} -DPYTHON=${python} -DULP_COCPU_IS_RISCV=${ULP_IS_RISCV} ${extra_cmake_args}