Skip to content

Commit 402cb8f

Browse files
committed
Fix CMSIS import with Zephyr 3.4+
Fixes the import path for CMSIS in Zephyr versions > 3.4. See zephyrproject-rtos/zephyr#59855 for more information. Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
1 parent 68b317c commit 402cb8f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

core/shared/platform/zephyr/platform_internal.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,23 @@
4242
#include <net/net_ip.h>
4343
#include <net/net_core.h>
4444
#include <net/net_context.h>
45-
46-
#ifdef CONFIG_ARM_MPU
47-
#include <arch/arm/aarch32/cortex_m/cmsis.h>
48-
#endif
4945
#else /* else of KERNEL_VERSION_NUMBER < 0x030200 */
5046
#include <zephyr/net/net_pkt.h>
5147
#include <zephyr/net/net_if.h>
5248
#include <zephyr/net/net_ip.h>
5349
#include <zephyr/net/net_core.h>
5450
#include <zephyr/net/net_context.h>
51+
#endif /* end of KERNEL_VERSION_NUMBER < 0x030200 */
5552

5653
#ifdef CONFIG_ARM_MPU
54+
#if KERNEL_VERSION_NUMBER < 0x030200 /* version 3.2.0 */
55+
#include <arch/arm/aarch32/cortex_m/cmsis.h>
56+
#elif KERNEL_VERSION_NUMBER < 0x030400 /* version 3.4.0 */
5757
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
58+
#else /* > 3.4.0 */
59+
#include <cmsis_core.h>
60+
#endif
5861
#endif
59-
#endif /* end of KERNEL_VERSION_NUMBER < 0x030200 */
6062

6163
#ifndef BH_PLATFORM_ZEPHYR
6264
#define BH_PLATFORM_ZEPHYR

0 commit comments

Comments
 (0)