Skip to content

Commit b22eb6a

Browse files
yonschd3zd3z
authored andcommitted
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 <[email protected]> Signed-off-by: David Brown <[email protected]>
1 parent b8801fc commit b22eb6a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

boot/zephyr/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
#include <soc.h>
2828
#include <zephyr/linker/linker-defs.h>
2929

30+
#if defined(CONFIG_CPU_AARCH32_CORTEX_A) || defined(CONFIG_CPU_AARCH32_CORTEX_R)
31+
#include <zephyr/arch/arm/aarch32/cortex_a_r/cmsis.h>
32+
#elif defined(CONFIG_CPU_CORTEX_M)
33+
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
34+
#endif
35+
3036
#include "target.h"
3137

3238
#include "bootutil/bootutil_log.h"

0 commit comments

Comments
 (0)