Browse Source

arch: arm: Add Cortex-A7 support

Pass the correct -mfpu and -mcpu flags to the compiler when building
for the Cortex-A7.

Signed-off-by: Julien Racki <julien.racki@st.com>
pull/88161/head
Julien Racki 4 months ago committed by Benjamin Cabé
parent
commit
6d1cb00627
  1. 9
      arch/arm/core/cortex_a_r/Kconfig
  2. 2
      cmake/compiler/iar/iccarm-cpu.cmake
  3. 2
      cmake/gcc-m-cpu.cmake
  4. 4
      cmake/gcc-m-fpu.cmake
  5. 2
      subsys/mgmt/mcumgr/grp/os_mgmt/include/os_mgmt_processor.h

9
arch/arm/core/cortex_a_r/Kconfig

@ -13,6 +13,15 @@
# CPU_AARCH32_CORTEX_A / if CPU_AARCH32_CORTEX_R blocks so they are not # CPU_AARCH32_CORTEX_A / if CPU_AARCH32_CORTEX_R blocks so they are not
# exposed if one selects a different ARM Cortex Family (Cortex-M). # exposed if one selects a different ARM Cortex Family (Cortex-M).
config CPU_CORTEX_A7
bool
select CPU_AARCH32_CORTEX_A
select ARMV7_A
select CPU_HAS_ICACHE
select CPU_HAS_DCACHE
help
This option signifies the use of a Cortex-A7 CPU.
config CPU_CORTEX_A9 config CPU_CORTEX_A9
bool bool
select CPU_AARCH32_CORTEX_A select CPU_AARCH32_CORTEX_A

2
cmake/compiler/iar/iccarm-cpu.cmake

@ -67,6 +67,8 @@ if("${ARCH}" STREQUAL "arm")
set(ICCARM_CPU ${ICCARM_CPU}+fp.sp) set(ICCARM_CPU ${ICCARM_CPU}+fp.sp)
endif() endif()
endif() endif()
elseif(CONFIG_CPU_CORTEX_A7)
set(ICCARM_CPU Cortex-A7)
elseif(CONFIG_CPU_CORTEX_A9) elseif(CONFIG_CPU_CORTEX_A9)
set(ICCARM_CPU Cortex-A9) set(ICCARM_CPU Cortex-A9)
else() else()

2
cmake/gcc-m-cpu.cmake

@ -84,6 +84,8 @@ if("${ARCH}" STREQUAL "arm")
set(GCC_M_CPU ${GCC_M_CPU}+nofp.dp) set(GCC_M_CPU ${GCC_M_CPU}+nofp.dp)
endif() endif()
endif() endif()
elseif(CONFIG_CPU_CORTEX_A7)
set(GCC_M_CPU cortex-a7)
elseif(CONFIG_CPU_CORTEX_A9) elseif(CONFIG_CPU_CORTEX_A9)
set(GCC_M_CPU cortex-a9) set(GCC_M_CPU cortex-a9)
else() else()

4
cmake/gcc-m-fpu.cmake

@ -45,6 +45,10 @@ if("${ARCH}" STREQUAL "arm")
set(FPU_FOR_cortex-m85+nodsp auto) set(FPU_FOR_cortex-m85+nodsp auto)
set(GCC_M_FPU ${FPU_FOR_${GCC_M_CPU}}) set(GCC_M_FPU ${FPU_FOR_${GCC_M_CPU}})
elseif(CONFIG_CPU_AARCH32_CORTEX_A)
if(CONFIG_CPU_CORTEX_A7)
set(GCC_M_FPU vfpv4-d16)
endif()
endif() endif()
endif() endif()

2
subsys/mgmt/mcumgr/grp/os_mgmt/include/os_mgmt_processor.h

@ -103,6 +103,8 @@ extern "C" {
#else #else
#define PROCESSOR_NAME "cortex-r52" #define PROCESSOR_NAME "cortex-r52"
#endif #endif
#elif defined(CONFIG_CPU_CORTEX_A7)
#define PROCESSOR_NAME "cortex-a7"
#elif defined(CONFIG_CPU_CORTEX_A9) #elif defined(CONFIG_CPU_CORTEX_A9)
#define PROCESSOR_NAME "cortex-a9" #define PROCESSOR_NAME "cortex-a9"
#endif #endif

Loading…
Cancel
Save