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>
This commit is contained in:
Bradley Bolen 2019-08-05 08:32:07 -04:00 committed by Ioannis Glaropoulos
parent eb9515ab9c
commit e439cfdf38
3 changed files with 11 additions and 0 deletions

View file

@ -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}})

View file

@ -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

View file

@ -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()