Skip to content

Commit

Permalink
arch/arm: cortex_m: Disable DWT based null-pointer exception detection
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
erwango authored and nashif committed Mar 9, 2021
1 parent afbc044 commit 1931451
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm/core/aarch32/cortex_m/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1931451

Please sign in to comment.