2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2017-10-27 21:43:34 +08:00
|
|
|
# Determines what argument to give to -mcpu= based on the
|
|
|
|
# KConfig'uration and sets this to GCC_M_CPU
|
|
|
|
|
|
|
|
if("${ARCH}" STREQUAL "arm")
|
|
|
|
if (CONFIG_CPU_CORTEX_M0)
|
|
|
|
set(GCC_M_CPU cortex-m0)
|
|
|
|
elseif(CONFIG_CPU_CORTEX_M0PLUS)
|
|
|
|
set(GCC_M_CPU cortex-m0plus)
|
2020-07-27 04:28:54 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_M1)
|
|
|
|
set(GCC_M_CPU cortex-m1)
|
2017-10-27 21:43:34 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_M3)
|
|
|
|
set(GCC_M_CPU cortex-m3)
|
|
|
|
elseif(CONFIG_CPU_CORTEX_M4)
|
|
|
|
set(GCC_M_CPU cortex-m4)
|
|
|
|
elseif(CONFIG_CPU_CORTEX_M7)
|
|
|
|
set(GCC_M_CPU cortex-m7)
|
|
|
|
elseif(CONFIG_CPU_CORTEX_M23)
|
|
|
|
set(GCC_M_CPU cortex-m23)
|
|
|
|
elseif(CONFIG_CPU_CORTEX_M33)
|
2018-06-29 17:41:28 +08:00
|
|
|
if (CONFIG_ARMV8_M_DSP)
|
|
|
|
set(GCC_M_CPU cortex-m33)
|
|
|
|
else()
|
|
|
|
set(GCC_M_CPU cortex-m33+nodsp)
|
|
|
|
endif()
|
2021-02-14 05:07:37 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_M55)
|
2021-08-15 02:52:02 +08:00
|
|
|
if (CONFIG_ARMV8_1_M_MVEF)
|
2021-02-14 05:07:37 +08:00
|
|
|
set(GCC_M_CPU cortex-m55)
|
2021-08-15 02:52:02 +08:00
|
|
|
elseif(CONFIG_ARMV8_1_M_MVEI)
|
|
|
|
set(GCC_M_CPU cortex-m55+nomve.fp)
|
|
|
|
elseif(CONFIG_ARMV8_M_DSP)
|
|
|
|
set(GCC_M_CPU cortex-m55+nomve)
|
2021-02-14 05:07:37 +08:00
|
|
|
else()
|
|
|
|
set(GCC_M_CPU cortex-m55+nodsp)
|
|
|
|
endif()
|
2019-08-05 20:32:07 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_R4)
|
2020-03-30 09:10:32 +08:00
|
|
|
if(CONFIG_FPU AND CONFIG_CPU_HAS_VFP)
|
|
|
|
set(GCC_M_CPU cortex-r4f)
|
|
|
|
else()
|
|
|
|
set(GCC_M_CPU cortex-r4)
|
|
|
|
endif()
|
2018-11-18 15:23:08 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_R5)
|
|
|
|
set(GCC_M_CPU cortex-r5)
|
2020-03-30 09:10:32 +08:00
|
|
|
if(CONFIG_FPU AND CONFIG_CPU_HAS_VFP)
|
|
|
|
if(NOT CONFIG_VFP_FEATURE_DOUBLE_PRECISION)
|
|
|
|
set(GCC_M_CPU ${GCC_M_CPU}+nofp.dp)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
set(GCC_M_CPU ${GCC_M_CPU}+nofp)
|
|
|
|
endif()
|
2021-01-12 18:02:11 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_R7)
|
|
|
|
set(GCC_M_CPU cortex-r7)
|
2020-03-30 09:10:32 +08:00
|
|
|
if(CONFIG_FPU AND CONFIG_CPU_HAS_VFP)
|
|
|
|
if(NOT CONFIG_VFP_FEATURE_DOUBLE_PRECISION)
|
|
|
|
set(GCC_M_CPU ${GCC_M_CPU}+nofp.dp)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
set(GCC_M_CPU ${GCC_M_CPU}+nofp)
|
|
|
|
endif()
|
2022-02-25 18:30:31 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_R52)
|
|
|
|
set(GCC_M_CPU cortex-r52)
|
2020-03-30 09:10:32 +08:00
|
|
|
if(CONFIG_FPU AND CONFIG_CPU_HAS_VFP)
|
|
|
|
if(NOT CONFIG_VFP_FEATURE_DOUBLE_PRECISION)
|
|
|
|
set(GCC_M_CPU ${GCC_M_CPU}+nofp.dp)
|
|
|
|
endif()
|
|
|
|
endif()
|
2021-07-15 17:17:40 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_A9)
|
|
|
|
set(GCC_M_CPU cortex-a9)
|
2021-03-25 18:56:15 +08:00
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Expected CONFIG_CPU_CORTEX_x to be defined")
|
|
|
|
endif()
|
|
|
|
elseif("${ARCH}" STREQUAL "arm64")
|
|
|
|
if(CONFIG_CPU_CORTEX_A53)
|
2019-11-11 01:06:13 +08:00
|
|
|
set(GCC_M_CPU cortex-a53)
|
2022-03-07 22:42:10 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_A55)
|
|
|
|
set(GCC_M_CPU cortex-a55)
|
2023-07-06 21:59:13 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_A76)
|
|
|
|
set(GCC_M_CPU cortex-a76)
|
|
|
|
elseif(CONFIG_CPU_CORTEX_A76_A55)
|
|
|
|
set(GCC_M_CPU cortex-a76)
|
|
|
|
set(GCC_M_TUNE cortex-a76.cortex-a55)
|
2020-04-09 19:14:52 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_A72)
|
|
|
|
set(GCC_M_CPU cortex-a72)
|
2020-11-16 15:08:23 +08:00
|
|
|
elseif(CONFIG_CPU_CORTEX_R82)
|
2022-03-15 17:55:41 +08:00
|
|
|
set(GCC_M_ARCH armv8.4-a+nolse)
|
2017-10-27 21:43:34 +08:00
|
|
|
endif()
|
|
|
|
elseif("${ARCH}" STREQUAL "arc")
|
2019-07-12 22:54:35 +08:00
|
|
|
if(CONFIG_CPU_EM4_FPUS)
|
2017-10-27 21:43:34 +08:00
|
|
|
set(GCC_M_CPU em4_fpus)
|
arch: arc: refactor the soc part of em_starterkit
The original em7d, em9d and em11d are different configurations of
em_starterkit. They have the same peripherals, e.g. uart, spi, gpio
, ddr. The differences of them are in arc core configurations, interrupt
number assignment.
So em7d, em9d and em11d can be viewed in the same SoC family or SoC
series.
Referring other arch's implementation, this commit merges em7d, em9d
and em11d into the same SoC, named snps_emsk. This will eliminate
unnecessary duplication and make it easier for future maintainment.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-04-28 10:10:15 +08:00
|
|
|
elseif(CONFIG_CPU_EM4_DMIPS)
|
2017-10-27 21:43:34 +08:00
|
|
|
set(GCC_M_CPU em4_dmips)
|
arch: arc: refactor the soc part of em_starterkit
The original em7d, em9d and em11d are different configurations of
em_starterkit. They have the same peripherals, e.g. uart, spi, gpio
, ddr. The differences of them are in arc core configurations, interrupt
number assignment.
So em7d, em9d and em11d can be viewed in the same SoC family or SoC
series.
Referring other arch's implementation, this commit merges em7d, em9d
and em11d into the same SoC, named snps_emsk. This will eliminate
unnecessary duplication and make it easier for future maintainment.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-04-28 10:10:15 +08:00
|
|
|
elseif(CONFIG_CPU_EM4_FPUDA)
|
2017-10-27 21:43:34 +08:00
|
|
|
set(GCC_M_CPU em4_fpuda)
|
2021-03-31 20:13:00 +08:00
|
|
|
elseif(CONFIG_CPU_HS3X)
|
2021-05-19 03:14:35 +08:00
|
|
|
set(GCC_M_CPU archs)
|
2022-08-23 18:33:27 +08:00
|
|
|
elseif(CONFIG_CPU_HS4X)
|
|
|
|
set(GCC_M_CPU hs4x)
|
2022-05-05 23:42:24 +08:00
|
|
|
elseif(CONFIG_CPU_HS5X)
|
|
|
|
set(GCC_M_CPU hs5x)
|
2021-03-31 05:48:35 +08:00
|
|
|
elseif(CONFIG_CPU_HS6X)
|
2022-03-23 17:45:44 +08:00
|
|
|
set(GCC_M_CPU hs6x)
|
2019-06-20 15:04:33 +08:00
|
|
|
elseif(CONFIG_CPU_EM4)
|
|
|
|
set(GCC_M_CPU arcem)
|
|
|
|
elseif(CONFIG_CPU_EM6)
|
|
|
|
set(GCC_M_CPU arcem)
|
2017-10-27 21:43:34 +08:00
|
|
|
endif()
|
|
|
|
endif()
|