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:
parent
a7e2c58af5
commit
059952c8e1
3 changed files with 20 additions and 7 deletions
|
|
@ -1,11 +1,12 @@
|
||||||
zephyr_cc_option_ifdef(CONFIG_LTO -flto)
|
zephyr_cc_option_ifdef(CONFIG_LTO -flto)
|
||||||
|
|
||||||
set(ARCH_FOR_cortex-m0 armv6-m )
|
set(ARCH_FOR_cortex-m0 armv6-m )
|
||||||
set(ARCH_FOR_cortex-m0plus armv6-m )
|
set(ARCH_FOR_cortex-m0plus armv6-m )
|
||||||
set(ARCH_FOR_cortex-m3 armv7-m )
|
set(ARCH_FOR_cortex-m3 armv7-m )
|
||||||
set(ARCH_FOR_cortex-m4 armv7e-m )
|
set(ARCH_FOR_cortex-m4 armv7e-m )
|
||||||
set(ARCH_FOR_cortex-m23 armv8-m.base)
|
set(ARCH_FOR_cortex-m23 armv8-m.base )
|
||||||
set(ARCH_FOR_cortex-m33 armv8-m.main)
|
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})
|
set_property(GLOBAL PROPERTY E_KERNEL_ENTRY -e${CONFIG_KERNEL_ENTRY})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -252,6 +252,14 @@ config ARMV7_M_ARMV8_M_FP
|
||||||
implementation, or the use of an ARMv8-M processor
|
implementation, or the use of an ARMv8-M processor
|
||||||
implementation supporting the Floating-Point Extension.
|
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"
|
menu "ARM Cortex-M options"
|
||||||
depends on CPU_CORTEX_M
|
depends on CPU_CORTEX_M
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,11 @@ if("${ARCH}" STREQUAL "arm")
|
||||||
elseif(CONFIG_CPU_CORTEX_M23)
|
elseif(CONFIG_CPU_CORTEX_M23)
|
||||||
set(GCC_M_CPU cortex-m23)
|
set(GCC_M_CPU cortex-m23)
|
||||||
elseif(CONFIG_CPU_CORTEX_M33)
|
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()
|
else()
|
||||||
message(FATAL_ERROR "Expected CONFIG_CPU_CORTEX_x to be defined")
|
message(FATAL_ERROR "Expected CONFIG_CPU_CORTEX_x to be defined")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue