diff --git a/.gitlab/ci/rules.yml b/.gitlab/ci/rules.yml index 0900492745..a56beebdba 100644 --- a/.gitlab/ci/rules.yml +++ b/.gitlab/ci/rules.yml @@ -80,6 +80,7 @@ - "tools/ci/python_packages/tiny_test_fw/**/*" - "tools/ci/python_packages/ttfw_idf/**/*" - "tools/ci/python_packages/common_test_methods.py" + - "tools/test_apps/configs/sdkconfig.debug_helpers" - "components/**/*" diff --git a/components/ulp/test_apps/ulp_fsm/CMakeLists.txt b/components/ulp/test_apps/ulp_fsm/CMakeLists.txt index c1a26417b3..3049168de6 100644 --- a/components/ulp/test_apps/ulp_fsm/CMakeLists.txt +++ b/components/ulp/test_apps/ulp_fsm/CMakeLists.txt @@ -1,5 +1,8 @@ # This is the project CMakeLists.txt file for the test subproject cmake_minimum_required(VERSION 3.16) +set(SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers") +list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(ulp_fsm_test) diff --git a/components/ulp/test_apps/ulp_riscv/CMakeLists.txt b/components/ulp/test_apps/ulp_riscv/CMakeLists.txt index 7f420a59fb..dd825eab2b 100644 --- a/components/ulp/test_apps/ulp_riscv/CMakeLists.txt +++ b/components/ulp/test_apps/ulp_riscv/CMakeLists.txt @@ -1,5 +1,8 @@ # This is the project CMakeLists.txt file for the test subproject cmake_minimum_required(VERSION 3.16) +set(SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers") +list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(ulp_riscv_test) diff --git a/tools/test_apps/configs/README.md b/tools/test_apps/configs/README.md new file mode 100644 index 0000000000..a2cbbd9e96 --- /dev/null +++ b/tools/test_apps/configs/README.md @@ -0,0 +1,16 @@ +# Configs + +Certain combinations of configs, e.g. stack and heap debug configs, are useful to set in most test apps. + +To facilitiate re-use, this folder contains some of the most common ones. + +These can then be added to the list of default configs in test apps: + +``` +set(SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers") +list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") +``` + +Note that this must be set in the top-level project `CMakelist.txt`. + +These files should not be considered stable, and are thus not recommended for use outside of IDF. diff --git a/tools/test_apps/configs/sdkconfig.debug_helpers b/tools/test_apps/configs/sdkconfig.debug_helpers new file mode 100644 index 0000000000..4bd42af97d --- /dev/null +++ b/tools/test_apps/configs/sdkconfig.debug_helpers @@ -0,0 +1,6 @@ +# Helper options that help with detecting/debugging issues in test apps +CONFIG_HEAP_POISONING_COMPREHENSIVE=y +CONFIG_COMPILER_WARN_WRITE_STRINGS=y +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y +CONFIG_COMPILER_STACK_CHECK_MODE_STRONG=y +CONFIG_COMPILER_STACK_CHECK=y