1# 2# Copyright (c) 2021 Linaro, Limited 3# Copyright 2024 NXP 4# 5# SPDX-License-Identifier: Apache-2.0 6# 7 8if(CONFIG_HAS_MCUX OR CONFIG_HAS_IMX_HAL OR CONFIG_HAS_NXP_S32_HAL) 9 add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR} hal_nxp) 10 add_subdirectory_ifdef(CONFIG_USB_DEVICE_DRIVER usb) 11 add_subdirectory_ifdef(CONFIG_UDC_DRIVER usb) 12 13 zephyr_sources_ifdef(CONFIG_PWM_MCUX_CTIMER ${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/ctimer/fsl_ctimer.c) 14 zephyr_include_directories_ifdef(CONFIG_PWM_MCUX_CTIMER 15 ${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/ctimer/) 16 zephyr_include_directories(.) 17 18 zephyr_compile_definitions_ifdef(CONFIG_CAN_MCUX_FLEXCAN 19 FLEXCAN_WAIT_TIMEOUT=${CONFIG_CAN_MCUX_FLEXCAN_WAIT_TIMEOUT}) 20 21 if(CONFIG_CPU_HAS_DCACHE) 22 zephyr_compile_definitions_ifdef(CONFIG_ENTROPY_MCUX_CAAM CACHE_MODE_WRITE_THROUGH) 23 endif() 24 25 if(CONFIG_NOCACHE_MEMORY) 26 zephyr_compile_definitions_ifdef(CONFIG_USB_DEVICE_DRIVER DATA_SECTION_IS_CACHEABLE=1) 27 zephyr_compile_definitions_ifdef(CONFIG_UDC_DRIVER DATA_SECTION_IS_CACHEABLE=1) 28 endif() 29 30 zephyr_compile_definitions_ifdef(CONFIG_ETH_NXP_IMX_NETC FSL_ETH_ENABLE_CACHE_CONTROL=1) 31 32 add_subdirectory_ifdef(CONFIG_BT_H4_NXP_CTLR bt_controller) 33 34 if(CONFIG_I2S_MCUX_SAI) 35 zephyr_compile_definitions(MCUX_SDK_SAI_ALLOW_NULL_FIFO_WATERMARK=1) 36 endif() 37endif() 38