From 67744230f161c2717a71c541d5c91baa6a9c447c Mon Sep 17 00:00:00 2001 From: Jonatan Antoni Date: Tue, 19 Nov 2024 12:22:23 +0100 Subject: [PATCH] Guard include of RTE_Components.h with presence of _RTE_ Fixes ARM-software/CMSIS_6#205 --- CMSIS/Core/Source/irq_ctrl_gic.c | 5 +++++ CMSIS/RTOS2/Source/os_systick.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/CMSIS/Core/Source/irq_ctrl_gic.c b/CMSIS/Core/Source/irq_ctrl_gic.c index fa7765fe8..e6f1eb701 100644 --- a/CMSIS/Core/Source/irq_ctrl_gic.c +++ b/CMSIS/Core/Source/irq_ctrl_gic.c @@ -24,7 +24,12 @@ #include +#if defined(_RTE_) #include "RTE_Components.h" +#elif !defined(CMSIS_device_header) +#error "CMSIS_device_header must be defined to point to CMSIS device header" +#endif + #include CMSIS_device_header #include "irq_ctrl.h" diff --git a/CMSIS/RTOS2/Source/os_systick.c b/CMSIS/RTOS2/Source/os_systick.c index fe564f8e2..6435e8ee0 100644 --- a/CMSIS/RTOS2/Source/os_systick.c +++ b/CMSIS/RTOS2/Source/os_systick.c @@ -25,7 +25,13 @@ #include "os_tick.h" //lint -emacro((923,9078),SCB,SysTick) "cast from unsigned long to pointer" + +#if defined(_RTE_) #include "RTE_Components.h" +#elif !defined(CMSIS_device_header) +#error "CMSIS_device_header must be defined to point to CMSIS device header" +#endif + #include CMSIS_device_header #ifdef SysTick