xtensa: add support to build HAL as part of build process
This adds the necessary bits to build the Xtensa HAL as a module, and removes the bits to use the HAL built with the Zephyr SDK. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
250041f4c8
commit
b61f448a3f
|
@ -42,6 +42,7 @@ config XTENSA
|
|||
select HAS_DTS
|
||||
select USE_SWITCH
|
||||
select USE_SWITCH_SUPPORTED
|
||||
select XTENSA_HAL if "$(ZEPHYR_TOOLCHAIN_VARIANT)" != "xcc"
|
||||
|
||||
config ARCH_POSIX
|
||||
bool "POSIX (native) architecture"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <kernel_structs.h>
|
||||
#include <inttypes.h>
|
||||
#include <kernel_arch_data.h>
|
||||
#include <xtensa/specreg.h>
|
||||
#include <xtensa/config/specreg.h>
|
||||
#include <xtensa-asm2-context.h>
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(os);
|
||||
|
|
|
@ -18,16 +18,6 @@ set(SYSROOT_TARGET ${CROSS_COMPILE_TARGET})
|
|||
|
||||
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
|
||||
|
||||
if("${ARCH}" STREQUAL "xtensa")
|
||||
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
|
||||
set(TOOLCHAIN_INCLUDES
|
||||
${SYSROOT_DIR}/include/arch/include
|
||||
${SYSROOT_DIR}/include
|
||||
)
|
||||
|
||||
LIST(APPEND TOOLCHAIN_LIBS hal)
|
||||
LIST(APPEND LIB_INCLUDE_DIR -L${SYSROOT_DIR}/lib)
|
||||
endif()
|
||||
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
|
||||
|
||||
if("${ARCH}" STREQUAL "x86")
|
||||
|
|
|
@ -18,16 +18,6 @@ set(SYSROOT_TARGET ${CROSS_COMPILE_TARGET})
|
|||
|
||||
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
|
||||
|
||||
if("${ARCH}" STREQUAL "xtensa")
|
||||
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
|
||||
set(TOOLCHAIN_INCLUDES
|
||||
${SYSROOT_DIR}/include/arch/include
|
||||
${SYSROOT_DIR}/include
|
||||
)
|
||||
|
||||
LIST(APPEND TOOLCHAIN_LIBS hal)
|
||||
LIST(APPEND LIB_INCLUDE_DIR -L${SYSROOT_DIR}/lib)
|
||||
endif()
|
||||
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
|
||||
|
||||
if("${ARCH}" STREQUAL "x86")
|
||||
|
|
|
@ -13,13 +13,6 @@ set(SYSROOT_TARGET ${CROSS_COMPILE_TARGET})
|
|||
|
||||
if("${ARCH}" STREQUAL "xtensa")
|
||||
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/xtensa/${SOC_NAME}/${SYSROOT_TARGET})
|
||||
set(TOOLCHAIN_INCLUDES
|
||||
${SYSROOT_DIR}/include/arch/include
|
||||
${SYSROOT_DIR}/include
|
||||
)
|
||||
|
||||
LIST(APPEND TOOLCHAIN_LIBS hal)
|
||||
LIST(APPEND LIB_INCLUDE_DIR -L${SYSROOT_DIR}/lib)
|
||||
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/xtensa/${SOC_NAME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
|
||||
else()
|
||||
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
|
||||
|
|
8
modules/Kconfig.xtensa
Normal file
8
modules/Kconfig.xtensa
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Copyright (c) 2019 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config XTENSA_HAL
|
||||
bool
|
||||
help
|
||||
Build the Xtensa HAL module during build process.
|
||||
This is selected by the Xtensa ARCH kconfig automatically.
|
Loading…
Reference in a new issue