From b22eb6a30d8328333039fa33405a00ab6494b0d4 Mon Sep 17 00:00:00 2001 From: Yonatan Schachter Date: Fri, 29 Jul 2022 18:16:09 +0300 Subject: [PATCH] zephyr: Explicitly include cmsis.h main.c uses CMSIS functions such as __set_MSP, which require cmsis.h to be included. Up until now, that file was included indirectly through other ARM headers. This patch explicitly includes cmsis.h, for platforms on which those indirect includes do not work. Signed-off-by: Yonatan Schachter Signed-off-by: David Brown --- boot/zephyr/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c index 073f4d72..86c64327 100644 --- a/boot/zephyr/main.c +++ b/boot/zephyr/main.c @@ -27,6 +27,12 @@ #include #include +#if defined(CONFIG_CPU_AARCH32_CORTEX_A) || defined(CONFIG_CPU_AARCH32_CORTEX_R) +#include +#elif defined(CONFIG_CPU_CORTEX_M) +#include +#endif + #include "target.h" #include "bootutil/bootutil_log.h"