arch: arm: update compile options for DSP

This commit updates the compile options in cmake to distinguish
between ARMv8-M Mainline MCUs with or withouth the optional DSP
extension. A new Kconfig option: ARMV8_M_DSP, is introduced, to
signify the use of an ARMv8-M MCU with DSP support.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2018-06-29 11:41:28 +02:00 committed by Kumar Gala
commit 059952c8e1
3 changed files with 20 additions and 7 deletions

View file

@ -1,11 +1,12 @@
zephyr_cc_option_ifdef(CONFIG_LTO -flto)
set(ARCH_FOR_cortex-m0 armv6-m )
set(ARCH_FOR_cortex-m0plus armv6-m )
set(ARCH_FOR_cortex-m3 armv7-m )
set(ARCH_FOR_cortex-m4 armv7e-m )
set(ARCH_FOR_cortex-m23 armv8-m.base)
set(ARCH_FOR_cortex-m33 armv8-m.main)
set(ARCH_FOR_cortex-m0 armv6-m )
set(ARCH_FOR_cortex-m0plus armv6-m )
set(ARCH_FOR_cortex-m3 armv7-m )
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_property(GLOBAL PROPERTY E_KERNEL_ENTRY -e${CONFIG_KERNEL_ENTRY})

View file

@ -252,6 +252,14 @@ config ARMV7_M_ARMV8_M_FP
implementation, or the use of an ARMv8-M processor
implementation supporting the Floating-Point Extension.
config ARMV8_M_DSP
bool
# Omit prompt to signify "hidden" option
depends on ARMV8_M_MAINLINE
help
This option signifies the use of an ARMv8-M processor
implementation supporting the DSP Extension.
menu "ARM Cortex-M options"
depends on CPU_CORTEX_M

View file

@ -15,7 +15,11 @@ if("${ARCH}" STREQUAL "arm")
elseif(CONFIG_CPU_CORTEX_M23)
set(GCC_M_CPU cortex-m23)
elseif(CONFIG_CPU_CORTEX_M33)
set(GCC_M_CPU cortex-m33)
if (CONFIG_ARMV8_M_DSP)
set(GCC_M_CPU cortex-m33)
else()
set(GCC_M_CPU cortex-m33+nodsp)
endif()
else()
message(FATAL_ERROR "Expected CONFIG_CPU_CORTEX_x to be defined")
endif()