From 03d26ec0975c752144e16bd70585782481fe8eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tero=20J=C3=A4=C3=A4sk=C3=B6?= Date: Thu, 6 Oct 2016 11:41:47 +0300 Subject: [PATCH] mbed-os: make code compile for A9 board(s) also. We need to support A9 boards also, so adjust the #include jungle to be less strict. Tested with RZ_A1H target. --- .../Port/Reference-Impl/mbedOS/RTOS/pal_plat_rtos.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Source/Port/Reference-Impl/mbedOS/RTOS/pal_plat_rtos.c b/Source/Port/Reference-Impl/mbedOS/RTOS/pal_plat_rtos.c index eb3e2f7..1e46e35 100644 --- a/Source/Port/Reference-Impl/mbedOS/RTOS/pal_plat_rtos.c +++ b/Source/Port/Reference-Impl/mbedOS/RTOS/pal_plat_rtos.c @@ -22,18 +22,25 @@ #include "string.h" #include "cmsis_os.h" // Revision: V1.02 -// these includes try to find declaration of NVIC_SystemReset -#include "cmsis_nvic.h" +// These includes try to find declaration of NVIC_SystemReset. +// Note: At least on A9 the cmsis_nvic.h can not be included without previous +// board specific includes, so it has to be included only when known to work. #if defined (__CORTEX_M0) +#include "cmsis_nvic.h" #include "core_cm0.h" #elif defined (__CORTEX_M3) +#include "cmsis_nvic.h" #include "core_cm3.h" #elif defined (__CORTEX_M4) +#include "cmsis_nvic.h" #include "core_cm4.h" #elif defined (__CORTEX_M7) +#include "cmsis_nvic.h" #include "core_cm7.h" #else -#error "unsupported CPU arch" +// Declaration of NVIC_SystemReset is not present on core_ca9.h, but in the +// board specific files. +void NVIC_SystemReset(void); #endif #include "critical.h"