modules: hal_nxp: mcux-sdk-ng: Fix LPC55S16 build error
Fix build error when CONFIG_MCUX_COMPONENT_driver.fro_calib is set. Error message: modules/hal/nxp/mcux/mcux-sdk-ng/cmake/extension/function.cmake:2084 (if) if given arguments: "IN_LIST" "NEED_WRAP_TOOLCHAINS" The error is because, mcux sdk ng cmake functions `mcux_add_xxx` support add content based on toolchains. CMake should set current toolchain in CMake Variable `CONFIG_TOOLCHAIN` to use this feature. Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
This commit is contained in:
parent
ac0bf59b5b
commit
c387d9c73d
2 changed files with 21 additions and 0 deletions
|
@ -20,3 +20,21 @@ function(set_variable_ifdef feature_toggle variable)
|
|||
set(${variable} ON PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# mcux sdk ng cmake functions `mcux_add_xxx` support add content based on
|
||||
# toolchains, like
|
||||
#
|
||||
# mcux_add_library(
|
||||
# LIBS ../iar/iar_lib_fro_calib_cm33_core0.a
|
||||
# TOOLCHAINS iar
|
||||
# )
|
||||
#
|
||||
# CMake should set current toolchain in CMake Variable
|
||||
# `CONFIG_TOOLCHAIN` to use this feature.
|
||||
if (${COMPILER} STREQUAL iar)
|
||||
set(CONFIG_TOOLCHAIN iar)
|
||||
elseif (${COMPILER} STREQUAL xcc)
|
||||
set(CONFIG_TOOLCHAIN xtensa)
|
||||
else ()
|
||||
set(CONFIG_TOOLCHAIN armgcc)
|
||||
endif()
|
||||
|
|
|
@ -1137,6 +1137,9 @@ flagged.
|
|||
"STACK_SIZE", # Used as an example in the Kconfig docs
|
||||
"STD_CPP", # Referenced in CMake comment
|
||||
"TEST1",
|
||||
"TOOLCHAIN", # Defined in modules/hal_nxp/mcux/mcux-sdk-ng/basic.cmake.
|
||||
# It is used by MCUX SDK cmake functions to add content
|
||||
# based on current toolchain.
|
||||
"TOOLCHAIN_ARCMWDT_SUPPORTS_THREAD_LOCAL_STORAGE", # The symbol is defined in the toolchain
|
||||
# Kconfig which is sourced based on Zephyr
|
||||
# toolchain variant and therefore not visible
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue