From 76db96cf6bdc0aac7c5854080e0ea0097a985a30 Mon Sep 17 00:00:00 2001 From: Soren Ptak Date: Tue, 26 Mar 2024 09:17:29 -0700 Subject: [PATCH] Add in a portDONT_DISCARD symbol as well. --- 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 4ca649f6e..7e80f093e 100644 --- a/portable/GCC/ARM_CRx_MPU/portmacro.h +++ b/portable/GCC/ARM_CRx_MPU/portmacro.h @@ -221,6 +221,13 @@ typedef uint32_t TickType_t; */ #define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" ) +/** + * @brief Ensure a symbol isn't removed from the compilation unit. + * + * @ingroup Port Interface Specifications + */ +#define portDONT_DISCARD __attribute__( ( used ) ) + /** * @brief Defines if the tick count can be accessed atomically. *