diff --git a/tests/ztest/error_hook/src/main.c b/tests/ztest/error_hook/src/main.c index 226e0f326af..696aa8cbddb 100644 --- a/tests/ztest/error_hook/src/main.c +++ b/tests/ztest/error_hook/src/main.c @@ -66,7 +66,7 @@ __no_optimization static void trigger_fault_access(void) * address instead to trigger exception. See issue #31419. */ void *a = (void *)0xFFFFFFFF; -#elif defined(CONFIG_CPU_CORTEX_M) +#elif defined(CONFIG_CPU_CORTEX_M) || defined(CONFIG_CPU_CORTEX_R) /* As this test case only runs when User Mode is enabled, * accessing _current always triggers a memory access fault, * and is guaranteed not to trigger SecureFault exceptions.