Fix CMSIS import with Zephyr 3.4+ (#2744)

Fixes the import path for CMSIS in Zephyr versions > 3.4.

See https://github.com/zephyrproject-rtos/zephyr/pull/59855 for more
information.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
This commit is contained in:
Daniel Mangum 2023-11-09 19:43:48 -08:00 committed by GitHub
parent 68b317c686
commit 314ecba388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,21 +42,23 @@
#include <net/net_ip.h>
#include <net/net_core.h>
#include <net/net_context.h>
#ifdef CONFIG_ARM_MPU
#include <arch/arm/aarch32/cortex_m/cmsis.h>
#endif
#else /* else of KERNEL_VERSION_NUMBER < 0x030200 */
#include <zephyr/net/net_pkt.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/net_ip.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_context.h>
#endif /* end of KERNEL_VERSION_NUMBER < 0x030200 */
#ifdef CONFIG_ARM_MPU
#if KERNEL_VERSION_NUMBER < 0x030200 /* version 3.2.0 */
#include <arch/arm/aarch32/cortex_m/cmsis.h>
#elif KERNEL_VERSION_NUMBER < 0x030400 /* version 3.4.0 */
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#else /* > 3.4.0 */
#include <cmsis_core.h>
#endif
#endif
#endif /* end of KERNEL_VERSION_NUMBER < 0x030200 */
#ifndef BH_PLATFORM_ZEPHYR
#define BH_PLATFORM_ZEPHYR