From 54fa6f30b8f244d860941ccc0be15714b655c116 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Wed, 25 Oct 2023 14:36:43 +0200 Subject: [PATCH] soc: stm32: Enable Debug in stop mode when ZTEST is used Force STM32_ENABLE_DEBUG_SLEEP_STOP option when running tests. This option enables Debug in Sleep/stop states and disables it when disabled (default state). When disabled, it may be impossible to flash the device with runner such as openocd. It's generally working using cubeprogrammer, but it might fail as well with fault configuration. Instead of fixing each test or breaking CI each time a new test is created with CONFIG_PM=y, force this option to be enabled when ZTEST=y (as it was already the case when DEBUG=y). Signed-off-by: Erwan Gouriou --- soc/arm/st_stm32/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soc/arm/st_stm32/Kconfig b/soc/arm/st_stm32/Kconfig index c644b50a5ff..dcdb22ca26b 100644 --- a/soc/arm/st_stm32/Kconfig +++ b/soc/arm/st_stm32/Kconfig @@ -6,7 +6,7 @@ config SOC_FAMILY_STM32 bool select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE - select STM32_ENABLE_DEBUG_SLEEP_STOP if DEBUG + select STM32_ENABLE_DEBUG_SLEEP_STOP if DEBUG || ZTEST select BUILD_OUTPUT_HEX if SOC_FAMILY_STM32