Skip to content

Commit 9005f86

Browse files
gromeronashif
authored andcommitted
arch: arm: aarch32: Refresh CORTEX_M_DWT in menuconfig
Currently, CORTEX_M_DWT option does not refresh its value when TIMING_FUNCTIONS, on which it depends, is selected via menuconfig. This occurs because during the early west build steps the aarch32-specific Kconfig file is parsed with TIMING_FUNCTIONS=n, resulting in CORTEX_M_DWT being set to 'n' (not set) in .config. Later, when the user runs west with -t menuconfig and sets TIMING_FUNCTIONS=y using the menus or any other option that selects TIMING_FUNCTIONS=y indirectly, CORTEX_M_DWT is already set to 'n' and remains set as such. That is inconvenient, and, moreoever, since CORTEX_M_DWT gets set if TIMING_FUNCTIONS is set in prj.conf, the current behavior is not consistent, i.e. via the menuconfig setting TIMING_FUNCTIONS=y doesn't imply selecting CORTEX_M_DWT automatically. This commit addresses this issue by selecting CORTEX_M_DWT=y if TIMING_FUNCTIONS becomes set to 'y', otherwise allowing it to be set via the prompt. This is possible by making the CORTEX_M_DWT prompt conditional. Hence, in menuconfig, if TIMING_FUNCTIONS gets set CORTEX_M_DWT is set automatically. If TIMING_FUNCTIONS is not set, a prompt is presented to allow selecting CORTEX_M_DWT manually. Signed-off-by: Gustavo Romero <[email protected]>
1 parent d185f8e commit 9005f86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/core/cortex_m/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ config SW_VECTOR_RELAY_CLIENT
379379
initialization.
380380

381381
config CORTEX_M_DWT
382-
bool "Data Watchpoint and Trace (DWT)"
382+
bool "Data Watchpoint and Trace (DWT)" if !TIMING_FUNCTIONS
383383
depends on CPU_CORTEX_M_HAS_DWT
384384
default y if TIMING_FUNCTIONS
385385
help

0 commit comments

Comments
 (0)