cmake: work around sdk toolchain configuration for xtensa [REVERTME]

until we have this change in the SDK where we should not depend on
SOC_NAME but a new identifier.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2020-10-14 22:43:25 -04:00
commit 483b4ff030
2 changed files with 29 additions and 0 deletions

View file

@ -6,4 +6,29 @@ if(${SDK_VERSION} VERSION_LESS_EQUAL 0.11.2)
include(${CMAKE_CURRENT_LIST_DIR}/${SDK_MAJOR_MINOR}/target.cmake)
else()
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/target.cmake)
# Workaround, FIXME
if("${ARCH}" STREQUAL "xtensa")
if("${SOC_SERIES}" STREQUAL "cavs_v15")
set(SR_XT_TC_SOC intel_apl_adsp)
elseif("${SOC_SERIES}" STREQUAL "cavs_v18")
set(SR_XT_TC_SOC intel_s1000)
elseif("${SOC_SERIES}" STREQUAL "cavs_v20")
set(SR_XT_TC_SOC intel_s1000)
elseif("${SOC_SERIES}" STREQUAL "cavs_v25")
set(SR_XT_TC_SOC intel_s1000)
elseif("${SOC_SERIES}" STREQUAL "baytrail_adsp")
set(SR_XT_TC_SOC intel_byt_adsp)
elseif("${SOC_SERIES}" STREQUAL "broadwell_adsp")
set(SR_XT_TC_SOC intel_bdw_adsp)
elseif("${SOC_SERIES}" STREQUAL "intel_s1000")
set(SR_XT_TC_SOC intel_s1000)
elseif("${SOC_NAME}" STREQUAL "sample_controller")
set(SR_XT_TC_SOC sample_controller)
else()
message(FATAL_ERROR "No compiler set for SOC_SERIES ${SOC_SERIES}")
endif()
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/xtensa/${SR_XT_TC_SOC}/${SYSROOT_TARGET})
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/xtensa/${SR_XT_TC_SOC}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
endif()
endif()

View file

@ -8,6 +8,10 @@ if SOC_INTEL_S1000
config SOC
default "intel_s1000"
config SOC_SERIES
string
default "intel_s1000"
config IRQ_OFFLOAD_INTNUM
default 0