From b1547844211b17992aec15b0048ea5cb39f9f552 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 17 Feb 2020 13:54:00 +0100 Subject: [PATCH] tests/mpu_stack_guard: error unless __MPU_PRESENT --- tests/mpu_stack_guard/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/mpu_stack_guard/main.c b/tests/mpu_stack_guard/main.c index 04e33360a2..b656931147 100644 --- a/tests/mpu_stack_guard/main.c +++ b/tests/mpu_stack_guard/main.c @@ -22,6 +22,14 @@ #include "cpu.h" #include "thread.h" +#include "mpu.h" + +/* RIOT's MPU headers gracefully fail when no MPU is present. + * Use this to catch if RIOT's features are correctly gating MPU use. + */ +#if !__MPU_PRESENT +#error "(!__MPU_PRESENT)" +#endif #define CANARY_VALUE 0xdeadbeef