Skip to content
Permalink
Browse files

arch: arm: Add Cortex-R4 support

Pass the correct -march and -mcpu flags to the compiler when building
for the Cortex-R4.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
  • Loading branch information...
Bradley Bolen authored and ioannisg committed Aug 5, 2019
1 parent eb9515a commit e439cfdf388b703a8f922185e341b676902a76ab
Showing with 11 additions and 0 deletions.
  1. +1 −0 arch/arm/CMakeLists.txt
  2. +8 −0 arch/arm/core/cortex_r/Kconfig
  3. +2 −0 cmake/gcc-m-cpu.cmake
@@ -7,6 +7,7 @@ set(ARCH_FOR_cortex-m4 armv7e-m )
set(ARCH_FOR_cortex-m23 armv8-m.base )
set(ARCH_FOR_cortex-m33 armv8-m.main+dsp)
set(ARCH_FOR_cortex-m33+nodsp armv8-m.main )
set(ARCH_FOR_cortex-r4 armv7-r )

if(ARCH_FOR_${GCC_M_CPU})
set(ARCH_FLAG -march=${ARCH_FOR_${GCC_M_CPU}})
@@ -14,6 +14,14 @@
# if one selects a different ARM Cortex Family (Cortex-A or Cortex-M)


config CPU_CORTEX_R4
bool
select CPU_CORTEX_R
select ARMV7_R
select ARMV7_R_FP if CPU_HAS_FPU
help
This option signifies the use of a Cortex-R4 CPU

if CPU_CORTEX_R

config ARMV7_R
@@ -22,6 +22,8 @@ if("${ARCH}" STREQUAL "arm")
else()
set(GCC_M_CPU cortex-m33+nodsp)
endif()
elseif(CONFIG_CPU_CORTEX_R4)
set(GCC_M_CPU cortex-r4)
else()
message(FATAL_ERROR "Expected CONFIG_CPU_CORTEX_x to be defined")
endif()

0 comments on commit e439cfd

Please sign in to comment.
You can’t perform that action at this time.