From fd19c0ee5279573ac4b02b8effc77d9b29eb2bf2 Mon Sep 17 00:00:00 2001 From: Soren Ptak Date: Tue, 2 Jan 2024 15:15:34 -0500 Subject: [PATCH] Throw an error if configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is set to 1 --- portable/GCC/ARM_CRx_MPU/portmacro.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/portable/GCC/ARM_CRx_MPU/portmacro.h b/portable/GCC/ARM_CRx_MPU/portmacro.h index 7fdc82479..58d6bb351 100644 --- a/portable/GCC/ARM_CRx_MPU/portmacro.h +++ b/portable/GCC/ARM_CRx_MPU/portmacro.h @@ -78,6 +78,13 @@ extern "C" { #endif /* configPROTECTED_KERNEL_OBJECT_POOL_SIZE */ #endif /* configENABLE_ACCESS_CONTROL_LIST */ +#ifndef configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS + #define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0 +#elif( configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS == 1 ) + #error "This port does not support unprivileged tasks to enter a critical section" +#endif /* configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS */ +/* ------------------------- FreeRTOS Config Check ------------------------- */ + /** @brief The size in Bytes that the Privileged System Call Stack should be. * * @ingroup MPU Privilege