From 2ec68a6a11db2dc87bf43c990042e5883c254e5c Mon Sep 17 00:00:00 2001 From: "F. Ramu" Date: Tue, 12 Nov 2024 15:49:23 +0100 Subject: [PATCH] stm32u5 hal dma_ex function not inlined with GCC 11 or 12 refer to https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/33420 Signed-off-by: F. Ramu (cherry picked from commit 7cd6c20ced101cbdf319e3a598f079b3f42140f2) --- .../stm/common/stm32u5xx/hal/Src/stm32u5xx_hal_dma_ex.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platform/ext/target/stm/common/stm32u5xx/hal/Src/stm32u5xx_hal_dma_ex.c b/platform/ext/target/stm/common/stm32u5xx/hal/Src/stm32u5xx_hal_dma_ex.c index c427aaf57..fe9a01944 100644 --- a/platform/ext/target/stm/common/stm32u5xx/hal/Src/stm32u5xx_hal_dma_ex.c +++ b/platform/ext/target/stm/common/stm32u5xx/hal/Src/stm32u5xx_hal_dma_ex.c @@ -535,7 +535,11 @@ static void DMA_List_BuildNode(DMA_NodeConfTypeDef const *const pNodeConfig, DMA_NodeTypeDef *const pNode); static void DMA_List_GetNodeConfig(DMA_NodeConfTypeDef *const pNodeConfig, DMA_NodeTypeDef const *const pNode); +#if (__GNUC__ == 11) || (__GNUC__ == 12) +static __attribute__((noinline)) uint32_t DMA_List_CheckNodesBaseAddresses(DMA_NodeTypeDef const *const pNode1, +#else static uint32_t DMA_List_CheckNodesBaseAddresses(DMA_NodeTypeDef const *const pNode1, +#endif DMA_NodeTypeDef const *const pNode2, DMA_NodeTypeDef const *const pNode3, DMA_NodeTypeDef const *const pNode4); @@ -4074,7 +4078,11 @@ static void DMA_List_GetNodeConfig(DMA_NodeConfTypeDef *const pNodeConfig, * @param pNode4 : Pointer to a DMA_NodeTypeDef structure that contains linked-list node 4 registers configurations. * @retval Return 0 when nodes addresses are compatible, 1 otherwise. */ +#if (__GNUC__ == 11) || (__GNUC__ == 12) +static __attribute__((noinline)) uint32_t DMA_List_CheckNodesBaseAddresses(DMA_NodeTypeDef const *const pNode1, +#else static uint32_t DMA_List_CheckNodesBaseAddresses(DMA_NodeTypeDef const *const pNode1, +#endif DMA_NodeTypeDef const *const pNode2, DMA_NodeTypeDef const *const pNode3, DMA_NodeTypeDef const *const pNode4)