cmake: Fix uses of old SOC path
In quite a few places in the cmake files
${SOC_DIR}/${ARCH}/${SOC_PATH}
was used to get to something in the soc folder,
but these are only defined for soc_v1.
socv2 defines a full SOC_V2_DIR.
Let's define a common variable for the full path which
can be used in other cmake files,
and correct the current uses.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
committed by
Carles Cufi
parent
d517d3cc24
commit
95e06e8663
@@ -118,7 +118,7 @@ zephyr_include_directories(
|
||||
|
||||
include(${ZEPHYR_BASE}/cmake/linker_script/${ARCH}/linker.cmake OPTIONAL)
|
||||
|
||||
zephyr_include_directories(${SOC_DIR}/${ARCH}/${SOC_PATH})
|
||||
zephyr_include_directories(${SOC_FULL_DIR})
|
||||
|
||||
# Don't inherit compiler flags from the environment
|
||||
foreach(var AFLAGS CFLAGS CXXFLAGS CPPFLAGS LDFLAGS)
|
||||
|
||||
@@ -53,7 +53,7 @@ file(WRITE ${CORE_ISA_IN} "#include <xtensa/config/core-isa.h>\n")
|
||||
add_custom_command(OUTPUT ${CORE_ISA_DM}
|
||||
COMMAND ${CMAKE_C_COMPILER} -E -dM -U__XCC__
|
||||
-I${ZEPHYR_XTENSA_MODULE_DIR}/zephyr/soc/${CONFIG_SOC}
|
||||
-I${SOC_DIR}/${ARCH}/${SOC_PATH}
|
||||
-I${SOC_FULL_DIR}
|
||||
${CORE_ISA_IN} -o ${CORE_ISA_DM})
|
||||
|
||||
# Generates a list of device-specific scratch register choices
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(EXISTS ${SOC_DIR}/${ARCH}/${SOC_PATH}/tune_build_ops.cmake)
|
||||
include(${SOC_DIR}/${ARCH}/${SOC_PATH}/tune_build_ops.cmake)
|
||||
if(EXISTS ${SOC_FULL_DIR}/tune_build_ops.cmake)
|
||||
include(${SOC_FULL_DIR}/tune_build_ops.cmake)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED GCC_ARC_TUNED_CPU)
|
||||
|
||||
@@ -112,7 +112,7 @@ if("SEARCHED_LINKER_SCRIPT" IN_LIST Deprecated_FIND_COMPONENTS)
|
||||
set(LINKER_SCRIPT ${BOARD_DIR}/linker.ld)
|
||||
if(NOT EXISTS ${LINKER_SCRIPT})
|
||||
# If not available, try an SoC specific linker file
|
||||
set(LINKER_SCRIPT ${SOC_DIR}/${ARCH}/${SOC_PATH}/linker.ld)
|
||||
set(LINKER_SCRIPT ${SOC_FULL_DIR}/linker.ld)
|
||||
endif()
|
||||
message(DEPRECATION
|
||||
"Pre-defined `linker.ld` script is deprecated. Please set "
|
||||
|
||||
@@ -73,4 +73,6 @@ if(HWMv1)
|
||||
"${SOC_ROOT}\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(SOC_FULL_DIR ${SOC_DIR}/${ARCH}/${SOC_PATH})
|
||||
endif()
|
||||
|
||||
@@ -27,4 +27,5 @@ if(HWMv2)
|
||||
set(SOC_TOOLCHAIN_NAME ${CONFIG_SOC_TOOLCHAIN_NAME})
|
||||
set(SOC_FAMILY ${CONFIG_SOC_FAMILY})
|
||||
set(SOC_V2_DIR ${SOC_${SOC_NAME}_DIR})
|
||||
set(SOC_FULL_DIR ${SOC_V2_DIR})
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user