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