diff --git a/arch/arm/core/cortex_a_r/Kconfig b/arch/arm/core/cortex_a_r/Kconfig index 4095a277c61..2ee3c945644 100644 --- a/arch/arm/core/cortex_a_r/Kconfig +++ b/arch/arm/core/cortex_a_r/Kconfig @@ -93,6 +93,14 @@ config CPU_CORTEX_R7 help This option signifies the use of a Cortex-R7 CPU +config CPU_CORTEX_R8 + bool + select CPU_AARCH32_CORTEX_R + select ARMV7_R + select ARMV7_R_FP if CPU_HAS_FPU + help + This option signifies the use of a Cortex-R8 CPU + config CPU_CORTEX_R52 bool select CPU_AARCH32_CORTEX_R diff --git a/cmake/gcc-m-cpu.cmake b/cmake/gcc-m-cpu.cmake index 8cb777c4769..6f00283b6b8 100644 --- a/cmake/gcc-m-cpu.cmake +++ b/cmake/gcc-m-cpu.cmake @@ -68,6 +68,15 @@ if("${ARCH}" STREQUAL "arm") else() set(GCC_M_CPU ${GCC_M_CPU}+nofp) endif() + elseif(CONFIG_CPU_CORTEX_R8) + set(GCC_M_CPU cortex-r8) + if(CONFIG_FPU AND CONFIG_CPU_HAS_VFP) + if(NOT CONFIG_VFP_FEATURE_DOUBLE_PRECISION) + set(GCC_M_CPU ${GCC_M_CPU}+nofp.dp) + endif() + else() + set(GCC_M_CPU ${GCC_M_CPU}+nofp) + endif() elseif(CONFIG_CPU_CORTEX_R52) set(GCC_M_CPU cortex-r52) if(CONFIG_FPU AND CONFIG_CPU_HAS_VFP) diff --git a/cmake/gcc-m-fpu.cmake b/cmake/gcc-m-fpu.cmake index a25cdf05679..d1ce9655b46 100644 --- a/cmake/gcc-m-fpu.cmake +++ b/cmake/gcc-m-fpu.cmake @@ -7,7 +7,7 @@ if(CONFIG_FPU) if("${ARCH}" STREQUAL "arm") if(CONFIG_CPU_AARCH32_CORTEX_R) - if(CONFIG_CPU_CORTEX_R4 OR CONFIG_CPU_CORTEX_R5) # VFPv3 + if(CONFIG_CPU_CORTEX_R4 OR CONFIG_CPU_CORTEX_R5 OR CONFIG_CPU_CORTEX_R8) # VFPv3 if(CONFIG_VFP_FEATURE_DOUBLE_PRECISION) set(GCC_M_FPU vfpv3-d16) elseif(CONFIG_VFP_FEATURE_SINGLE_PRECISION) diff --git a/include/zephyr/arch/arm/cortex_a_r/mpu.h b/include/zephyr/arch/arm/cortex_a_r/mpu.h index e660247e4aa..896b73e20a2 100644 --- a/include/zephyr/arch/arm/cortex_a_r/mpu.h +++ b/include/zephyr/arch/arm/cortex_a_r/mpu.h @@ -32,7 +32,7 @@ #define MPU_RASR_B_Pos 0 #define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) -#if defined(CONFIG_CPU_CORTEX_R4) || defined(CONFIG_CPU_CORTEX_R5) +#if defined(CONFIG_CPU_CORTEX_R4) || defined(CONFIG_CPU_CORTEX_R5) || defined(CONFIG_CPU_CORTEX_R8) #define ARM_MPU_REGION_SIZE_32B ((uint8_t)0x04U) #define ARM_MPU_REGION_SIZE_64B ((uint8_t)0x05U) #define ARM_MPU_REGION_SIZE_128B ((uint8_t)0x06U) diff --git a/modules/cmsis/cmsis_core_a_r.h b/modules/cmsis/cmsis_core_a_r.h index 9f4514edb47..bef0f602813 100644 --- a/modules/cmsis/cmsis_core_a_r.h +++ b/modules/cmsis/cmsis_core_a_r.h @@ -46,6 +46,8 @@ extern "C" { #include #elif defined(CONFIG_CPU_CORTEX_R7) #include +#elif defined(CONFIG_CPU_CORTEX_R8) +#include #elif defined(CONFIG_CPU_CORTEX_R52) #include #elif defined(CONFIG_CPU_AARCH32_CORTEX_A) diff --git a/subsys/mgmt/mcumgr/grp/os_mgmt/include/os_mgmt_processor.h b/subsys/mgmt/mcumgr/grp/os_mgmt/include/os_mgmt_processor.h index 83b2f598735..71dfda7c193 100644 --- a/subsys/mgmt/mcumgr/grp/os_mgmt/include/os_mgmt_processor.h +++ b/subsys/mgmt/mcumgr/grp/os_mgmt/include/os_mgmt_processor.h @@ -83,6 +83,16 @@ extern "C" { #else #define PROCESSOR_NAME "cortex-r7+nofp" #endif +#elif defined(CONFIG_CPU_CORTEX_R8) +#if defined(CONFIG_FPU) && defined(CONFIG_CPU_HAS_VFP) +#if !defined(CONFIG_VFP_FEATURE_DOUBLE_PRECISION) +#define PROCESSOR_NAME "cortex-r8+nofp.dp" +#else +#define PROCESSOR_NAME "cortex-r8" +#endif +#else +#define PROCESSOR_NAME "cortex-r8+nofp" +#endif #elif defined(CONFIG_CPU_CORTEX_R52) #if defined(CONFIG_FPU) && defined(CONFIG_CPU_HAS_VFP) #if !defined(CONFIG_VFP_FEATURE_DOUBLE_PRECISION)