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 <erwan.gouriou@st.com>
This commit is contained in:
Erwan Gouriou 2023-10-25 14:36:43 +02:00 committed by Carles Cufí
commit 54fa6f30b8

View file

@ -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