From c4e6bd2d7c32db99b2796ed9ffe501f429feb07a Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Thu, 2 Jan 2020 10:08:46 +0900 Subject: [PATCH] arch: arm: cortex_m: Add CPU DWT feature symbol This commit adds a Kconfig symbol for specifying whether the SoC implements the CPU DWT feature. The Data Watchpoint and Trace (DWT) is an optional debug unit for the Cortex-M family cores (except ARMv6-M; i.e. M0 and M0+) that provides watchpoints, data tracing and system profiling capabilities. Signed-off-by: Stephanos Ioannidis --- arch/arm/core/aarch32/cortex_m/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/core/aarch32/cortex_m/Kconfig b/arch/arm/core/aarch32/cortex_m/Kconfig index 98ddab92eb8..49b737daef2 100644 --- a/arch/arm/core/aarch32/cortex_m/Kconfig +++ b/arch/arm/core/aarch32/cortex_m/Kconfig @@ -70,6 +70,17 @@ config CPU_CORTEX_M_HAS_SYSTICK help This option is enabled when the CPU implements the SysTick timer. +config CPU_CORTEX_M_HAS_DWT + bool + depends on !CPU_CORTEX_M0 && !CPU_CORTEX_M0PLUS + help + This option signifies that the CPU implements the Data Watchpoint and + Trace (DWT) unit specified by the ARMv7-M and above. + + While ARMv6-M does define a "DWT" unit, this is significantly different + from the DWT specified by the ARMv7-M and above in terms of both feature + set and register mappings. + config CPU_CORTEX_M_HAS_BASEPRI bool depends on ARMV7_M_ARMV8_M_MAINLINE