From afe027a1a7097a651d8b907acc014cfd0aa25f89 Mon Sep 17 00:00:00 2001 From: Paul Guenette Date: Thu, 3 Jun 2021 23:54:54 -0400 Subject: [PATCH] Fix missing portDONT_DISCARD in GCC defs for FreeRTOS and LTO --- .../FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h | 4 ++++ .../FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Firmware/ThirdParty/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h b/Firmware/ThirdParty/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h index d0a566a7..89affe69 100644 --- a/Firmware/ThirdParty/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h +++ b/Firmware/ThirdParty/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h @@ -166,6 +166,10 @@ not necessary for to use this port. They are defined so the common demo files #define portFORCE_INLINE inline __attribute__(( always_inline)) #endif +#ifndef portDONT_DISCARD + #define portDONT_DISCARD __attribute__(( used )) +#endif + portFORCE_INLINE static BaseType_t xPortIsInsideInterrupt( void ) { uint32_t ulCurrentInterrupt; diff --git a/Firmware/ThirdParty/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h b/Firmware/ThirdParty/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h index 62543ac7..e69fbfc0 100644 --- a/Firmware/ThirdParty/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h +++ b/Firmware/ThirdParty/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h @@ -166,6 +166,10 @@ not necessary for to use this port. They are defined so the common demo files #define portFORCE_INLINE inline __attribute__(( always_inline)) #endif +#ifndef portDONT_DISCARD + #define portDONT_DISCARD __attribute__(( used )) +#endif + portFORCE_INLINE static BaseType_t xPortIsInsideInterrupt( void ) { uint32_t ulCurrentInterrupt;