modules: cmsis: move glue code to modules/cmsis

The CMSIS module glue code was part of arch/ directory. Move it to
modules/cmsis, and provide a single entry point for it: cmsis_core.h.
This entry header will include the right CMSIS header (M or A/R).

To make this change possible, CMSIS module Kconfig/CMake are declared as
external, allowing us to add a new Zephyr include directory.

All files including CMSIS have been updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2023-06-29 18:22:37 +02:00 committed by Carles Cufí
commit 9c961571a2
111 changed files with 173 additions and 119 deletions

View file

@ -11,10 +11,11 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/linker/linker-defs.h>
#include <string.h>
#include <cmsis_core.h>
/**
* @brief Perform basic hardware initialization at boot.
*

View file

@ -12,10 +12,11 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <stm32_ll_system.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/linker/linker-defs.h>
#include <string.h>
#include <cmsis_core.h>
#if defined(CONFIG_SW_VECTOR_RELAY) || defined(CONFIG_SW_VECTOR_RELAY_CLIENT)
extern void *_vector_table_pointer;
#endif

View file

@ -11,7 +11,8 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <cmsis_core.h>
/**
* @brief Perform basic hardware initialization at boot.

View file

@ -13,11 +13,12 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <soc.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <stm32_ll_system.h>
#include <zephyr/linker/linker-defs.h>
#include <string.h>
#include <cmsis_core.h>
/**
* @brief Perform basic hardware initialization at boot.
*

View file

@ -12,7 +12,8 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <stm32_ll_system.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <cmsis_core.h>
/**
* @brief Perform basic hardware initialization at boot.

View file

@ -12,8 +12,8 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <cmsis_core.h>
#include <stm32_ll_system.h>
/**

View file

@ -13,7 +13,8 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <soc.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <cmsis_core.h>
#include <stm32_ll_system.h>
/**

View file

@ -12,9 +12,10 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/linker/linker-defs.h>
#include <string.h>
#include <cmsis_core.h>
#if defined(SYSCFG_CFGR1_UCPD1_STROBE) || defined(SYSCFG_CFGR1_UCPD2_STROBE)
#include <stm32_ll_system.h>
#include <stm32_ll_bus.h>

View file

@ -12,8 +12,8 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <stm32_ll_system.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <cmsis_core.h>
#if defined(PWR_CR3_UCPD_DBDIS)
#include <stm32_ll_bus.h>
#include <stm32_ll_pwr.h>

View file

@ -14,9 +14,10 @@
#include <stm32_ll_bus.h>
#include <stm32_ll_pwr.h>
#include <stm32_ll_icache.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/logging/log.h>
#include <cmsis_core.h>
#define LOG_LEVEL CONFIG_SOC_LOG_LEVEL
LOG_MODULE_REGISTER(soc);

View file

@ -18,9 +18,10 @@
#include <stm32_ll_pwr.h>
#include <stm32_ll_rcc.h>
#include <stm32_ll_system.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include "stm32_hsem.h"
#include <cmsis_core.h>
/**
* @brief Perform basic hardware initialization at boot.
*

View file

@ -17,9 +17,10 @@
#include <stm32_ll_pwr.h>
#include <stm32_ll_rcc.h>
#include <stm32_ll_system.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include "stm32_hsem.h"
#include <cmsis_core.h>
#if defined(CONFIG_STM32H7_DUAL_CORE)
static int stm32h7_m4_wakeup(void)
{

View file

@ -11,13 +11,14 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/linker/linker-defs.h>
#include <string.h>
#include <stm32_ll_bus.h>
#include <stm32_ll_pwr.h>
#include <stm32_ll_bus.h>
#include <cmsis_core.h>
/**
* @brief Perform basic hardware initialization at boot.
*

View file

@ -11,12 +11,13 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/linker/linker-defs.h>
#include <string.h>
#include <stm32_ll_bus.h>
#include <stm32_ll_pwr.h>
#include <cmsis_core.h>
/**
* @brief Perform basic hardware initialization at boot.
*

View file

@ -12,9 +12,10 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/logging/log.h>
#include <cmsis_core.h>
#define LOG_LEVEL CONFIG_SOC_LOG_LEVEL
LOG_MODULE_REGISTER(soc);

View file

@ -13,10 +13,11 @@
#include <zephyr/init.h>
#include <stm32_ll_bus.h>
#include <stm32_ll_pwr.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <stm32l5xx_ll_icache.h>
#include <zephyr/logging/log.h>
#include <cmsis_core.h>
#define LOG_LEVEL CONFIG_SOC_LOG_LEVEL
LOG_MODULE_REGISTER(soc);

View file

@ -14,7 +14,8 @@
#include <zephyr/init.h>
#include <soc.h>
#include <stm32_ll_bus.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <cmsis_core.h>
/**
* @brief Perform basic hardware initialization at boot.

View file

@ -14,9 +14,10 @@
#include <stm32_ll_bus.h>
#include <stm32_ll_pwr.h>
#include <stm32_ll_icache.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/logging/log.h>
#include <cmsis_core.h>
#define LOG_LEVEL CONFIG_SOC_LOG_LEVEL
LOG_MODULE_REGISTER(soc);

View file

@ -11,9 +11,10 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/logging/log.h>
#include <cmsis_core.h>
#define LOG_LEVEL CONFIG_SOC_LOG_LEVEL
LOG_MODULE_REGISTER(soc);

View file

@ -16,10 +16,10 @@
#include <stm32_ll_icache.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/irq.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/logging/log.h>
#include <cmsis_core.h>
#define LOG_LEVEL CONFIG_SOC_LOG_LEVEL
LOG_MODULE_REGISTER(soc);

View file

@ -11,12 +11,13 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <stm32wlxx_ll_system.h>
#include <zephyr/logging/log.h>
#include <cmsis_core.h>
#define LOG_LEVEL CONFIG_SOC_LOG_LEVEL
LOG_MODULE_REGISTER(soc);