arch/arm: cortex_m: Disable DWT based null-pointer exception detection

Null-pointer exception detection using DWT is currently incompatible
with current openocd runner default implementation that leaves debug
mode on by default.
As a consequence, on all targets that use openocd runner, null-pointer
exception detection using DWT will generated an assert.
As a consequence, all tests are failing on such platforms.

Disable this until openocd behavior is fixed (#32984) and enable
the MPU based solution for now.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2021-03-08 09:28:19 +01:00 committed by Anas Nashif
commit 19314514e6

View file

@ -310,7 +310,8 @@ endmenu
choice CORTEX_M_DEBUG_NULL_POINTER_EXCEPTION_DETECTION
bool "Enable and use null-pointer exception"
default CORTEX_M_DEBUG_NULL_POINTER_EXCEPTION_DETECTION_DWT if TEST_ARM_CORTEX_M && !ARM_NONSECURE_FIRMWARE && CPU_CORTEX_M_HAS_DWT
# Disable this until https://github.com/zephyrproject-rtos/zephyr/issues/32984 is fixed
# default CORTEX_M_DEBUG_NULL_POINTER_EXCEPTION_DETECTION_DWT if TEST_ARM_CORTEX_M && !ARM_NONSECURE_FIRMWARE && CPU_CORTEX_M_HAS_DWT
default CORTEX_M_DEBUG_NULL_POINTER_EXCEPTION_DETECTION_MPU if TEST_ARM_CORTEX_M && !ARM_NONSECURE_FIRMWARE && ARM_MPU && !CPU_CORTEX_M_HAS_DWT
default CORTEX_M_DEBUG_NULL_POINTER_EXCEPTION_DETECTION_NONE
help