modules: hal_nxp: Move hal_nxp glue layer to zephyr repo
Move hal_nxp glue layer to zephyr repo. Fix build warnings and failures caused by hal_nxp upgrade. Update manifest to contain hal_nxp changes. Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
This commit is contained in:
parent
916897f59e
commit
7ed7cd191a
48 changed files with 1394 additions and 69 deletions
|
@ -5006,9 +5006,6 @@ West:
|
||||||
- bperseghetti
|
- bperseghetti
|
||||||
files:
|
files:
|
||||||
- modules/hal_nxp/
|
- modules/hal_nxp/
|
||||||
- modules/Kconfig.imx
|
|
||||||
- modules/Kconfig.mcux
|
|
||||||
- modules/Kconfig.nxp_s32
|
|
||||||
labels:
|
labels:
|
||||||
- "platform: NXP"
|
- "platform: NXP"
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
zephyr_compile_definitions(XIP_BOOT_HEADER_ENABLE=1)
|
zephyr_compile_definitions(XIP_BOOT_HEADER_ENABLE=1)
|
||||||
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
|
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
|
||||||
set(RT1010_BOARD_DIR
|
set(RT1010_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1010")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt1010")
|
||||||
zephyr_library_sources(${RT1010_BOARD_DIR}/xip/evkmimxrt1010_flexspi_nor_config.c)
|
zephyr_library_sources(${RT1010_BOARD_DIR}/xip/evkmimxrt1010_flexspi_nor_config.c)
|
||||||
zephyr_library_include_directories(${RT1010_BOARD_DIR}/xip)
|
zephyr_library_include_directories(${RT1010_BOARD_DIR}/xip)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -19,7 +19,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
zephyr_compile_definitions(XIP_BOOT_HEADER_ENABLE=1)
|
zephyr_compile_definitions(XIP_BOOT_HEADER_ENABLE=1)
|
||||||
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
|
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
|
||||||
set(RT1015_BOARD_DIR
|
set(RT1015_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1015")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt1015")
|
||||||
zephyr_library_sources(${RT1015_BOARD_DIR}/xip/evkmimxrt1015_flexspi_nor_config.c)
|
zephyr_library_sources(${RT1015_BOARD_DIR}/xip/evkmimxrt1015_flexspi_nor_config.c)
|
||||||
zephyr_library_include_directories(${RT1015_BOARD_DIR}/xip)
|
zephyr_library_include_directories(${RT1015_BOARD_DIR}/xip)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -13,7 +13,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
"update your flash configuration or device configuration data blocks")
|
"update your flash configuration or device configuration data blocks")
|
||||||
endif()
|
endif()
|
||||||
set(RT1020_BOARD_DIR
|
set(RT1020_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1020")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt1020")
|
||||||
if(CONFIG_BOOT_FLEXSPI_NOR)
|
if(CONFIG_BOOT_FLEXSPI_NOR)
|
||||||
# Include flash configuration block for RT1020 EVK from NXP's HAL.
|
# Include flash configuration block for RT1020 EVK from NXP's HAL.
|
||||||
# This configuration block may need modification if another flash chip is
|
# This configuration block may need modification if another flash chip is
|
||||||
|
|
|
@ -13,7 +13,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
"update your flash configuration or device configuration data blocks")
|
"update your flash configuration or device configuration data blocks")
|
||||||
endif()
|
endif()
|
||||||
set(RT1024_BOARD_DIR
|
set(RT1024_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1024")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt1024")
|
||||||
if(CONFIG_BOOT_FLEXSPI_NOR)
|
if(CONFIG_BOOT_FLEXSPI_NOR)
|
||||||
# Include flash configuration block for RT1024 EVK from NXP's HAL.
|
# Include flash configuration block for RT1024 EVK from NXP's HAL.
|
||||||
# This configuration block may need modification if another flash chip is
|
# This configuration block may need modification if another flash chip is
|
||||||
|
|
|
@ -18,7 +18,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
"update your flash configuration or device configuration data blocks")
|
"update your flash configuration or device configuration data blocks")
|
||||||
endif()
|
endif()
|
||||||
set(RT1040_BOARD_DIR
|
set(RT1040_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1040")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt1040")
|
||||||
if(CONFIG_BOOT_FLEXSPI_NOR)
|
if(CONFIG_BOOT_FLEXSPI_NOR)
|
||||||
# Include flash configuration block for RT1040 EVK from NXP's HAL.
|
# Include flash configuration block for RT1040 EVK from NXP's HAL.
|
||||||
# This configuration block may need modification if another flash chip is
|
# This configuration block may need modification if another flash chip is
|
||||||
|
|
|
@ -24,7 +24,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
set(FLASH_CONF evkbimxrt1050_flexspi_nor_config.c)
|
set(FLASH_CONF evkbimxrt1050_flexspi_nor_config.c)
|
||||||
endif()
|
endif()
|
||||||
set(RT1050_BOARD_DIR
|
set(RT1050_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkbimxrt1050")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkbimxrt1050")
|
||||||
if(CONFIG_BOOT_FLEXSPI_NOR)
|
if(CONFIG_BOOT_FLEXSPI_NOR)
|
||||||
# Include flash configuration block for RT1050 EVK from NXP's HAL.
|
# Include flash configuration block for RT1050 EVK from NXP's HAL.
|
||||||
# This configuration block may need modification if another flash chip is
|
# This configuration block may need modification if another flash chip is
|
||||||
|
|
|
@ -33,7 +33,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
set(BOARD_NAME evkbmimxrt1060)
|
set(BOARD_NAME evkbmimxrt1060)
|
||||||
endif()
|
endif()
|
||||||
set(RT1060_BOARD_DIR
|
set(RT1060_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/${BOARD_NAME}")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/${BOARD_NAME}")
|
||||||
if(CONFIG_BOOT_FLEXSPI_NOR)
|
if(CONFIG_BOOT_FLEXSPI_NOR)
|
||||||
# Include flash configuration block for RT1060 EVK from NXP's HAL.
|
# Include flash configuration block for RT1060 EVK from NXP's HAL.
|
||||||
# This configuration block may need modification if another flash chip is
|
# This configuration block may need modification if another flash chip is
|
||||||
|
|
|
@ -14,7 +14,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
set(BOARD_NAME evkbimxrt1050)
|
set(BOARD_NAME evkbimxrt1050)
|
||||||
endif()
|
endif()
|
||||||
set(RT1062_BOARD_DIR
|
set(RT1062_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/${BOARD_NAME}")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/${BOARD_NAME}")
|
||||||
if(CONFIG_BOOT_FLEXSPI_NOR)
|
if(CONFIG_BOOT_FLEXSPI_NOR)
|
||||||
# Include flash configuration block for RT1050 EVK from NXP's HAL.
|
# Include flash configuration block for RT1050 EVK from NXP's HAL.
|
||||||
# This configuration block may need modification if another flash chip is
|
# This configuration block may need modification if another flash chip is
|
||||||
|
|
|
@ -18,7 +18,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
"update your flash configuration or device configuration data blocks")
|
"update your flash configuration or device configuration data blocks")
|
||||||
endif()
|
endif()
|
||||||
set(RT1064_BOARD_DIR
|
set(RT1064_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1064")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt1064")
|
||||||
if(CONFIG_BOOT_FLEXSPI_NOR)
|
if(CONFIG_BOOT_FLEXSPI_NOR)
|
||||||
# Include flash configuration block for RT1064 EVK from NXP's HAL.
|
# Include flash configuration block for RT1064 EVK from NXP's HAL.
|
||||||
# This configuration block may need modification if another flash chip is
|
# This configuration block may need modification if another flash chip is
|
||||||
|
|
|
@ -13,7 +13,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
"update your flash configuration or device configuration data blocks")
|
"update your flash configuration or device configuration data blocks")
|
||||||
endif()
|
endif()
|
||||||
set(RT1160_BOARD_DIR
|
set(RT1160_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1160")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt1160")
|
||||||
if(CONFIG_BOOT_FLEXSPI_NOR)
|
if(CONFIG_BOOT_FLEXSPI_NOR)
|
||||||
# Include flash configuration block for RT1160 EVK from NXP's HAL.
|
# Include flash configuration block for RT1160 EVK from NXP's HAL.
|
||||||
# This configuration block may need modification if another flash chip is
|
# This configuration block may need modification if another flash chip is
|
||||||
|
|
|
@ -18,7 +18,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
set(RT1170_BOARD_NAME "evkbmimxrt1170")
|
set(RT1170_BOARD_NAME "evkbmimxrt1170")
|
||||||
endif()
|
endif()
|
||||||
set(RT1170_BOARD_DIR
|
set(RT1170_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/${RT1170_BOARD_NAME}")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/${RT1170_BOARD_NAME}")
|
||||||
if(CONFIG_BOOT_FLEXSPI_NOR)
|
if(CONFIG_BOOT_FLEXSPI_NOR)
|
||||||
# Include flash configuration block for RT1170 EVK from NXP's HAL.
|
# Include flash configuration block for RT1170 EVK from NXP's HAL.
|
||||||
# This configuration block may need modification if another flash chip is
|
# This configuration block may need modification if another flash chip is
|
||||||
|
|
|
@ -15,7 +15,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
"update your flash configuration or device configuration data blocks")
|
"update your flash configuration or device configuration data blocks")
|
||||||
endif()
|
endif()
|
||||||
set(RT1180_BOARD_DIR
|
set(RT1180_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1180")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt1180")
|
||||||
if(CONFIG_BOOT_FLEXSPI_NOR)
|
if(CONFIG_BOOT_FLEXSPI_NOR)
|
||||||
# Include flash configuration block for RT1180 EVK from NXP's HAL.
|
# Include flash configuration block for RT1180 EVK from NXP's HAL.
|
||||||
# This configuration block may need modification if another flash chip is
|
# This configuration block may need modification if another flash chip is
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
set(RT1180_BOARD_DIR
|
set(RT1180_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1180")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt1180")
|
||||||
# Note1: Suggest developers use Secure Provisioning Tool(SPT) to download RT1180 image
|
# Note1: Suggest developers use Secure Provisioning Tool(SPT) to download RT1180 image
|
||||||
# SPT can be downloaded on NXP web: https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-secure-provisioning-tool:MCUXPRESSO-SECURE-PROVISIONING
|
# SPT can be downloaded on NXP web: https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-secure-provisioning-tool:MCUXPRESSO-SECURE-PROVISIONING
|
||||||
# Details about the usage of SPT on MIMXRT1180-EVK board can be referred on chapter 7 of getting start with Mcuxpresso SDK for MIMXRT1180-EVK doc in SDK package.
|
# Details about the usage of SPT on MIMXRT1180-EVK board can be referred on chapter 7 of getting start with Mcuxpresso SDK for MIMXRT1180-EVK doc in SDK package.
|
||||||
|
|
|
@ -22,7 +22,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
zephyr_compile_definitions(BOOT_HEADER_ENABLE=1)
|
zephyr_compile_definitions(BOOT_HEADER_ENABLE=1)
|
||||||
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
|
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
|
||||||
set(RT595_BOARD_DIR
|
set(RT595_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt595")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt595")
|
||||||
zephyr_library_sources(${RT595_BOARD_DIR}/flash_config/flash_config.c)
|
zephyr_library_sources(${RT595_BOARD_DIR}/flash_config/flash_config.c)
|
||||||
zephyr_library_include_directories(${RT595_BOARD_DIR}/flash_config)
|
zephyr_library_include_directories(${RT595_BOARD_DIR}/flash_config)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -21,7 +21,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
zephyr_compile_definitions(BOOT_HEADER_ENABLE=1)
|
zephyr_compile_definitions(BOOT_HEADER_ENABLE=1)
|
||||||
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
|
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
|
||||||
set(RT685_BOARD_DIR
|
set(RT685_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt685")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt685")
|
||||||
zephyr_library_sources(${RT685_BOARD_DIR}/flash_config/flash_config.c)
|
zephyr_library_sources(${RT685_BOARD_DIR}/flash_config/flash_config.c)
|
||||||
zephyr_library_include_directories(${RT685_BOARD_DIR}/flash_config)
|
zephyr_library_include_directories(${RT685_BOARD_DIR}/flash_config)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -22,7 +22,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
zephyr_compile_definitions(BOOT_HEADER_ENABLE=1)
|
zephyr_compile_definitions(BOOT_HEADER_ENABLE=1)
|
||||||
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
|
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
|
||||||
set(RT7XX_BOARD_DIR
|
set(RT7XX_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/mimxrt700evk")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/mimxrt700evk")
|
||||||
zephyr_library_sources(${RT7XX_BOARD_DIR}/flash_config/flash_config.c)
|
zephyr_library_sources(${RT7XX_BOARD_DIR}/flash_config/flash_config.c)
|
||||||
zephyr_library_include_directories(${RT7XX_BOARD_DIR}/flash_config)
|
zephyr_library_include_directories(${RT7XX_BOARD_DIR}/flash_config)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
if(CONFIG_NXP_IMXRT_BOOT_HEADER)
|
||||||
zephyr_library()
|
zephyr_library()
|
||||||
set(RT1170_BOARD_DIR
|
set(RT1170_BOARD_DIR
|
||||||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1170")
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/evkmimxrt1170")
|
||||||
if(CONFIG_BOOT_FLEXSPI_NOR)
|
if(CONFIG_BOOT_FLEXSPI_NOR)
|
||||||
# Include flash configuration block for RT1170 EVK from NXP's HAL.
|
# Include flash configuration block for RT1170 EVK from NXP's HAL.
|
||||||
# This configuration block may need modification if another flash chip is
|
# This configuration block may need modification if another flash chip is
|
||||||
|
|
|
@ -6,4 +6,3 @@ config COMPARATOR_MCUX_ACMP
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_NXP_KINETIS_ACMP_ENABLED
|
depends on DT_HAS_NXP_KINETIS_ACMP_ENABLED
|
||||||
select PINCTRL
|
select PINCTRL
|
||||||
select MCUX_ACMP
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2023 NXP
|
* Copyright 2023, 2025 NXP
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
@ -13,7 +13,6 @@
|
||||||
#include <soc.h>
|
#include <soc.h>
|
||||||
#include <fsl_smartdma.h>
|
#include <fsl_smartdma.h>
|
||||||
#include <fsl_inputmux.h>
|
#include <fsl_inputmux.h>
|
||||||
#include <fsl_power.h>
|
|
||||||
|
|
||||||
#define DT_DRV_COMPAT nxp_smartdma
|
#define DT_DRV_COMPAT nxp_smartdma
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ config SENSOR_MCUX_ACMP
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_NXP_KINETIS_ACMP_ENABLED
|
depends on DT_HAS_NXP_KINETIS_ACMP_ENABLED
|
||||||
select PINCTRL
|
select PINCTRL
|
||||||
select MCUX_ACMP
|
|
||||||
help
|
help
|
||||||
Enable driver for the NXP MCUX Analog Comparator (ACMP).
|
Enable driver for the NXP MCUX Analog Comparator (ACMP).
|
||||||
|
|
||||||
|
|
|
@ -26,16 +26,13 @@ source "modules/Kconfig.chre"
|
||||||
source "modules/Kconfig.cypress"
|
source "modules/Kconfig.cypress"
|
||||||
source "modules/Kconfig.eos_s3"
|
source "modules/Kconfig.eos_s3"
|
||||||
source "modules/Kconfig.esp32"
|
source "modules/Kconfig.esp32"
|
||||||
source "modules/Kconfig.imx"
|
|
||||||
source "modules/Kconfig.infineon"
|
source "modules/Kconfig.infineon"
|
||||||
source "modules/Kconfig.libmetal"
|
source "modules/Kconfig.libmetal"
|
||||||
source "modules/lvgl/Kconfig"
|
source "modules/lvgl/Kconfig"
|
||||||
source "modules/Kconfig.mcux"
|
|
||||||
source "modules/Kconfig.microchip"
|
source "modules/Kconfig.microchip"
|
||||||
source "modules/Kconfig.nuvoton"
|
source "modules/Kconfig.nuvoton"
|
||||||
source "modules/Kconfig.open-amp"
|
source "modules/Kconfig.open-amp"
|
||||||
source "modules/Kconfig.picolibc"
|
source "modules/Kconfig.picolibc"
|
||||||
source "modules/Kconfig.nxp_s32"
|
|
||||||
source "modules/Kconfig.renesas_fsp"
|
source "modules/Kconfig.renesas_fsp"
|
||||||
source "modules/Kconfig.rust"
|
source "modules/Kconfig.rust"
|
||||||
source "modules/Kconfig.simplelink"
|
source "modules/Kconfig.simplelink"
|
||||||
|
@ -72,6 +69,9 @@ comment "hal_gigadevice module not available."
|
||||||
comment "hal_nordic module not available."
|
comment "hal_nordic module not available."
|
||||||
depends on !ZEPHYR_HAL_NORDIC_MODULE
|
depends on !ZEPHYR_HAL_NORDIC_MODULE
|
||||||
|
|
||||||
|
comment "hal_nxp module not available."
|
||||||
|
depends on !ZEPHYR_HAL_NXP_MODULE
|
||||||
|
|
||||||
comment "liblc3 module not available."
|
comment "liblc3 module not available."
|
||||||
depends on !ZEPHYR_LIBLC3_MODULE
|
depends on !ZEPHYR_LIBLC3_MODULE
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,12 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 Linaro, Limited
|
# Copyright (c) 2021 Linaro, Limited
|
||||||
# Copyright 2024 NXP
|
# Copyright 2024-2025 NXP
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
if(CONFIG_HAS_MCUX OR CONFIG_HAS_IMX_HAL OR CONFIG_HAS_NXP_S32_HAL)
|
if(CONFIG_HAS_MCUX OR CONFIG_HAS_IMX_HAL OR CONFIG_HAS_NXP_S32_HAL)
|
||||||
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR} hal_nxp)
|
zephyr_library()
|
||||||
add_subdirectory_ifdef(CONFIG_USB_DEVICE_DRIVER usb)
|
|
||||||
add_subdirectory_ifdef(CONFIG_UDC_DRIVER usb)
|
|
||||||
|
|
||||||
zephyr_sources_ifdef(CONFIG_PWM_MCUX_CTIMER ${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/ctimer/fsl_ctimer.c)
|
|
||||||
zephyr_include_directories_ifdef(CONFIG_PWM_MCUX_CTIMER
|
|
||||||
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/ctimer/)
|
|
||||||
zephyr_include_directories(.)
|
|
||||||
|
|
||||||
zephyr_compile_definitions_ifdef(CONFIG_CAN_MCUX_FLEXCAN
|
zephyr_compile_definitions_ifdef(CONFIG_CAN_MCUX_FLEXCAN
|
||||||
FLEXCAN_WAIT_TIMEOUT=${CONFIG_CAN_MCUX_FLEXCAN_WAIT_TIMEOUT})
|
FLEXCAN_WAIT_TIMEOUT=${CONFIG_CAN_MCUX_FLEXCAN_WAIT_TIMEOUT})
|
||||||
|
|
||||||
|
@ -29,9 +21,16 @@ if(CONFIG_HAS_MCUX OR CONFIG_HAS_IMX_HAL OR CONFIG_HAS_NXP_S32_HAL)
|
||||||
|
|
||||||
zephyr_compile_definitions_ifdef(CONFIG_ETH_NXP_IMX_NETC FSL_ETH_ENABLE_CACHE_CONTROL=1)
|
zephyr_compile_definitions_ifdef(CONFIG_ETH_NXP_IMX_NETC FSL_ETH_ENABLE_CACHE_CONTROL=1)
|
||||||
|
|
||||||
add_subdirectory_ifdef(CONFIG_BT_H4_NXP_CTLR bt_controller)
|
|
||||||
|
|
||||||
if(CONFIG_I2S_MCUX_SAI)
|
if(CONFIG_I2S_MCUX_SAI)
|
||||||
zephyr_compile_definitions(MCUX_SDK_SAI_ALLOW_NULL_FIFO_WATERMARK=1)
|
zephyr_compile_definitions(MCUX_SDK_SAI_ALLOW_NULL_FIFO_WATERMARK=1)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_HAS_NXP_S32_HAL)
|
||||||
|
add_subdirectory(s32)
|
||||||
|
else()
|
||||||
|
add_subdirectory_ifdef(CONFIG_HAS_IMX_HAL imx)
|
||||||
|
add_subdirectory_ifdef(CONFIG_HAS_MCUX mcux)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR}/zephyr/src hal_nxp)
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 Linaro, Limited
|
# Copyright (c) 2021 Linaro, Limited
|
||||||
|
# Copyright 2025 NXP
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
|
||||||
|
|
||||||
config MCUX_ACMP
|
|
||||||
bool "Include ACMP driver from MCUX SDK"
|
config ZEPHYR_HAL_NXP_MODULE
|
||||||
|
bool
|
||||||
|
|
||||||
|
rsource "imx/Kconfig.imx"
|
||||||
|
rsource "s32/Kconfig.nxp_s32"
|
||||||
|
rsource "mcux/Kconfig.mcux"
|
||||||
|
|
12
modules/hal_nxp/imx/CMakeLists.txt
Normal file
12
modules/hal_nxp/imx/CMakeLists.txt
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Copyright 2025 NXP
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
# Translate the SoC name and part number into the imx device and cpu
|
||||||
|
# name respectively.
|
||||||
|
string(TOUPPER ${CONFIG_SOC} IMX_DEVICE)
|
||||||
|
|
||||||
|
# Build imx drivers and utilities that can be used for multiple SoC's.
|
||||||
|
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR}/imx/drivers hal_nxp/imx/drivers)
|
||||||
|
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR}/imx/devices hal_nxp/imx/devices)
|
||||||
|
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR}/imx/devices/${IMX_DEVICE} hal_nxp/imx/devices/soc)
|
186
modules/hal_nxp/mcux/CMakeLists.txt
Normal file
186
modules/hal_nxp/mcux/CMakeLists.txt
Normal file
|
@ -0,0 +1,186 @@
|
||||||
|
# Copyright 2025 NXP
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
set(MCUX_SDK_PROJECT_NAME ${ZEPHYR_CURRENT_LIBRARY})
|
||||||
|
|
||||||
|
if(CONFIG_SOC_LPC11U66
|
||||||
|
OR CONFIG_SOC_LPC11U68
|
||||||
|
OR CONFIG_SOC_LPC54114
|
||||||
|
OR CONFIG_SOC_MIMX8ML8_A53
|
||||||
|
OR CONFIG_SOC_MIMX8ML8_ADSP
|
||||||
|
OR CONFIG_SOC_MIMX8MM6_A53
|
||||||
|
OR CONFIG_SOC_MIMX8MN6_A53
|
||||||
|
OR CONFIG_SOC_MIMX8QM6
|
||||||
|
OR CONFIG_SOC_MIMX8QX6
|
||||||
|
OR CONFIG_SOC_MIMX8UD7_ADSP
|
||||||
|
OR CONFIG_SOC_MIMX9352_A55
|
||||||
|
OR CONFIG_SOC_MIMX9596_A55
|
||||||
|
OR CONFIG_SOC_MK22F12
|
||||||
|
OR CONFIG_SOC_MK64F12
|
||||||
|
OR CONFIG_SOC_MK66F18
|
||||||
|
OR CONFIG_SOC_MK80F25615
|
||||||
|
OR CONFIG_SOC_MK82F25615
|
||||||
|
OR CONFIG_SOC_MKE14F16
|
||||||
|
OR CONFIG_SOC_MKE16F16
|
||||||
|
OR CONFIG_SOC_MKE18F16
|
||||||
|
OR CONFIG_SOC_MKL25Z4
|
||||||
|
OR CONFIG_SOC_MKV56F24
|
||||||
|
OR CONFIG_SOC_MKV58F24
|
||||||
|
OR CONFIG_SOC_MKW22D5
|
||||||
|
OR CONFIG_SOC_MKW24D5
|
||||||
|
OR CONFIG_SOC_MKW40Z4
|
||||||
|
OR CONFIG_SOC_MKW41Z4
|
||||||
|
OR CONFIG_SOC_MIMX9131
|
||||||
|
)
|
||||||
|
|
||||||
|
set (CONFIG_SOC_SDKNG_UNSUPPORTED ON)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Translate the SoC name and part number into the mcux device and cpu
|
||||||
|
# name respectively.
|
||||||
|
# When this code completes, the following variables will be defined:
|
||||||
|
# MCUX_DEVICE: SOC name, suffixed by core name when using a dual core part.
|
||||||
|
# Example: MIMXRT595S_cm33, or LPC55S36
|
||||||
|
# MCUX_CPU: "CPU"+ SOC part number, followed by core name when using a dual core part.
|
||||||
|
# Example: CPU_MIMXRT595SFAWC_cm33, or CPU_LPC55S36JBD100
|
||||||
|
# MCU_DEVICE_PATH: SOC name without core suffix. Must match the name of the
|
||||||
|
# folder in MCUX HAL. IE MIMXRT595S, or LPC55S36
|
||||||
|
|
||||||
|
if(NOT HWMv2)
|
||||||
|
# Include HWMv1 logic for MCUX variables
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/hwmv1.cmake)
|
||||||
|
else()
|
||||||
|
string(TOUPPER ${CONFIG_SOC} MCUX_DEVICE_PATH)
|
||||||
|
string(TOUPPER ${CONFIG_SOC} MCUX_DEVICE)
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER})
|
||||||
|
|
||||||
|
if(DEFINED CONFIG_MCUX_CORE_SUFFIX)
|
||||||
|
string(APPEND MCUX_DEVICE ${CONFIG_MCUX_CORE_SUFFIX})
|
||||||
|
string(APPEND MCUX_CPU ${CONFIG_MCUX_CORE_SUFFIX})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(DEFINED CONFIG_SOC_SDKNG_UNSUPPORTED)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/${MCUX_DEVICE_PATH})
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers)
|
||||||
|
|
||||||
|
# include CMSIS of mcux-sdk for Cortex-A
|
||||||
|
if(CONFIG_CPU_CORTEX_A)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/CMSIS/Core_AArch64/Include)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# The mcux uses the cpu name to expose SoC-specific features
|
||||||
|
# of a given peripheral. For example, the UART peripheral may be
|
||||||
|
# instantiated with/without a hardware FIFO, and the size of that
|
||||||
|
# FIFO may be different for each instance in a given SoC. See
|
||||||
|
# fsl_device_registers.h and ${MCUX_DEVICE}_features.h
|
||||||
|
zephyr_compile_definitions(${MCUX_CPU})
|
||||||
|
|
||||||
|
# Build mcux device-specific objects. Although it is not normal
|
||||||
|
# practice, drilling down like this avoids the need for repetitive
|
||||||
|
# build scripts for every mcux device.
|
||||||
|
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_clock.c)
|
||||||
|
|
||||||
|
if(${MCUX_DEVICE} MATCHES "LPC")
|
||||||
|
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_power.c)
|
||||||
|
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_reset.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_SOC_LPC54114_M4
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/${MCUX_DEVICE_PATH}/gcc/startup_LPC54114_cm4.S
|
||||||
|
)
|
||||||
|
|
||||||
|
# Include middleware/usb
|
||||||
|
if(CONFIG_UDC_DRIVER OR CONFIG_USB_DEVICE_DRIVER)
|
||||||
|
if(CONFIG_DT_HAS_NXP_USBPHY_ENABLED)
|
||||||
|
zephyr_include_directories(${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/middleware/mcux-sdk-middleware-usb/phy)
|
||||||
|
endif()
|
||||||
|
# Include usb required header file.
|
||||||
|
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/mcux_sdk_ng/middleware)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Include middleware/bt_controller.cmake
|
||||||
|
if(CONFIG_BT_H4_NXP_CTLR)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/mcux_sdk_ng/middleware/bt_controller.cmake)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/components ${CMAKE_CURRENT_BINARY_DIR}/components)
|
||||||
|
|
||||||
|
# Include Entry cmake component
|
||||||
|
add_subdirectory(mcux-sdk)
|
||||||
|
|
||||||
|
else() # CONFIG_SOC_SDKNG_UNSUPPORTED
|
||||||
|
|
||||||
|
add_subdirectory(mcux-sdk-ng)
|
||||||
|
|
||||||
|
endif() # CONFIG_SOC_SDKNG_UNSUPPORTED
|
||||||
|
|
||||||
|
enable_language(C ASM)
|
||||||
|
|
||||||
|
zephyr_linker_sources(RWDATA
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/quick_access_data.ld
|
||||||
|
)
|
||||||
|
|
||||||
|
zephyr_linker_sources_ifdef(CONFIG_ARCH_HAS_RAMFUNC_SUPPORT
|
||||||
|
RAMFUNC_SECTION
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/quick_access_code.ld
|
||||||
|
)
|
||||||
|
|
||||||
|
zephyr_linker_sources_ifdef(CONFIG_NOCACHE_MEMORY
|
||||||
|
NOCACHE_SECTION
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/nocache.ld
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT CONFIG_ASSERT OR CONFIG_FORCE_NO_ASSERT)
|
||||||
|
zephyr_compile_definitions(NDEBUG) # squelch fsl_flexcan.c warning
|
||||||
|
endif()
|
||||||
|
|
||||||
|
zephyr_compile_definitions_ifdef(
|
||||||
|
CONFIG_PTP_CLOCK_NXP_ENET
|
||||||
|
ENET_ENHANCEDBUFFERDESCRIPTOR_MODE
|
||||||
|
)
|
||||||
|
|
||||||
|
zephyr_compile_definitions_ifdef(
|
||||||
|
CONFIG_SOC_MIMX9596
|
||||||
|
FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL=1
|
||||||
|
)
|
||||||
|
|
||||||
|
# note: if FSL_IRQSTEER_ENABLE_MASTER_INT is not
|
||||||
|
# defined then it will automatically be defined
|
||||||
|
# and set to 1 via fsl_irqsteer.h
|
||||||
|
zephyr_library_compile_definitions_ifdef(CONFIG_NXP_IRQSTEER
|
||||||
|
FSL_IRQSTEER_ENABLE_MASTER_INT=0
|
||||||
|
)
|
||||||
|
|
||||||
|
zephyr_library_compile_definitions_ifdef(CONFIG_DAI_NXP_SAI
|
||||||
|
MCUX_SDK_SAI_ALLOW_NULL_FIFO_WATERMARK=1
|
||||||
|
)
|
||||||
|
|
||||||
|
zephyr_library_compile_definitions_ifdef(CONFIG_DAI_NXP_SAI
|
||||||
|
MCUX_SDK_SAI_DISABLE_IMPLICIT_CHAN_CONFIG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
zephyr_library_compile_definitions_ifdef(CONFIG_NOCACHE_MEMORY
|
||||||
|
__STARTUP_INITIALIZE_NONCACHEDATA
|
||||||
|
)
|
||||||
|
|
||||||
|
zephyr_library_compile_definitions_ifdef(CONFIG_HAS_MCUX_CACHE
|
||||||
|
FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL
|
||||||
|
)
|
||||||
|
|
||||||
|
# MCUX_SDK and MCUX_SDK_NG share wireless/framework_5.3.3, wifi_nxp
|
||||||
|
add_subdirectory_ifdef(CONFIG_IEEE802154_KW41Z
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/middleware/wireless/framework_5.3.3
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/middleware/wireless/framework
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory_ifdef(CONFIG_WIFI_NXP
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/middleware/wifi_nxp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/middleware/wifi_nxp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/middleware
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/middleware
|
||||||
|
)
|
|
@ -4,6 +4,16 @@
|
||||||
# Copyright 2024 NXP
|
# Copyright 2024 NXP
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
config SOC_SDKNG_UNSUPPORTED
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
Indicates whether the SDKNG supports the current SoC
|
||||||
|
|
||||||
|
config MCUX_HW_DEVICE_CORE
|
||||||
|
string
|
||||||
|
help
|
||||||
|
Indicates the current device core id
|
||||||
|
|
||||||
config HAS_MCUX
|
config HAS_MCUX
|
||||||
bool
|
bool
|
||||||
depends on SOC_FAMILY_KINETIS || SOC_FAMILY_NXP_IMX || SOC_FAMILY_LPC || \
|
depends on SOC_FAMILY_KINETIS || SOC_FAMILY_NXP_IMX || SOC_FAMILY_LPC || \
|
50
modules/hal_nxp/mcux/hwmv1.cmake
Normal file
50
modules/hal_nxp/mcux/hwmv1.cmake
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
# Copyright 2025 NXP
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
# Get MCUX_DEVICE and MCUX_DEVICE_PATH from CONFIG_SOC
|
||||||
|
# For example, if CONFIG_SOC=mimx8ml8_ca53, then MCUX_DEVICE=MIMX8ML8_ca53
|
||||||
|
# and MCUX_DEVICE_PATH=MIMX8ML8
|
||||||
|
string(FIND ${CONFIG_SOC} "_" pos)
|
||||||
|
if(pos GREATER -1)
|
||||||
|
string(REPLACE "_" ";" MCUX_DEVICE_TMP ${CONFIG_SOC})
|
||||||
|
list(GET MCUX_DEVICE_TMP 0 MCUX_DEVICE_SOC)
|
||||||
|
list(GET MCUX_DEVICE_TMP 1 MCUX_DEVICE_CORE)
|
||||||
|
string(TOUPPER ${MCUX_DEVICE_SOC} MCUX_DEVICE_PATH)
|
||||||
|
set(MCUX_DEVICE ${MCUX_DEVICE_PATH}_${MCUX_DEVICE_CORE})
|
||||||
|
else()
|
||||||
|
string(TOUPPER ${CONFIG_SOC} MCUX_DEVICE)
|
||||||
|
string(TOUPPER ${CONFIG_SOC} MCUX_DEVICE_PATH)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if("${MCUX_DEVICE}" STREQUAL "LPC51U68")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER})
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "LPC54114")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm4)
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "LPC54114_m0")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm0plus)
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "LPC55S16")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER})
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "LPC55S28")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER})
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "LPC55S69_cpu0")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm33_core0)
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "LPC55S69_cpu1")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm33_core1)
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT1052")
|
||||||
|
string(REGEX REPLACE "(.*)[AB]$" "CPU_\\1B" MCUX_CPU ${CONFIG_SOC_PART_NUMBER})
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT595S_cm33")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm33)
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT685S_cm33")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm33)
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT1176_cm4")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm4)
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT1176_cm7")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm7)
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT1166_cm4")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm4)
|
||||||
|
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT1166_cm7")
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm7)
|
||||||
|
else()
|
||||||
|
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER})
|
||||||
|
endif()
|
45
modules/hal_nxp/mcux/mcux-sdk-ng/CMakeLists.txt
Normal file
45
modules/hal_nxp/mcux/mcux-sdk-ng/CMakeLists.txt
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# Copyright 2025 NXP
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
set(MCUX_SDK_NG_DIR ${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk-ng)
|
||||||
|
# SdkRootDirPath is used by MCUX SDK NG CMake files.
|
||||||
|
set(SdkRootDirPath ${MCUX_SDK_NG_DIR})
|
||||||
|
|
||||||
|
# Functions for MCUX SDK cmake files
|
||||||
|
include(${MCUX_SDK_NG_DIR}/cmake/extension/logging.cmake)
|
||||||
|
include(${MCUX_SDK_NG_DIR}/cmake/extension/function.cmake)
|
||||||
|
include(${MCUX_SDK_NG_DIR}/cmake/extension/basic_settings_lite.cmake)
|
||||||
|
|
||||||
|
#specific operation to shared drivers
|
||||||
|
if((DEFINED CONFIG_FLASH_MCUX_FLEXSPI_XIP) AND (DEFINED CONFIG_FLASH))
|
||||||
|
zephyr_code_relocate(FILES ${MCUX_SDK_NG_DIR}/drivers/flexspi/fsl_flexspi.c
|
||||||
|
LOCATION ${CONFIG_FLASH_MCUX_FLEXSPI_XIP_MEM}_TEXT)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_NXP_RF_IMU AND CONFIG_SOC_SERIES_MCXW)
|
||||||
|
zephyr_compile_definitions(HAL_RPMSG_SELECT_ROLE=0U)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if((${MCUX_DEVICE} MATCHES "RW61") AND (NOT DEFINED CONFIG_MINIMAL_LIBC))
|
||||||
|
# Whenever building for RW61x without minimal LIBC, use optimized memcpy.
|
||||||
|
# This will avoid issues with unaligned access to peripheral RAM regions
|
||||||
|
# caused by the memcpy implementation in newlib
|
||||||
|
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk-ng/components/misc_utilities/fsl_memcpy.S)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(middleware)
|
||||||
|
add_subdirectory(components)
|
||||||
|
add_subdirectory(drivers)
|
||||||
|
add_subdirectory(device)
|
||||||
|
|
||||||
|
# Expose the driver header include path, so that the shim driver can use them.
|
||||||
|
get_target_property(MCUXSDK_INCLUDE_DIRS ${MCUX_SDK_PROJECT_NAME} INTERFACE_INCLUDE_DIRECTORIES)
|
||||||
|
if(NOT MCUXSDK_INCLUDE_DIRS STREQUAL MCUXSDK_INCLUDE_DIRS-NOTFOUND)
|
||||||
|
zephyr_include_directories(${MCUXSDK_INCLUDE_DIRS})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_target_property(MCUXSDK_COMPILE_DEFS ${MCUX_SDK_PROJECT_NAME} INTERFACE_COMPILE_DEFINITIONS)
|
||||||
|
if(NOT MCUXSDK_COMPILE_DEFS STREQUAL MCUXSDK_COMPILE_DEFS-NOTFOUND)
|
||||||
|
zephyr_compile_definitions(${MCUXSDK_COMPILE_DEFS})
|
||||||
|
endif()
|
82
modules/hal_nxp/mcux/mcux-sdk-ng/components/CMakeLists.txt
Normal file
82
modules/hal_nxp/mcux/mcux-sdk-ng/components/CMakeLists.txt
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
# Copyright 2025 NXP
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
if(CONFIG_WIFI_NXP)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_component.wifi_bt_module.tx_pwr_limits ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_NXP_FW_LOADER)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.conn_fwloader ON)
|
||||||
|
set(CONFIG_USE_component_osa_zephyr ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${MCUX_DEVICE} MATCHES "RW61")
|
||||||
|
set(CONFIG_USE_component_osa_zephyr ON)
|
||||||
|
if(CONFIG_NXP_FW_LOADER)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_component.mflash_offchip ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.cache_cache64 ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.flexspi ON PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_USB_DEVICE_DRIVER OR CONFIG_UDC_DRIVER OR CONFIG_BT)
|
||||||
|
set(CONFIG_USE_component_osa_zephyr ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_NXP_RF_IMU)
|
||||||
|
if(CONFIG_SOC_SERIES_RW6XX)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.imu ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.gdma ON)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/components/rpmsg)
|
||||||
|
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/components/rpmsg/fsl_adapter_rfimu.c)
|
||||||
|
elseif(CONFIG_SOC_SERIES_MCXW)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_component.lists ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_component.rpmsg_adapter ON)
|
||||||
|
zephyr_compile_definitions(HAL_RPMSG_SELECT_ROLE=0U)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_MCXW)
|
||||||
|
if(CONFIG_NET_L2_IEEE802154 OR CONFIG_NET_L2_OPENTHREAD)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_component.lists ON)
|
||||||
|
set(CONFIG_USE_component_osa_zephyr ON)
|
||||||
|
zephyr_compile_definitions(OSA_USED=1U)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_USE_component_osa_zephyr)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_component.osa_template_config ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_component.osa_zephyr ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_component.osa_interface ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(${MCUX_SDK_NG_DIR}/components/osa
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/osa
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory(${MCUX_SDK_NG_DIR}/components/wifi_bt_module
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/wifi_bt_module
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory(${MCUX_SDK_NG_DIR}/components/conn_fwloader
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/conn_fwloader
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory(${MCUX_SDK_NG_DIR}/components/lists
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/lists
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory(${MCUX_SDK_NG_DIR}/components/rpmsg
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/rpmsg
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory(${MCUX_SDK_NG_DIR}/components/imu_adapter
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/imu_adapter
|
||||||
|
)
|
||||||
|
|
||||||
|
if(${MCUX_DEVICE} MATCHES "RW61")
|
||||||
|
add_subdirectory(${MCUX_SDK_NG_DIR}/components/flash/mflash/rdrw612bga
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/flash/mflash
|
||||||
|
)
|
||||||
|
endif()
|
66
modules/hal_nxp/mcux/mcux-sdk-ng/device/CMakeLists.txt
Normal file
66
modules/hal_nxp/mcux/mcux-sdk-ng/device/CMakeLists.txt
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
# Copyright 2025 NXP
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
string(TOUPPER ${CONFIG_SOC} MCUX_DEVICE)
|
||||||
|
|
||||||
|
# Find the folder in mcux-sdk/devices that matches the device name
|
||||||
|
message(STATUS "Looking for device ${MCUX_DEVICE} in ${SdkRootDirPath}/devices/")
|
||||||
|
|
||||||
|
file(GLOB_RECURSE device_cmake_files ${SdkRootDirPath}/devices/*/CMakeLists.txt)
|
||||||
|
foreach(file ${device_cmake_files})
|
||||||
|
get_filename_component(folder ${file} DIRECTORY)
|
||||||
|
get_filename_component(folder_name ${folder} NAME)
|
||||||
|
if(folder_name STREQUAL ${MCUX_DEVICE})
|
||||||
|
message(STATUS "Found device folder: ${folder}")
|
||||||
|
set(mcux_device_folder ${folder})
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(NOT mcux_device_folder)
|
||||||
|
message(FATAL_ERROR "Device ${MCUX_DEVICE} not found in ${SdkRootDirPath}/devices/")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(DEFINED CONFIG_MCUX_CORE_SUFFIX)
|
||||||
|
string (REGEX REPLACE "^_" "" core_id "${CONFIG_MCUX_CORE_SUFFIX}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Definitions to load device drivers
|
||||||
|
set(CONFIG_MCUX_HW_DEVICE_CORE "${MCUX_DEVICE}${CONFIG_MCUX_CORE_SUFFIX}")
|
||||||
|
|
||||||
|
# Define CPU macro
|
||||||
|
zephyr_compile_definitions("CPU_${CONFIG_SOC_PART_NUMBER}${CONFIG_MCUX_CORE_SUFFIX}")
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_IMXRT10XX OR CONFIG_SOC_SERIES_IMXRT11XX)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_device.boot_header ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CONFIG_MCUX_COMPONENT_device.system ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_device.CMSIS ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.clock ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.power ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.reset ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.memory ON)
|
||||||
|
|
||||||
|
# load device variables
|
||||||
|
include(${mcux_device_folder}/variable.cmake)
|
||||||
|
|
||||||
|
# Load device files
|
||||||
|
mcux_add_cmakelists(${mcux_device_folder})
|
||||||
|
|
||||||
|
# Workaround for fsl_flexspi_nor_boot link error, remove the one in SDK, use the Zephyr file.
|
||||||
|
if(CONFIG_MCUX_COMPONENT_device.boot_header)
|
||||||
|
|
||||||
|
get_target_property(MCUXSDK_SOURCES ${MCUX_SDK_PROJECT_NAME} SOURCES)
|
||||||
|
list(FILTER MCUXSDK_SOURCES INCLUDE REGEX ".*fsl_flexspi_nor_boot\.c$")
|
||||||
|
|
||||||
|
if(NOT MCUXSDK_SOURCES STREQUAL "")
|
||||||
|
file(RELATIVE_PATH MCUXSDK_SOURCES ${SdkRootDirPath} ${MCUXSDK_SOURCES})
|
||||||
|
mcux_project_remove_source(
|
||||||
|
BASE_PATH ${SdkRootDirPath}
|
||||||
|
SOURCES ${MCUXSDK_SOURCES}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endif()
|
268
modules/hal_nxp/mcux/mcux-sdk-ng/drivers/CMakeLists.txt
Normal file
268
modules/hal_nxp/mcux/mcux-sdk-ng/drivers/CMakeLists.txt
Normal file
|
@ -0,0 +1,268 @@
|
||||||
|
# Copyright 2025 NXP
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
function(set_variable_ifdef feature_toggle variable)
|
||||||
|
if(${${feature_toggle}})
|
||||||
|
set(${variable} ON CACHE INTERNAL "global variable")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# fsl_common driver
|
||||||
|
zephyr_library_sources(${MCUX_SDK_NG_DIR}/drivers/common/fsl_common.c
|
||||||
|
${MCUX_SDK_NG_DIR}/drivers/common/fsl_common_arm.c)
|
||||||
|
zephyr_include_directories(${MCUX_SDK_NG_DIR}/drivers/common)
|
||||||
|
|
||||||
|
set_variable_ifdef(CONFIG_HWINFO_MCUX_SRC_V2 CONFIG_MCUX_COMPONENT_driver.src_2)
|
||||||
|
set_variable_ifdef(CONFIG_GPIO_MCUX_IGPIO CONFIG_MCUX_COMPONENT_driver.igpio)
|
||||||
|
set_variable_ifdef(CONFIG_ADC_MCUX_LPADC CONFIG_MCUX_COMPONENT_driver.lpadc)
|
||||||
|
set_variable_ifdef(CONFIG_COUNTER_MCUX_CTIMER CONFIG_MCUX_COMPONENT_driver.ctimer)
|
||||||
|
set_variable_ifdef(CONFIG_COUNTER_MCUX_LPC_RTC CONFIG_MCUX_COMPONENT_driver.lpc_rtc)
|
||||||
|
set_variable_ifdef(CONFIG_GLIKEY_MCUX_GLIKEY CONFIG_MCUX_COMPONENT_driver.glikey)
|
||||||
|
|
||||||
|
if(CONFIG_NXP_LP_FLEXCOMM)
|
||||||
|
set_variable_ifdef(CONFIG_I2C_MCUX_LPI2C CONFIG_MCUX_COMPONENT_driver.lpflexcomm)
|
||||||
|
set_variable_ifdef(CONFIG_I2C_MCUX_LPI2C CONFIG_MCUX_COMPONENT_driver.lpflexcomm_lpi2c)
|
||||||
|
set_variable_ifdef(CONFIG_UART_MCUX_LPUART CONFIG_MCUX_COMPONENT_driver.lpflexcomm)
|
||||||
|
set_variable_ifdef(CONFIG_UART_MCUX_LPUART CONFIG_MCUX_COMPONENT_driver.lpflexcomm_lpuart)
|
||||||
|
set_variable_ifdef(CONFIG_SPI_MCUX_LPSPI CONFIG_MCUX_COMPONENT_driver.lpflexcomm)
|
||||||
|
set_variable_ifdef(CONFIG_SPI_MCUX_LPSPI CONFIG_MCUX_COMPONENT_driver.lpflexcomm_lpspi)
|
||||||
|
else()
|
||||||
|
set_variable_ifdef(CONFIG_I2C_MCUX_LPI2C CONFIG_MCUX_COMPONENT_driver.lpi2c)
|
||||||
|
set_variable_ifdef(CONFIG_UART_MCUX_LPUART CONFIG_MCUX_COMPONENT_driver.lpuart)
|
||||||
|
set_variable_ifdef(CONFIG_SPI_MCUX_LPSPI CONFIG_MCUX_COMPONENT_driver.lpspi)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_variable_ifdef(CONFIG_DMA_MCUX_LPC CONFIG_MCUX_COMPONENT_driver.lpc_dma)
|
||||||
|
set_variable_ifdef(CONFIG_GPIO_MCUX_LPC CONFIG_MCUX_COMPONENT_driver.lpc_gpio)
|
||||||
|
set_variable_ifdef(CONFIG_NXP_PINT CONFIG_MCUX_COMPONENT_driver.pint)
|
||||||
|
set_variable_ifdef(CONFIG_NXP_PINT CONFIG_MCUX_COMPONENT_driver.inputmux)
|
||||||
|
set_variable_ifdef(CONFIG_DMA_MCUX_SMARTDMA CONFIG_MCUX_COMPONENT_driver.inputmux)
|
||||||
|
set_variable_ifdef(CONFIG_I2C_MCUX_FLEXCOMM CONFIG_MCUX_COMPONENT_driver.flexcomm)
|
||||||
|
set_variable_ifdef(CONFIG_I2C_MCUX_FLEXCOMM CONFIG_MCUX_COMPONENT_driver.flexcomm_i2c)
|
||||||
|
set_variable_ifdef(CONFIG_I2S_MCUX_FLEXCOMM CONFIG_MCUX_COMPONENT_driver.flexcomm)
|
||||||
|
set_variable_ifdef(CONFIG_I2S_MCUX_FLEXCOMM CONFIG_MCUX_COMPONENT_driver.flexcomm_i2s)
|
||||||
|
set_variable_ifdef(CONFIG_SPI_MCUX_FLEXCOMM CONFIG_MCUX_COMPONENT_driver.flexcomm)
|
||||||
|
set_variable_ifdef(CONFIG_SPI_MCUX_FLEXCOMM CONFIG_MCUX_COMPONENT_driver.flexcomm_spi)
|
||||||
|
set_variable_ifdef(CONFIG_UART_MCUX_FLEXCOMM CONFIG_MCUX_COMPONENT_driver.flexcomm)
|
||||||
|
set_variable_ifdef(CONFIG_UART_MCUX_FLEXCOMM CONFIG_MCUX_COMPONENT_driver.flexcomm_usart)
|
||||||
|
set_variable_ifdef(CONFIG_MCUX_OS_TIMER CONFIG_MCUX_COMPONENT_driver.ostimer)
|
||||||
|
set_variable_ifdef(CONFIG_PWM_MCUX_SCTIMER CONFIG_MCUX_COMPONENT_driver.sctimer)
|
||||||
|
set_variable_ifdef(CONFIG_PWM_MCUX_CTIMER CONFIG_MCUX_COMPONENT_driver.ctimer)
|
||||||
|
set_variable_ifdef(CONFIG_SOC_FLASH_LPC CONFIG_MCUX_COMPONENT_driver.flashiap)
|
||||||
|
set_variable_ifdef(CONFIG_WDT_MCUX_WWDT CONFIG_MCUX_COMPONENT_driver.wwdt)
|
||||||
|
set_variable_ifdef(CONFIG_ADC_MCUX_ADC12 CONFIG_MCUX_COMPONENT_driver.adc12)
|
||||||
|
set_variable_ifdef(CONFIG_ADC_MCUX_ADC16 CONFIG_MCUX_COMPONENT_driver.adc16)
|
||||||
|
set_variable_ifdef(CONFIG_CAN_MCUX_FLEXCAN CONFIG_MCUX_COMPONENT_driver.flexcan)
|
||||||
|
set_variable_ifdef(CONFIG_CAN_MCUX_FLEXCAN_FD CONFIG_MCUX_COMPONENT_driver.flexcan)
|
||||||
|
set_variable_ifdef(CONFIG_COUNTER_NXP_PIT CONFIG_MCUX_COMPONENT_driver.pit)
|
||||||
|
set_variable_ifdef(CONFIG_COUNTER_MCUX_RTC CONFIG_MCUX_COMPONENT_driver.rtc)
|
||||||
|
set_variable_ifdef(CONFIG_DAC_MCUX_DAC CONFIG_MCUX_COMPONENT_driver.dac)
|
||||||
|
set_variable_ifdef(CONFIG_DAC_MCUX_DAC32 CONFIG_MCUX_COMPONENT_driver.dac32)
|
||||||
|
set_variable_ifdef(CONFIG_DMA_MCUX_EDMA CONFIG_MCUX_COMPONENT_driver.dmamux)
|
||||||
|
set_variable_ifdef(CONFIG_DMA_MCUX_EDMA_V3 CONFIG_MCUX_COMPONENT_driver.dmamux)
|
||||||
|
set_variable_ifdef(CONFIG_DMA_MCUX_EDMA CONFIG_MCUX_COMPONENT_driver.edma)
|
||||||
|
set_variable_ifdef(CONFIG_DMA_MCUX_EDMA_V3 CONFIG_MCUX_COMPONENT_driver.dma3)
|
||||||
|
set_variable_ifdef(CONFIG_DMA_MCUX_EDMA_V4 CONFIG_MCUX_COMPONENT_driver.edma4)
|
||||||
|
set_variable_ifdef(CONFIG_ENTROPY_MCUX_RNGA CONFIG_MCUX_COMPONENT_driver.rnga)
|
||||||
|
set_variable_ifdef(CONFIG_ENTROPY_MCUX_TRNG CONFIG_MCUX_COMPONENT_driver.trng)
|
||||||
|
set_variable_ifdef(CONFIG_ENTROPY_MCUX_CAAM CONFIG_MCUX_COMPONENT_driver.caam)
|
||||||
|
set_variable_ifdef(CONFIG_ETH_NXP_ENET CONFIG_MCUX_COMPONENT_driver.enet)
|
||||||
|
set_variable_ifdef(CONFIG_ETH_NXP_IMX_NETC CONFIG_MCUX_COMPONENT_driver.netc)
|
||||||
|
set_variable_ifdef(CONFIG_HAS_MCUX_SMC CONFIG_MCUX_COMPONENT_driver.smc)
|
||||||
|
set_variable_ifdef(CONFIG_I2C_MCUX CONFIG_MCUX_COMPONENT_driver.i2c)
|
||||||
|
set_variable_ifdef(CONFIG_I2C_NXP_II2C CONFIG_MCUX_COMPONENT_driver.ii2c)
|
||||||
|
set_variable_ifdef(CONFIG_I3C_MCUX CONFIG_MCUX_COMPONENT_driver.i3c)
|
||||||
|
set_variable_ifdef(CONFIG_SENSOR_MCUX_ACMP CONFIG_MCUX_COMPONENT_driver.acmp)
|
||||||
|
set_variable_ifdef(CONFIG_COMPARATOR_MCUX_ACMP CONFIG_MCUX_COMPONENT_driver.acmp)
|
||||||
|
set_variable_ifdef(CONFIG_PWM_MCUX_FTM CONFIG_MCUX_COMPONENT_driver.ftm)
|
||||||
|
set_variable_ifdef(CONFIG_PWM_MCUX_TPM CONFIG_MCUX_COMPONENT_driver.tpm)
|
||||||
|
set_variable_ifdef(CONFIG_COUNTER_MCUX_TPM CONFIG_MCUX_COMPONENT_driver.tpm)
|
||||||
|
set_variable_ifdef(CONFIG_PWM_MCUX_PWT CONFIG_MCUX_COMPONENT_driver.pwt)
|
||||||
|
set_variable_ifdef(CONFIG_COUNTER_MCUX_QTMR CONFIG_MCUX_COMPONENT_driver.qtmr_1)
|
||||||
|
set_variable_ifdef(CONFIG_PWM_MCUX_QTMR CONFIG_MCUX_COMPONENT_driver.qtmr_1)
|
||||||
|
set_variable_ifdef(CONFIG_SPI_MCUX_DSPI CONFIG_MCUX_COMPONENT_driver.dspi)
|
||||||
|
set_variable_ifdef(CONFIG_SPI_MCUX_ECSPI CONFIG_MCUX_COMPONENT_driver.ecspi)
|
||||||
|
set_variable_ifdef(CONFIG_MCUX_FLEXIO CONFIG_MCUX_COMPONENT_driver.flexio)
|
||||||
|
set_variable_ifdef(CONFIG_SPI_MCUX_FLEXIO CONFIG_MCUX_COMPONENT_driver.flexio_spi)
|
||||||
|
set_variable_ifdef(CONFIG_UART_MCUX CONFIG_MCUX_COMPONENT_driver.uart)
|
||||||
|
set_variable_ifdef(CONFIG_UART_MCUX_LPSCI CONFIG_MCUX_COMPONENT_driver.lpsci)
|
||||||
|
set_variable_ifdef(CONFIG_WDT_MCUX_WDOG CONFIG_MCUX_COMPONENT_driver.wdog)
|
||||||
|
set_variable_ifdef(CONFIG_WDT_MCUX_WDOG32 CONFIG_MCUX_COMPONENT_driver.wdog32)
|
||||||
|
set_variable_ifdef(CONFIG_COUNTER_MCUX_GPT CONFIG_MCUX_COMPONENT_driver.gpt)
|
||||||
|
set_variable_ifdef(CONFIG_MCUX_GPT_TIMER CONFIG_MCUX_COMPONENT_driver.gpt)
|
||||||
|
set_variable_ifdef(CONFIG_DISPLAY_MCUX_ELCDIF CONFIG_MCUX_COMPONENT_driver.elcdif)
|
||||||
|
set_variable_ifdef(CONFIG_MCUX_PXP CONFIG_MCUX_COMPONENT_driver.pxp)
|
||||||
|
set_variable_ifdef(CONFIG_LV_USE_GPU_NXP_PXP CONFIG_MCUX_COMPONENT_driver.pxp)
|
||||||
|
set_variable_ifdef(CONFIG_GPIO_MCUX_RGPIO CONFIG_MCUX_COMPONENT_driver.rgpio)
|
||||||
|
set_variable_ifdef(CONFIG_I2S_MCUX_SAI CONFIG_MCUX_COMPONENT_driver.sai)
|
||||||
|
set_variable_ifdef(CONFIG_DAI_NXP_SAI CONFIG_MCUX_COMPONENT_driver.sai)
|
||||||
|
set_variable_ifdef(CONFIG_MEMC_MCUX_FLEXSPI CONFIG_MCUX_COMPONENT_driver.flexspi)
|
||||||
|
set_variable_ifdef(CONFIG_PWM_MCUX CONFIG_MCUX_COMPONENT_driver.pwm)
|
||||||
|
set_variable_ifdef(CONFIG_VIDEO_MCUX_CSI CONFIG_MCUX_COMPONENT_driver.csi)
|
||||||
|
set_variable_ifdef(CONFIG_WDT_MCUX_IMX_WDOG CONFIG_MCUX_COMPONENT_driver.wdog01)
|
||||||
|
set_variable_ifdef(CONFIG_WDT_MCUX_RTWDOG CONFIG_MCUX_COMPONENT_driver.rtwdog)
|
||||||
|
set_variable_ifdef(CONFIG_HAS_MCUX_RDC CONFIG_MCUX_COMPONENT_driver.rdc)
|
||||||
|
set_variable_ifdef(CONFIG_UART_MCUX_IUART CONFIG_MCUX_COMPONENT_driver.iuart)
|
||||||
|
set_variable_ifdef(CONFIG_ADC_MCUX_12B1MSPS_SAR CONFIG_MCUX_COMPONENT_driver.adc_12b1msps_sar)
|
||||||
|
set_variable_ifdef(CONFIG_HWINFO_MCUX_SRC CONFIG_MCUX_COMPONENT_driver.src)
|
||||||
|
set_variable_ifdef(CONFIG_HWINFO_MCUX_SIM CONFIG_MCUX_COMPONENT_driver.sim)
|
||||||
|
set_variable_ifdef(CONFIG_HWINFO_MCUX_RCM CONFIG_MCUX_COMPONENT_driver.rcm)
|
||||||
|
set_variable_ifdef(CONFIG_IPM_MCUX CONFIG_MCUX_COMPONENT_driver.mailbox)
|
||||||
|
set_variable_ifdef(CONFIG_MBOX_NXP_MAILBOX CONFIG_MCUX_COMPONENT_driver.mailbox)
|
||||||
|
set_variable_ifdef(CONFIG_COUNTER_MCUX_SNVS CONFIG_MCUX_COMPONENT_driver.snvs_hp)
|
||||||
|
set_variable_ifdef(CONFIG_MCUX_LPTMR_TIMER CONFIG_MCUX_COMPONENT_driver.lptmr)
|
||||||
|
set_variable_ifdef(CONFIG_COUNTER_MCUX_LPTMR CONFIG_MCUX_COMPONENT_driver.lptmr)
|
||||||
|
set_variable_ifdef(CONFIG_IMX_USDHC CONFIG_MCUX_COMPONENT_driver.usdhc)
|
||||||
|
set_variable_ifdef(CONFIG_MIPI_DSI_MCUX CONFIG_MCUX_COMPONENT_driver.mipi_dsi_split)
|
||||||
|
set_variable_ifdef(CONFIG_MIPI_DSI_MCUX_2L CONFIG_MCUX_COMPONENT_driver.mipi_dsi)
|
||||||
|
set_variable_ifdef(CONFIG_MCUX_SDIF CONFIG_MCUX_COMPONENT_driver.sdif)
|
||||||
|
set_variable_ifdef(CONFIG_ADC_MCUX_ETC CONFIG_MCUX_COMPONENT_driver.adc_etc)
|
||||||
|
set_variable_ifdef(CONFIG_MCUX_XBARA CONFIG_MCUX_COMPONENT_driver.xbara)
|
||||||
|
set_variable_ifdef(CONFIG_QDEC_MCUX CONFIG_MCUX_COMPONENT_driver.enc)
|
||||||
|
set_variable_ifdef(CONFIG_CRYPTO_MCUX_DCP CONFIG_MCUX_COMPONENT_driver.dcp)
|
||||||
|
set_variable_ifdef(CONFIG_DMA_MCUX_SMARTDMA CONFIG_MCUX_COMPONENT_driver.smartdma)
|
||||||
|
set_variable_ifdef(CONFIG_DAC_MCUX_LPDAC CONFIG_MCUX_COMPONENT_driver.dac_1)
|
||||||
|
set_variable_ifdef(CONFIG_NXP_IRQSTEER CONFIG_MCUX_COMPONENT_driver.irqsteer)
|
||||||
|
set_variable_ifdef(CONFIG_AUDIO_DMIC_MCUX CONFIG_MCUX_COMPONENT_driver.dmic)
|
||||||
|
set_variable_ifdef(CONFIG_DMA_NXP_SDMA CONFIG_MCUX_COMPONENT_driver.sdma)
|
||||||
|
set_variable_ifdef(CONFIG_ADC_MCUX_GAU CONFIG_MCUX_COMPONENT_driver.cns_adc)
|
||||||
|
set_variable_ifdef(CONFIG_DAC_MCUX_GAU CONFIG_MCUX_COMPONENT_driver.cns_dac)
|
||||||
|
set_variable_ifdef(CONFIG_DAI_NXP_ESAI CONFIG_MCUX_COMPONENT_driver.esai)
|
||||||
|
set_variable_ifdef(CONFIG_MCUX_LPCMP CONFIG_MCUX_COMPONENT_driver.lpcmp)
|
||||||
|
set_variable_ifdef(CONFIG_NXP_RF_IMU CONFIG_MCUX_COMPONENT_driver.imu)
|
||||||
|
set_variable_ifdef(CONFIG_TRDC_MCUX_TRDC CONFIG_MCUX_COMPONENT_driver.trdc)
|
||||||
|
set_variable_ifdef(CONFIG_S3MU_MCUX_S3MU CONFIG_MCUX_COMPONENT_driver.s3mu)
|
||||||
|
set_variable_ifdef(CONFIG_PINCTRL_NXP_PORT CONFIG_MCUX_COMPONENT_driver.port)
|
||||||
|
set_variable_ifdef(CONFIG_DMA_NXP_EDMA CONFIG_MCUX_COMPONENT_driver.edma_soc_rev2)
|
||||||
|
set_variable_ifdef(CONFIG_COUNTER_MCUX_SNVS_SRTC CONFIG_MCUX_COMPONENT_driver.snvs_lp)
|
||||||
|
set_variable_ifdef(CONFIG_DISPLAY_MCUX_DCNANO_LCDIF CONFIG_MCUX_COMPONENT_driver.lcdif)
|
||||||
|
set_variable_ifdef(CONFIG_MIPI_DBI_NXP_FLEXIO_LCDIF CONFIG_MCUX_COMPONENT_driver.flexio_mculcd)
|
||||||
|
set_variable_ifdef(CONFIG_VIDEO_MCUX_MIPI_CSI2RX CONFIG_MCUX_COMPONENT_driver.mipi_csi2rx)
|
||||||
|
set_variable_ifdef(CONFIG_ETH_NXP_IMX_NETC CONFIG_MCUX_COMPONENT_driver.netc)
|
||||||
|
set_variable_ifdef(CONFIG_ETH_NXP_IMX_NETC CONFIG_MCUX_COMPONENT_driver.netc_switch)
|
||||||
|
|
||||||
|
set_variable_ifdef(CONFIG_SOC_SERIES_IMXRT10XX CONFIG_MCUX_COMPONENT_driver.ocotp)
|
||||||
|
set_variable_ifdef(CONFIG_SOC_SERIES_IMXRT11XX CONFIG_MCUX_COMPONENT_driver.ocotp)
|
||||||
|
set_variable_ifdef(CONFIG_SOC_FAMILY_KINETIS CONFIG_MCUX_COMPONENT_driver.port)
|
||||||
|
set_variable_ifdef(CONFIG_SOC_SERIES_MCXW CONFIG_MCUX_COMPONENT_driver.ccm32k)
|
||||||
|
set_variable_ifdef(CONFIG_SOC_SERIES_IMXRT5XX CONFIG_MCUX_COMPONENT_driver.iap3)
|
||||||
|
|
||||||
|
if(CONFIG_SOC_MIMXRT1189)
|
||||||
|
set_variable_ifdef(CONFIG_ETH_NXP_IMX_NETC CONFIG_MCUX_COMPONENT_driver.netc_rt1180)
|
||||||
|
set_variable_ifdef(CONFIG_ETH_NXP_IMX_NETC CONFIG_MCUX_COMPONENT_driver.msgintr)
|
||||||
|
elseif(CONFIG_SOC_MIMX9596)
|
||||||
|
set_variable_ifdef(CONFIG_ETH_NXP_IMX_NETC CONFIG_MCUX_COMPONENT_driver.netc_imx95)
|
||||||
|
set_variable_ifdef(CONFIG_ETH_NXP_IMX_NETC CONFIG_MCUX_COMPONENT_driver.msgintr)
|
||||||
|
set_variable_ifdef(CONFIG_ETH_NXP_IMX_NETC CONFIG_MCUX_COMPONENT_driver.irqsteer)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_MCXN OR CONFIG_SOC_SERIES_MCXA)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.mcx_spc ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_BT_NXP AND CONFIG_SOC_SERIES_MCXW OR CONFIG_IEEE802154_MCXW)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.spc ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(((${MCUX_DEVICE} MATCHES "MIMXRT1[0-9][0-9][0-9]") AND (NOT (CONFIG_SOC_MIMXRT1166_CM4 OR CONFIG_SOC_MIMXRT1176_CM4 OR CONFIG_SOC_MIMXRT1189_CM33))) OR
|
||||||
|
((${MCUX_DEVICE} MATCHES "MIMX9596") AND CONFIG_SOC_MIMX9596_M7))
|
||||||
|
set_variable_ifdef(CONFIG_HAS_MCUX_CACHE CONFIG_MCUX_COMPONENT_driver.cache_armv7_m7)
|
||||||
|
elseif((${MCUX_DEVICE} MATCHES "MIMXRT(5|6)") OR (${MCUX_DEVICE} MATCHES "RW61") OR (${MCUX_DEVICE} MATCHES "MCXN.4."))
|
||||||
|
set_variable_ifdef(CONFIG_HAS_MCUX_CACHE CONFIG_MCUX_COMPONENT_driver.cache_cache64)
|
||||||
|
elseif((${MCUX_DEVICE} MATCHES "MK(28|66)") OR (${MCUX_DEVICE} MATCHES "MKE(14|16|18)") OR (CONFIG_SOC_MIMXRT1166_CM4) OR (CONFIG_SOC_MIMXRT1176_CM4))
|
||||||
|
set_variable_ifdef(CONFIG_HAS_MCUX_CACHE CONFIG_MCUX_COMPONENT_driver.cache_lmem)
|
||||||
|
endif()
|
||||||
|
set_variable_ifdef(CONFIG_HAS_MCUX_XCACHE CONFIG_MCUX_COMPONENT_driver.cache_xcache)
|
||||||
|
|
||||||
|
if((${MCUX_DEVICE} MATCHES "MIMX9596") OR (${MCUX_DEVICE} MATCHES "MIMX8UD7") OR (${MCUX_DEVICE} MATCHES "MIMXRT118"))
|
||||||
|
set_variable_ifdef(CONFIG_IPM_IMX CONFIG_MCUX_COMPONENT_driver.mu1)
|
||||||
|
set_variable_ifdef(CONFIG_MBOX_NXP_IMX_MU CONFIG_MCUX_COMPONENT_driver.mu1)
|
||||||
|
else()
|
||||||
|
set_variable_ifdef(CONFIG_IPM_IMX CONFIG_MCUX_COMPONENT_driver.mu)
|
||||||
|
set_variable_ifdef(CONFIG_MBOX_NXP_IMX_MU CONFIG_MCUX_COMPONENT_driver.mu)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_FAMILY_KINETIS OR CONFIG_SOC_SERIES_MCXC)
|
||||||
|
set_variable_ifdef(CONFIG_SOC_FLASH_MCUX CONFIG_MCUX_COMPONENT_driver.flash)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_MK82F25615 OR CONFIG_SOC_MK64F12 OR CONFIG_SOC_MK66F18 OR
|
||||||
|
CONFIG_SOC_MKE14F16 OR CONFIG_SOC_MKE16F16 OR CONFIG_SOC_MKE18F16 OR
|
||||||
|
CONFIG_SOC_MK22F12)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.sysmpu ON PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_MCXW)
|
||||||
|
set_variable_ifdef(CONFIG_SOC_FLASH_MCUX CONFIG_MCUX_COMPONENT_driver.flash_k4)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_LPC51U68 OR CONFIG_SOC_SERIES_LPC54XXX)
|
||||||
|
set_variable_ifdef(CONFIG_SOC_FLASH_MCUX CONFIG_MCUX_COMPONENT_driver.iap)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_LPC51U68 OR CONFIG_SOC_SERIES_LPC54XXX)
|
||||||
|
set_variable_ifdef(CONFIG_ENTROPY_MCUX_RNG CONFIG_MCUX_COMPONENT_driver.rng)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_LPC55XXX)
|
||||||
|
set_variable_ifdef(CONFIG_ENTROPY_MCUX_RNG CONFIG_MCUX_COMPONENT_driver.rng_1)
|
||||||
|
if(CONFIG_SOC_LPC55S36)
|
||||||
|
set_variable_ifdef(CONFIG_SOC_FLASH_MCUX CONFIG_MCUX_COMPONENT_driver.romapi_flash)
|
||||||
|
else()
|
||||||
|
set_variable_ifdef(CONFIG_SOC_FLASH_MCUX CONFIG_MCUX_COMPONENT_driver.iap1)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_LPC51U68 OR CONFIG_SOC_SERIES_LPC54XXX OR CONFIG_SOC_SERIES_LPC55XXX)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.lpc_iocon ON PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_LPC55S36)
|
||||||
|
set_variable_ifdef(CONFIG_ADC_MCUX_LPADC CONFIG_MCUX_COMPONENT_driver.vref_1)
|
||||||
|
set_variable_ifdef(CONFIG_DAC_MCUX_LPDAC CONFIG_MCUX_COMPONENT_driver.vref_1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_IMXRT5XX OR CONFIG_SOC_SERIES_IMXRT6XX)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.lpc_iopctl ON PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_RW6XX)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.ocotp_rw61x ON PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_IMXRT10XX)
|
||||||
|
set_variable_ifdef(CONFIG_PM_MCUX_GPC CONFIG_MCUX_COMPONENT_driver.gpc_1)
|
||||||
|
set_variable_ifdef(CONFIG_PM_MCUX_DCDC CONFIG_MCUX_COMPONENT_driver.dcdc_1)
|
||||||
|
set_variable_ifdef(CONFIG_PM_MCUX_PMU CONFIG_MCUX_COMPONENT_driver.pmu)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_IMXRT11XX)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.romapi ON PARENT_SCOPE)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.anadig_pmu ON PARENT_SCOPE)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.pgmc ON PARENT_SCOPE)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.dcdc_2 ON PARENT_SCOPE)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.anatop_ai ON PARENT_SCOPE)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.gpc_xxx_ctrl ON PARENT_SCOPE)
|
||||||
|
set_variable_ifdef(CONFIG_VIDEO_MCUX_MIPI_CSI2RX CONFIG_MCUX_COMPONENT_driver.mipi_csi2rx_soc)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_IMXRT118X)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.ele_base_api ON PARENT_SCOPE)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.anadig_pmu_1 ON PARENT_SCOPE)
|
||||||
|
set_variable_ifdef(CONFIG_HWINFO_MCUX_SRC_V2 CONFIG_MCUX_COMPONENT_driver.src_3)
|
||||||
|
set_variable_ifdef(CONFIG_WDT_MCUX_RTWDOG CONFIG_MCUX_COMPONENT_driver.src_3)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_MCXA)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_driver.romapi ON PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_MCXN)
|
||||||
|
set_variable_ifdef(CONFIG_SOC_FLASH_MCUX CONFIG_MCUX_COMPONENT_driver.romapi_flashiap)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_variable_ifdef(CONFIG_SOC_SERIES_MCXW CONFIG_MCUX_COMPONENT_driver.elemu)
|
||||||
|
|
||||||
|
# Load all drivers
|
||||||
|
mcux_load_all_cmakelists_in_directory(${SdkRootDirPath}/drivers)
|
51
modules/hal_nxp/mcux/mcux-sdk-ng/middleware/CMakeLists.txt
Normal file
51
modules/hal_nxp/mcux/mcux-sdk-ng/middleware/CMakeLists.txt
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
# Copyright 2025 NXP
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
function(set_variable_ifdef feature_toggle variable)
|
||||||
|
if(${${feature_toggle}})
|
||||||
|
set(${variable} ON CACHE INTERNAL "global variable")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
if(CONFIG_USB_DEVICE_DRIVER)
|
||||||
|
zephyr_include_directories(middleware)
|
||||||
|
|
||||||
|
set(CONFIG_MCUX_COMPONENT_middleware.usb.common_header ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_middleware.usb.device.common_header ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_middleware.usb.phy ON)
|
||||||
|
|
||||||
|
set_variable_ifdef(CONFIG_USB_DC_NXP_EHCI CONFIG_MCUX_COMPONENT_middleware.usb.device.ehci)
|
||||||
|
set_variable_ifdef(CONFIG_USB_DC_NXP_LPCIP3511 CONFIG_MCUX_COMPONENT_middleware.usb.device.ip3511fs)
|
||||||
|
|
||||||
|
# For soc.c build pass
|
||||||
|
zephyr_include_directories(.)
|
||||||
|
zephyr_include_directories(${MCUX_SDK_NG_DIR}/middleware/usb/device)
|
||||||
|
zephyr_include_directories(${MCUX_SDK_NG_DIR}/middleware/usb/phy)
|
||||||
|
zephyr_include_directories(${MCUX_SDK_NG_DIR}/middleware/usb/include)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_UDC_DRIVER)
|
||||||
|
zephyr_include_directories(middleware)
|
||||||
|
|
||||||
|
set(CONFIG_MCUX_COMPONENT_middleware.usb.common_header ON)
|
||||||
|
set(CONFIG_MCUX_COMPONENT_middleware.usb.device.common_header ON)
|
||||||
|
|
||||||
|
set_variable_ifdef(CONFIG_DT_HAS_NXP_USBPHY_ENABLED CONFIG_MCUX_COMPONENT_middleware.usb.phy)
|
||||||
|
set_variable_ifdef(CONFIG_UDC_NXP_EHCI CONFIG_MCUX_COMPONENT_middleware.usb.device.ehci)
|
||||||
|
set_variable_ifdef(CONFIG_UDC_NXP_IP3511 CONFIG_MCUX_COMPONENT_middleware.usb.device.ip3511fs)
|
||||||
|
|
||||||
|
# For soc.c build pass
|
||||||
|
zephyr_include_directories(.)
|
||||||
|
zephyr_include_directories(${MCUX_SDK_NG_DIR}/middleware/usb/device)
|
||||||
|
zephyr_include_directories(${MCUX_SDK_NG_DIR}/middleware/usb/phy)
|
||||||
|
zephyr_include_directories(${MCUX_SDK_NG_DIR}/middleware/usb/include)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(${MCUX_SDK_NG_DIR}/middleware/usb
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/usb
|
||||||
|
)
|
||||||
|
|
||||||
|
if(CONFIG_BT_H4_NXP_CTLR)
|
||||||
|
add_subdirectory(bt_controller)
|
||||||
|
endif()
|
454
modules/hal_nxp/mcux/mcux-sdk/CMakeLists.txt
Normal file
454
modules/hal_nxp/mcux/mcux-sdk/CMakeLists.txt
Normal file
|
@ -0,0 +1,454 @@
|
||||||
|
# Copyright 2025 NXP
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/${MCUX_DEVICE_PATH}
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/common
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/flexcomm
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/lpflexcomm
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/flexio
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/dmamux
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/components/osa
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/components/lists
|
||||||
|
)
|
||||||
|
|
||||||
|
if(CONFIG_CPU_CORTEX_A)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/CMSIS/Core_AArch64/Include
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/cache/armv7-m7
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/CMSIS/Core/Include
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
function(include_ifdef feature_toggle module)
|
||||||
|
if(${${feature_toggle}})
|
||||||
|
include(${module})
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(include_driver_ifdef feature_toggle directory module)
|
||||||
|
if(${${feature_toggle}})
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/${directory}
|
||||||
|
)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/${directory})
|
||||||
|
include(${module})
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
message("Load components for ${MCUX_DEVICE}:")
|
||||||
|
|
||||||
|
#specific operation to shared drivers
|
||||||
|
if((DEFINED CONFIG_FLASH_MCUX_FLEXSPI_XIP) AND (DEFINED CONFIG_FLASH))
|
||||||
|
zephyr_code_relocate(FILES ${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/flexspi/fsl_flexspi.c
|
||||||
|
LOCATION ${CONFIG_FLASH_MCUX_FLEXSPI_XIP_MEM}_TEXT)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Required by all SCFW-based SoCs
|
||||||
|
if (CONFIG_SOC_MIMX8QM6_ADSP OR CONFIG_SOC_MIMX8QX6_ADSP)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/${MCUX_DEVICE_PATH}/scfw_api
|
||||||
|
)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/${MCUX_DEVICE_PATH}/scfw_api)
|
||||||
|
include(driver_scfw_api)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(driver_common)
|
||||||
|
|
||||||
|
#Include system_xxx file
|
||||||
|
#This can be extended to other SoC series if needed
|
||||||
|
if (DEFINED CONFIG_SOC_RESET_HOOK OR DEFINED CONFIG_SOC_SERIES_IMXRT6XX
|
||||||
|
OR DEFINED CONFIG_SOC_SERIES_LPC55XXX OR DEFINED CONFIG_SOC_SERIES_MCXN
|
||||||
|
OR DEFINED CONFIG_SOC_MCXW727C)
|
||||||
|
if (CONFIG_SOC_MIMXRT1166_CM4)
|
||||||
|
include(device_system_MIMXRT1166_cm4)
|
||||||
|
elseif (CONFIG_SOC_MIMXRT1166_CM7)
|
||||||
|
include(device_system_MIMXRT1166_cm7)
|
||||||
|
elseif (CONFIG_SOC_MIMXRT1176_CM4)
|
||||||
|
include(device_system_MIMXRT1176_cm4)
|
||||||
|
elseif (CONFIG_SOC_MIMXRT1176_CM7)
|
||||||
|
include(device_system_MIMXRT1176_cm7)
|
||||||
|
elseif (CONFIG_SOC_MIMXRT1189_CM33)
|
||||||
|
include(device_system_MIMXRT1189_cm33)
|
||||||
|
elseif (CONFIG_SOC_MIMXRT1189_CM7)
|
||||||
|
include(device_system_MIMXRT1189_cm7)
|
||||||
|
elseif (CONFIG_SOC_LPC55S69_CPU0)
|
||||||
|
include(device_system_LPC55S69_cm33_core0)
|
||||||
|
elseif (CONFIG_SOC_LPC55S69_CPU1)
|
||||||
|
include(device_system_LPC55S69_cm33_core1)
|
||||||
|
elseif (CONFIG_SOC_LPC54114_M4)
|
||||||
|
include(device_system_LPC54114_cm4)
|
||||||
|
elseif (CONFIG_SOC_LPC54114_M0)
|
||||||
|
include(device_system_LPC54114_cm0plus)
|
||||||
|
elseif (CONFIG_SOC_MCXN947_CPU0)
|
||||||
|
include(device_system_MCXN947_cm33_core0)
|
||||||
|
elseif (CONFIG_SOC_MCXN947_CPU1)
|
||||||
|
include(device_system_MCXN947_cm33_core1)
|
||||||
|
elseif (CONFIG_SOC_MCXN236)
|
||||||
|
include(device_system_MCXN236)
|
||||||
|
elseif (CONFIG_SOC_MIMXRT798S_CM33_CPU0)
|
||||||
|
include(device_system_MIMXRT798S_cm33_core0)
|
||||||
|
elseif (CONFIG_SOC_MIMXRT798S_CM33_CPU1)
|
||||||
|
include(device_system_MIMXRT798S_cm33_core1)
|
||||||
|
elseif (CONFIG_SOC_MCXW727C_CPU0)
|
||||||
|
include(device_system_MCXW727C_cm33_core0)
|
||||||
|
else()
|
||||||
|
include(device_system)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/common)
|
||||||
|
|
||||||
|
#include shared drivers
|
||||||
|
include_driver_ifdef(CONFIG_ADC_MCUX_LPADC lpadc driver_lpadc)
|
||||||
|
include_driver_ifdef(CONFIG_COUNTER_MCUX_CTIMER ctimer driver_ctimer)
|
||||||
|
include_driver_ifdef(CONFIG_COUNTER_MCUX_LPC_RTC lpc_rtc driver_lpc_rtc)
|
||||||
|
include_driver_ifdef(CONFIG_DMA_MCUX_LPC lpc_dma driver_lpc_dma)
|
||||||
|
include_driver_ifdef(CONFIG_GPIO_MCUX_LPC lpc_gpio driver_lpc_gpio)
|
||||||
|
include_driver_ifdef(CONFIG_NXP_PINT pint driver_pint)
|
||||||
|
include_driver_ifdef(CONFIG_NXP_PINT inputmux driver_inputmux)
|
||||||
|
include_driver_ifdef(CONFIG_I2C_MCUX_FLEXCOMM flexcomm driver_flexcomm)
|
||||||
|
include_driver_ifdef(CONFIG_I2C_MCUX_FLEXCOMM flexcomm/i2c driver_flexcomm_i2c)
|
||||||
|
include_driver_ifdef(CONFIG_I2S_MCUX_FLEXCOMM flexcomm driver_flexcomm)
|
||||||
|
include_driver_ifdef(CONFIG_I2S_MCUX_FLEXCOMM flexcomm/i2s driver_flexcomm_i2s)
|
||||||
|
include_driver_ifdef(CONFIG_MCUX_OS_TIMER ostimer driver_ostimer)
|
||||||
|
include_driver_ifdef(CONFIG_PWM_MCUX_SCTIMER sctimer driver_sctimer)
|
||||||
|
include_driver_ifdef(CONFIG_PWM_MCUX_CTIMER ctimer driver_ctimer)
|
||||||
|
include_driver_ifdef(CONFIG_SOC_FLASH_LPC flashiap driver_flashiap)
|
||||||
|
include_driver_ifdef(CONFIG_SPI_MCUX_FLEXCOMM flexcomm driver_flexcomm)
|
||||||
|
include_driver_ifdef(CONFIG_SPI_MCUX_FLEXCOMM flexcomm/spi driver_flexcomm_spi)
|
||||||
|
include_driver_ifdef(CONFIG_UART_MCUX_FLEXCOMM flexcomm driver_flexcomm)
|
||||||
|
include_driver_ifdef(CONFIG_UART_MCUX_FLEXCOMM flexcomm/usart driver_flexcomm_usart)
|
||||||
|
include_driver_ifdef(CONFIG_WDT_MCUX_WWDT wwdt driver_wwdt)
|
||||||
|
include_driver_ifdef(CONFIG_ADC_MCUX_ADC12 adc12 driver_adc12)
|
||||||
|
include_driver_ifdef(CONFIG_ADC_MCUX_ADC16 adc16 driver_adc16)
|
||||||
|
include_driver_ifdef(CONFIG_CAN_MCUX_FLEXCAN flexcan driver_flexcan)
|
||||||
|
include_driver_ifdef(CONFIG_CAN_MCUX_FLEXCAN_FD flexcan driver_flexcan)
|
||||||
|
include_driver_ifdef(CONFIG_COUNTER_NXP_PIT pit driver_pit)
|
||||||
|
include_driver_ifdef(CONFIG_COUNTER_MCUX_RTC rtc driver_rtc)
|
||||||
|
include_driver_ifdef(CONFIG_DAC_MCUX_DAC dac driver_dac)
|
||||||
|
include_driver_ifdef(CONFIG_DAC_MCUX_DAC32 dac32 driver_dac32)
|
||||||
|
include_driver_ifdef(CONFIG_DMA_MCUX_EDMA dmamux driver_dmamux)
|
||||||
|
include_driver_ifdef(CONFIG_DMA_MCUX_EDMA_V3 dmamux driver_dmamux)
|
||||||
|
include_driver_ifdef(CONFIG_DMA_MCUX_EDMA edma driver_edma)
|
||||||
|
include_driver_ifdef(CONFIG_DMA_MCUX_EDMA_V3 dma3 driver_dma3)
|
||||||
|
include_driver_ifdef(CONFIG_DMA_MCUX_EDMA_V4 edma4 driver_edma4)
|
||||||
|
include_driver_ifdef(CONFIG_ENTROPY_MCUX_RNGA rnga driver_rnga)
|
||||||
|
include_driver_ifdef(CONFIG_ENTROPY_MCUX_TRNG trng driver_trng)
|
||||||
|
include_driver_ifdef(CONFIG_ENTROPY_MCUX_CAAM caam driver_caam)
|
||||||
|
include_driver_ifdef(CONFIG_ETH_NXP_ENET enet driver_enet)
|
||||||
|
include_driver_ifdef(CONFIG_ETH_NXP_IMX_NETC netc driver_netc)
|
||||||
|
include_driver_ifdef(CONFIG_HAS_MCUX_SMC smc driver_smc)
|
||||||
|
include_driver_ifdef(CONFIG_I2C_MCUX i2c driver_i2c)
|
||||||
|
include_driver_ifdef(CONFIG_I2C_NXP_II2C ii2c driver_ii2c)
|
||||||
|
if (CONFIG_NXP_LP_FLEXCOMM)
|
||||||
|
include_driver_ifdef(CONFIG_I2C_MCUX_LPI2C lpflexcomm driver_lpflexcomm)
|
||||||
|
include_driver_ifdef(CONFIG_I2C_MCUX_LPI2C lpflexcomm/lpi2c driver_lpi2c)
|
||||||
|
else()
|
||||||
|
include_driver_ifdef(CONFIG_I2C_MCUX_LPI2C lpi2c driver_lpi2c)
|
||||||
|
endif()
|
||||||
|
include_driver_ifdef(CONFIG_I3C_MCUX i3c driver_i3c)
|
||||||
|
include_driver_ifdef(CONFIG_COMPARATOR_MCUX_ACMP acmp driver_acmp)
|
||||||
|
include_driver_ifdef(CONFIG_SENSOR_MCUX_ACMP acmp driver_acmp)
|
||||||
|
include_driver_ifdef(CONFIG_PWM_MCUX_FTM ftm driver_ftm)
|
||||||
|
include_driver_ifdef(CONFIG_PWM_MCUX_TPM tpm driver_tpm)
|
||||||
|
include_driver_ifdef(CONFIG_PWM_MCUX_PWT pwt driver_pwt)
|
||||||
|
include_driver_ifdef(CONFIG_PWM_MCUX_QTMR qtmr_1 driver_qtmr_1)
|
||||||
|
include_driver_ifdef(CONFIG_SPI_MCUX_DSPI dspi driver_dspi)
|
||||||
|
include_driver_ifdef(CONFIG_SPI_MCUX_ECSPI ecspi driver_ecspi)
|
||||||
|
if (CONFIG_NXP_LP_FLEXCOMM)
|
||||||
|
include_driver_ifdef(CONFIG_SPI_MCUX_LPSPI lpflexcomm driver_lpflexcomm)
|
||||||
|
include_driver_ifdef(CONFIG_SPI_MCUX_LPSPI lpflexcomm/lpspi driver_lpspi)
|
||||||
|
else()
|
||||||
|
include_driver_ifdef(CONFIG_SPI_MCUX_LPSPI lpspi driver_lpspi)
|
||||||
|
endif()
|
||||||
|
include_driver_ifdef(CONFIG_MCUX_FLEXIO flexio driver_flexio)
|
||||||
|
include_driver_ifdef(CONFIG_SPI_MCUX_FLEXIO flexio/spi driver_flexio_spi)
|
||||||
|
include_driver_ifdef(CONFIG_MIPI_DBI_NXP_FLEXIO_LCDIF flexio/mculcd driver_flexio_mculcd)
|
||||||
|
include_driver_ifdef(CONFIG_UART_MCUX uart driver_uart)
|
||||||
|
include_driver_ifdef(CONFIG_UART_MCUX_LPSCI lpsci driver_lpsci)
|
||||||
|
if (CONFIG_NXP_LP_FLEXCOMM)
|
||||||
|
include_driver_ifdef(CONFIG_UART_MCUX_LPUART lpflexcomm driver_lpflexcomm)
|
||||||
|
include_driver_ifdef(CONFIG_UART_MCUX_LPUART lpflexcomm/lpuart driver_lpuart)
|
||||||
|
else()
|
||||||
|
include_driver_ifdef(CONFIG_UART_MCUX_LPUART lpuart driver_lpuart)
|
||||||
|
endif()
|
||||||
|
include_driver_ifdef(CONFIG_WDT_MCUX_WDOG wdog driver_wdog)
|
||||||
|
include_driver_ifdef(CONFIG_WDT_MCUX_WDOG32 wdog32 driver_wdog32)
|
||||||
|
include_driver_ifdef(CONFIG_COUNTER_MCUX_GPT gpt driver_gpt)
|
||||||
|
include_driver_ifdef(CONFIG_COUNTER_MCUX_TPM tpm driver_tpm)
|
||||||
|
include_driver_ifdef(CONFIG_MCUX_GPT_TIMER gpt driver_gpt)
|
||||||
|
include_driver_ifdef(CONFIG_COUNTER_MCUX_QTMR qtmr_1 driver_qtmr_1)
|
||||||
|
include_driver_ifdef(CONFIG_DISPLAY_MCUX_ELCDIF elcdif driver_elcdif)
|
||||||
|
include_driver_ifdef(CONFIG_DISPLAY_MCUX_DCNANO_LCDIF lcdif driver_lcdif)
|
||||||
|
include_driver_ifdef(CONFIG_MCUX_PXP pxp driver_pxp)
|
||||||
|
include_driver_ifdef(CONFIG_LV_USE_GPU_NXP_PXP pxp driver_pxp)
|
||||||
|
include_driver_ifdef(CONFIG_GPIO_MCUX_IGPIO igpio driver_igpio)
|
||||||
|
include_driver_ifdef(CONFIG_GPIO_MCUX_RGPIO rgpio driver_rgpio)
|
||||||
|
include_driver_ifdef(CONFIG_I2S_MCUX_SAI sai driver_sai)
|
||||||
|
include_driver_ifdef(CONFIG_DAI_NXP_SAI sai driver_sai)
|
||||||
|
include_driver_ifdef(CONFIG_MEMC_MCUX_FLEXSPI flexspi driver_flexspi)
|
||||||
|
include_driver_ifdef(CONFIG_PWM_MCUX pwm driver_pwm)
|
||||||
|
include_driver_ifdef(CONFIG_VIDEO_MCUX_CSI csi driver_csi)
|
||||||
|
include_driver_ifdef(CONFIG_VIDEO_MCUX_MIPI_CSI2RX mipi_csi2rx driver_mipi_csi2rx)
|
||||||
|
include_driver_ifdef(CONFIG_WDT_MCUX_IMX_WDOG wdog01 driver_wdog01)
|
||||||
|
include_driver_ifdef(CONFIG_WDT_MCUX_RTWDOG rtwdog driver_rtwdog)
|
||||||
|
include_driver_ifdef(CONFIG_DMA_MCUX_LPC lpc_dma driver_lpc_dma)
|
||||||
|
include_driver_ifdef(CONFIG_MEMC_MCUX_FLEXSPI flexspi driver_flexspi)
|
||||||
|
include_driver_ifdef(CONFIG_HAS_MCUX_RDC rdc driver_rdc)
|
||||||
|
include_driver_ifdef(CONFIG_UART_MCUX_IUART iuart driver_iuart)
|
||||||
|
include_driver_ifdef(CONFIG_ADC_MCUX_12B1MSPS_SAR adc_12b1msps_sar driver_adc_12b1msps_sar)
|
||||||
|
include_driver_ifdef(CONFIG_HWINFO_MCUX_SRC src driver_src)
|
||||||
|
include_driver_ifdef(CONFIG_HWINFO_MCUX_SIM sim driver_sim)
|
||||||
|
include_driver_ifdef(CONFIG_HWINFO_MCUX_RCM rcm driver_rcm)
|
||||||
|
include_driver_ifdef(CONFIG_IPM_MCUX mailbox driver_mailbox)
|
||||||
|
include_driver_ifdef(CONFIG_MBOX_NXP_MAILBOX mailbox driver_mailbox)
|
||||||
|
include_driver_ifdef(CONFIG_COUNTER_MCUX_SNVS snvs_hp driver_snvs_hp)
|
||||||
|
include_driver_ifdef(CONFIG_COUNTER_MCUX_SNVS_SRTC snvs_lp driver_snvs_lp)
|
||||||
|
include_driver_ifdef(CONFIG_COUNTER_MCUX_LPTMR lptmr driver_lptmr)
|
||||||
|
include_driver_ifdef(CONFIG_MCUX_LPTMR_TIMER lptmr driver_lptmr)
|
||||||
|
include_driver_ifdef(CONFIG_IMX_USDHC usdhc driver_usdhc)
|
||||||
|
include_driver_ifdef(CONFIG_MIPI_DSI_MCUX mipi_dsi_split driver_mipi_dsi_split)
|
||||||
|
include_driver_ifdef(CONFIG_MIPI_DSI_MCUX_2L mipi_dsi driver_mipi_dsi)
|
||||||
|
include_driver_ifdef(CONFIG_MCUX_SDIF sdif driver_sdif)
|
||||||
|
include_driver_ifdef(CONFIG_ADC_MCUX_ETC adc_etc driver_adc_etc)
|
||||||
|
include_driver_ifdef(CONFIG_MCUX_XBARA xbara driver_xbara)
|
||||||
|
include_driver_ifdef(CONFIG_MCUX_XBARB xbarb driver_xbarb)
|
||||||
|
include_driver_ifdef(CONFIG_QDEC_MCUX enc driver_enc)
|
||||||
|
include_driver_ifdef(CONFIG_CRYPTO_MCUX_DCP dcp driver_dcp)
|
||||||
|
include_driver_ifdef(CONFIG_DMA_MCUX_SMARTDMA smartdma driver_lpc_smartdma)
|
||||||
|
include_driver_ifdef(CONFIG_DMA_MCUX_SMARTDMA inputmux driver_inputmux)
|
||||||
|
include_driver_ifdef(CONFIG_DAC_MCUX_LPDAC dac_1 driver_dac_1)
|
||||||
|
include_driver_ifdef(CONFIG_NXP_IRQSTEER irqsteer driver_irqsteer)
|
||||||
|
include_driver_ifdef(CONFIG_AUDIO_DMIC_MCUX dmic driver_dmic)
|
||||||
|
include_driver_ifdef(CONFIG_DMA_NXP_EDMA edma_rev2 driver_edma_rev2)
|
||||||
|
include_driver_ifdef(CONFIG_DMA_NXP_SDMA sdma driver_sdma)
|
||||||
|
include_driver_ifdef(CONFIG_SOC_SERIES_MCXN mcx_spc driver_mcx_spc)
|
||||||
|
include_driver_ifdef(CONFIG_SOC_SERIES_MCXA mcx_spc driver_mcx_spc)
|
||||||
|
include_driver_ifdef(CONFIG_ADC_MCUX_GAU cns_adc driver_cns_adc)
|
||||||
|
include_driver_ifdef(CONFIG_DAC_MCUX_GAU cns_dac driver_cns_dac)
|
||||||
|
include_driver_ifdef(CONFIG_DAI_NXP_ESAI esai driver_esai)
|
||||||
|
include_driver_ifdef(CONFIG_MCUX_LPCMP lpcmp driver_lpcmp)
|
||||||
|
include_driver_ifdef(CONFIG_NXP_RF_IMU imu driver_imu)
|
||||||
|
include_driver_ifdef(CONFIG_TRDC_MCUX_TRDC trdc driver_trdc)
|
||||||
|
include_driver_ifdef(CONFIG_S3MU_MCUX_S3MU s3mu driver_s3mu)
|
||||||
|
include_driver_ifdef(CONFIG_PINCTRL_NXP_PORT port driver_port)
|
||||||
|
include_driver_ifdef(CONFIG_GLIKEY_MCUX_GLIKEY glikey driver_glikey)
|
||||||
|
if(CONFIG_BT_NXP)
|
||||||
|
include_driver_ifdef(CONFIG_SOC_SERIES_MCXW spc driver_spc)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (${MCUX_DEVICE} MATCHES "MIMXRT1189")
|
||||||
|
include_driver_ifdef(CONFIG_ETH_NXP_IMX_NETC netc/socs/imxrt1180 driver_netc_soc_imxrt1180)
|
||||||
|
include_driver_ifdef(CONFIG_ETH_NXP_IMX_NETC msgintr driver_msgintr)
|
||||||
|
elseif (${MCUX_DEVICE} MATCHES "MIMX9596")
|
||||||
|
include_driver_ifdef(CONFIG_ETH_NXP_IMX_NETC netc/socs/imx95 driver_netc_soc_imx95)
|
||||||
|
include_driver_ifdef(CONFIG_ETH_NXP_IMX_NETC msgintr driver_msgintr)
|
||||||
|
include_driver_ifdef(CONFIG_ETH_NXP_IMX_NETC irqsteer driver_irqsteer)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (((${MCUX_DEVICE} MATCHES "MIMXRT1[0-9][0-9][0-9]") AND (NOT (CONFIG_SOC_MIMXRT1166_CM4 OR CONFIG_SOC_MIMXRT1176_CM4 OR CONFIG_SOC_MIMXRT1189_CM33))) OR
|
||||||
|
((${MCUX_DEVICE} MATCHES "MIMX9596") AND CONFIG_SOC_MIMX9596_M7))
|
||||||
|
include_driver_ifdef(CONFIG_HAS_MCUX_CACHE cache/armv7-m7 driver_cache_armv7_m7)
|
||||||
|
elseif((${MCUX_DEVICE} MATCHES "MIMXRT(5|6|7)") OR (${MCUX_DEVICE} MATCHES "RW61") OR (${MCUX_DEVICE} MATCHES "MCXN.4."))
|
||||||
|
include_driver_ifdef(CONFIG_HAS_MCUX_CACHE cache/cache64 driver_cache_cache64)
|
||||||
|
elseif((${MCUX_DEVICE} MATCHES "MK(28|66)") OR (${MCUX_DEVICE} MATCHES "MKE(14|16|18)") OR (CONFIG_SOC_MIMXRT1166_CM4) OR (CONFIG_SOC_MIMXRT1176_CM4))
|
||||||
|
include_driver_ifdef(CONFIG_HAS_MCUX_CACHE cache/lmem driver_cache_lmem)
|
||||||
|
endif()
|
||||||
|
include_driver_ifdef(CONFIG_HAS_MCUX_XCACHE cache/xcache driver_cache_xcache)
|
||||||
|
|
||||||
|
if ((${MCUX_DEVICE} MATCHES "MIMX9596") OR (${MCUX_DEVICE} MATCHES "MIMX8UD7") OR (${MCUX_DEVICE} MATCHES "MIMXRT118"))
|
||||||
|
include_driver_ifdef(CONFIG_IPM_IMX mu1 driver_mu1)
|
||||||
|
include_driver_ifdef(CONFIG_MBOX_NXP_IMX_MU mu1 driver_mu1)
|
||||||
|
else()
|
||||||
|
include_driver_ifdef(CONFIG_IPM_IMX mu driver_mu)
|
||||||
|
include_driver_ifdef(CONFIG_MBOX_NXP_IMX_MU mu driver_mu)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_CPU_CORTEX_A)
|
||||||
|
include_driver_ifdef(CONFIG_HAS_MCUX_CACHE cache/armv8-a driver_cache_armv8a)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (${MCUX_DEVICE} MATCHES "MIMXRT11[0-9][0-9]")
|
||||||
|
include_driver_ifdef(CONFIG_PM_MCUX_GPC gpc_3 driver_gpc_3)
|
||||||
|
include_ifdef(CONFIG_HWINFO_MCUX_SRC_V2 driver_soc_src)
|
||||||
|
include_driver_ifdef(CONFIG_WDT_MCUX_RTWDOG soc_src driver_soc_src)
|
||||||
|
elseif (${MCUX_DEVICE} MATCHES "MIMXRT10[0-9][0-9]")
|
||||||
|
include_driver_ifdef(CONFIG_PM_MCUX_GPC gpc_1 driver_gpc_1)
|
||||||
|
include_driver_ifdef(CONFIG_PM_MCUX_DCDC dcdc_1 driver_dcdc_1)
|
||||||
|
include_driver_ifdef(CONFIG_PM_MCUX_PMU pmu driver_pmu)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if((${MCUX_DEVICE} MATCHES "RW61") AND (NOT DEFINED CONFIG_MINIMAL_LIBC))
|
||||||
|
# Whenever building for RW61x without minimal LIBC, use optimized memcpy.
|
||||||
|
# This will avoid issues with unaligned access to peripheral RAM regions
|
||||||
|
# caused by the memcpy implementation in newlib
|
||||||
|
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/utilities/misc_utilities/fsl_memcpy.S)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
if("${CONFIG_SOC_FAMILY}" STREQUAL "nxp_kinetis")
|
||||||
|
|
||||||
|
include_driver_ifdef(CONFIG_SOC_FLASH_MCUX flash driver_flash)
|
||||||
|
|
||||||
|
include(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/port/driver_port.cmake)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/port)
|
||||||
|
|
||||||
|
if(${MCUX_DEVICE} MATCHES "MK(80|82|64|66|M34|M35|E14F|E16F|E18F|22F12)")
|
||||||
|
include(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/sysmpu/driver_sysmpu.cmake)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/sysmpu)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SERIES_MCXC)
|
||||||
|
include_driver_ifdef(CONFIG_SOC_FLASH_MCUX flash driver_flash)
|
||||||
|
elseif(CONFIG_SOC_SERIES_MCXA)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/mcxa_romapi)
|
||||||
|
elseif(CONFIG_SOC_SERIES_MCXN)
|
||||||
|
include_driver_ifdef(CONFIG_SOC_FLASH_MCUX mcx_romapi driver_flashiap)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/mcx_romapi/flash)
|
||||||
|
elseif(CONFIG_SOC_SERIES_MCXW)
|
||||||
|
include_driver_ifdef(CONFIG_SOC_FLASH_MCUX flash_k4 driver_flash_k4)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Temporary change to handle LPC SOC family name change between HWMv1 and HWMv2
|
||||||
|
if(("${CONFIG_SOC_FAMILY}" STREQUAL "lpc") OR ("${CONFIG_SOC_FAMILY}" STREQUAL "nxp_lpc"))
|
||||||
|
|
||||||
|
if ((${MCUX_DEVICE} MATCHES "LPC8[0-9][0-9]") OR (${MCUX_DEVICE} MATCHES "LPC5(1|4)"))
|
||||||
|
include_driver_ifdef(CONFIG_SOC_FLASH_MCUX iap driver_iap)
|
||||||
|
include_driver_ifdef(CONFIG_ENTROPY_MCUX_RNG iap driver_rng)
|
||||||
|
elseif (${MCUX_DEVICE} MATCHES "LPC55")
|
||||||
|
if (${MCUX_DEVICE} MATCHES "LPC55S*3")
|
||||||
|
if(${CONFIG_SOC_FLASH_MCUX})
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/LPC55S36/drivers
|
||||||
|
)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/devices/LPC55S36/drivers/flash)
|
||||||
|
include(driver_flashiap)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
include_driver_ifdef(CONFIG_SOC_FLASH_MCUX iap1 driver_iap1)
|
||||||
|
endif()
|
||||||
|
include_driver_ifdef(CONFIG_ENTROPY_MCUX_RNG rng_1 driver_rng_1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (${MCUX_DEVICE} MATCHES "LPC5")
|
||||||
|
include(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/lpc_iocon/driver_lpc_iocon.cmake)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/lpc_iocon)
|
||||||
|
if (${MCUX_DEVICE} MATCHES "LPC55S*3" AND (DEFINED CONFIG_ADC_MCUX_LPADC OR DEFINED CONFIG_DAC_MCUX_LPDAC))
|
||||||
|
include(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/vref_1/driver_vref_1.cmake)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/vref_1)
|
||||||
|
endif()
|
||||||
|
elseif (${MCUX_DEVICE} MATCHES "LPC8")
|
||||||
|
include(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/lpc_iocon_lite/driver_lpc_iocon_lite.cmake)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/lpc_iocon_lite)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${MCUX_DEVICE} MATCHES "MIMXRT(5|6)")
|
||||||
|
include(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/lpc_iopctl/driver_lpc_iopctl.cmake)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/lpc_iopctl)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_FAMILY_NXP_IMXRT)
|
||||||
|
include_driver_ifdef(CONFIG_ETH_NXP_ENET ocotp driver_ocotp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (CONFIG_USB_DEVICE_DRIVER)
|
||||||
|
set(CONFIG_USE_component_osa_zephyr true)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux-sdk/components/osa
|
||||||
|
)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/middleware/mcux-sdk-middleware-usb
|
||||||
|
)
|
||||||
|
include(middleware_usb_phy)
|
||||||
|
include_ifdef(CONFIG_USB_DC_NXP_EHCI middleware_usb_device_ehci)
|
||||||
|
include_ifdef(CONFIG_USB_DC_NXP_LPCIP3511 middleware_usb_device_ip3511fs)
|
||||||
|
include(set_component_osa)
|
||||||
|
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/middleware/mcux-sdk-middleware-usb/device)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/middleware/mcux-sdk-middleware-usb/phy)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/middleware/mcux-sdk-middleware-usb/include)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (CONFIG_UDC_DRIVER)
|
||||||
|
set(CONFIG_USE_component_osa_zephyr true)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux-sdk/components/osa
|
||||||
|
)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/middleware/mcux-sdk-middleware-usb
|
||||||
|
)
|
||||||
|
include_ifdef(CONFIG_DT_HAS_NXP_USBPHY_ENABLED middleware_usb_phy)
|
||||||
|
include_ifdef(CONFIG_UDC_NXP_EHCI middleware_usb_device_ehci)
|
||||||
|
include_ifdef(CONFIG_UDC_NXP_IP3511 middleware_usb_device_ip3511fs)
|
||||||
|
include(set_component_osa)
|
||||||
|
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/middleware/mcux-sdk-middleware-usb/device)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/middleware/mcux-sdk-middleware-usb/phy)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/middleware/mcux-sdk-middleware-usb/include)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${MCUX_DEVICE} MATCHES "RW61")
|
||||||
|
set(CONFIG_USE_component_osa_zephyr true)
|
||||||
|
if(CONFIG_NXP_FW_LOADER)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mcux-sdk/components/flash/mflash)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mcux-sdk/components/flash/mflash/rdrw612bga)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mcux-sdk/drivers/cache/cache64)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mcux-sdk/drivers/flexspi)
|
||||||
|
include(component_mflash_rdrw610)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${CONFIG_USE_component_osa_zephyr})
|
||||||
|
zephyr_include_directories(${CMAKE_CURRENT_SOURCE_DIR}/mcux-sdk/components/osa)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include_ifdef(CONFIG_USE_component_osa_zephyr set_component_osa)
|
||||||
|
|
||||||
|
if(CONFIG_WIFI_NXP)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mcux-sdk/components/wifi_bt_module)
|
||||||
|
include(component_wifi_bt_module_tx_pwr_limits)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_NXP_FW_LOADER)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mcux-sdk/components/conn_fwloader)
|
||||||
|
include(driver_conn_fwloader)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_NXP_RF_IMU)
|
||||||
|
if(CONFIG_SOC_SERIES_RW6XX)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/components/rpmsg
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/imu
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/gdma
|
||||||
|
)
|
||||||
|
include(component_wireless_imu_adapter)
|
||||||
|
elseif(CONFIG_SOC_SERIES_MCXW)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/components/rpmsg)
|
||||||
|
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/components/rpmsg/fsl_adapter_rpmsg.c)
|
||||||
|
include(component_lists)
|
||||||
|
zephyr_compile_definitions(HAL_RPMSG_SELECT_ROLE=0U)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${MCUX_DEVICE} MATCHES "MCXW")
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/ccm32k
|
||||||
|
)
|
||||||
|
|
||||||
|
include(driver_ccm32k)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/ccm32k)
|
||||||
|
endif()
|
104
modules/hal_nxp/s32/CMakeLists.txt
Normal file
104
modules/hal_nxp/s32/CMakeLists.txt
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
# Copyright 2022-2025 NXP
|
||||||
|
|
||||||
|
# Set the SoC specific drivers and configuration to build
|
||||||
|
if(HWMv2)
|
||||||
|
set(SOC_BASE ${CONFIG_SOC})
|
||||||
|
else()
|
||||||
|
if(${CONFIG_SOC} STREQUAL "s32z27")
|
||||||
|
set(SOC_BASE "s32z270")
|
||||||
|
else()
|
||||||
|
set(SOC_BASE ${CONFIG_SOC})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR}/s32/drivers/${SOC_SERIES} hal_nxp/s32/drivers)
|
||||||
|
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR}/s32/soc/${SOC_BASE} hal_nxp/s32/soc)
|
||||||
|
|
||||||
|
if(CONFIG_HAS_MCUX)
|
||||||
|
|
||||||
|
# This is an adaptation from hal_nxp/mcux/CMakeLists.txt entry CMake in order
|
||||||
|
# to build MCUX drivers together with RTD drivers for NXP S32 devices.
|
||||||
|
# MCUX don't have official support for NXP S32 devices but we are leveraging
|
||||||
|
# the existing shim drivers in Zephyr for those hardware blocks which are
|
||||||
|
# present in both NXP S32 and non NXP S32 devices.
|
||||||
|
#
|
||||||
|
# Glue code must be added for each device supported to build with MCUX. This
|
||||||
|
# can be found in hal_nxp/s32/mcux/devices:
|
||||||
|
# - s32/mcux/devices/${MCUX_DEVICE}/${MCUX_DEVICE}_device.h
|
||||||
|
# redefine RTD module's peripheral access layers and its register masks to be
|
||||||
|
# compatible with MCUX drivers for incompatible peripherals
|
||||||
|
# - s32/mcux/devices/${MCUX_DEVICE}/${MCUX_DEVICE}_features.h
|
||||||
|
# define SoC module's features
|
||||||
|
# - s32/mcux/devices/${MCUX_DEVICE}/${MCUX_DEVICE}_glue_mcux.h
|
||||||
|
# redefine RTD module's base addresses/pointers/interrupts to be compatible
|
||||||
|
# with MCUX drivers
|
||||||
|
# - s32/mcux/devices/${MCUX_DEVICE}/fsl_device_registers.h
|
||||||
|
# expose device features to the MCUX drivers
|
||||||
|
# - s32/mcux/devices/${MCUX_DEVICE}/drivers/fsl_clock.h
|
||||||
|
# required by mcux/mcux-sdk/drivers/common/fsl_common_arm.h (at least)
|
||||||
|
# - s32/mcux/devices/${MCUX_DEVICE}/drivers/driver_reset.cmake
|
||||||
|
# required by mcux/mcux-sdk/drivers/common/drivers_common.cmake
|
||||||
|
# - s32/mcux/devices/${MCUX_DEVICE}/device_system.cmake
|
||||||
|
# required by mcux/hal_nxp.cmake
|
||||||
|
# - s32/mcux/devices/${MCUX_DEVICE}/device_CMSIS.cmake
|
||||||
|
# required by mcux/mcux-sdk/drivers/common/drivers_common.cmake for non DSP
|
||||||
|
# architectures
|
||||||
|
|
||||||
|
function(include_mcux_driver_ifdef feature_toggle directory module)
|
||||||
|
if(${${feature_toggle}})
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/${directory}
|
||||||
|
)
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/${directory})
|
||||||
|
include(${module})
|
||||||
|
message(STATUS "directory ${directory} included")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
set(MCUX_SDK_PROJECT_NAME ${ZEPHYR_CURRENT_LIBRARY})
|
||||||
|
|
||||||
|
# Translate the SoC name into the MCUX device
|
||||||
|
string(TOUPPER ${SOC_BASE} MCUX_DEVICE)
|
||||||
|
|
||||||
|
# This is normally done in mcux/hal_nxp.cmake, but we need to point to the
|
||||||
|
# path on this directory instead
|
||||||
|
list(APPEND CMAKE_MODULE_PATH
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/s32/mcux/devices/${MCUX_DEVICE}
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/s32/mcux/devices/${MCUX_DEVICE}/drivers
|
||||||
|
)
|
||||||
|
|
||||||
|
# MCUX uses the CPU name to expose SoC-specific features of a given peripheral
|
||||||
|
zephyr_compile_definitions(CPU_${MCUX_DEVICE})
|
||||||
|
|
||||||
|
# Clock control is supported through RTD, so disable it in the MCUX drivers
|
||||||
|
zephyr_compile_definitions(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL=1)
|
||||||
|
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/s32/mcux/devices/${MCUX_DEVICE})
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/s32/mcux/devices/${MCUX_DEVICE}/drivers)
|
||||||
|
|
||||||
|
zephyr_linker_sources(RWDATA
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/quick_access_data.ld
|
||||||
|
)
|
||||||
|
zephyr_linker_sources_ifdef(CONFIG_ARCH_HAS_RAMFUNC_SUPPORT
|
||||||
|
RAMFUNC_SECTION
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/quick_access_code.ld
|
||||||
|
)
|
||||||
|
zephyr_linker_sources_ifdef(CONFIG_NOCACHE_MEMORY
|
||||||
|
NOCACHE_SECTION
|
||||||
|
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/nocache.ld
|
||||||
|
)
|
||||||
|
|
||||||
|
# Entry CMake component for MCUX
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../mcux/mcux-sdk/CMakeLists.txt)
|
||||||
|
|
||||||
|
if(${MCUX_DEVICE} MATCHES "S32K1")
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/port)
|
||||||
|
include_mcux_driver_ifdef(CONFIG_PINCTRL port driver_port)
|
||||||
|
|
||||||
|
zephyr_include_directories(${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/sysmpu)
|
||||||
|
include_mcux_driver_ifdef(CONFIG_ARM_MPU sysmpu driver_sysmpu)
|
||||||
|
|
||||||
|
include_mcux_driver_ifdef(CONFIG_HAS_MCUX_CACHE cache/lmem driver_cache_lmem)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endif()
|
|
@ -1,9 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2021,2024 NXP
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
zephyr_include_directories(.)
|
|
||||||
if(CONFIG_DT_HAS_NXP_USBPHY_ENABLED)
|
|
||||||
zephyr_include_directories(${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/middleware/mcux-sdk-middleware-usb/phy)
|
|
||||||
endif()
|
|
|
@ -93,6 +93,9 @@ config SOC_MIMX8MQ6_M4
|
||||||
config MCUX_CORE_SUFFIX
|
config MCUX_CORE_SUFFIX
|
||||||
default "_ca53" if SOC_MIMX8MM6_A53 || SOC_MIMX8MN6_A53 || SOC_MIMX8ML8_A53
|
default "_ca53" if SOC_MIMX8MM6_A53 || SOC_MIMX8MN6_A53 || SOC_MIMX8ML8_A53
|
||||||
default "_dsp" if SOC_MIMX8ML8_ADSP
|
default "_dsp" if SOC_MIMX8ML8_ADSP
|
||||||
|
default "_cm4" if SOC_MIMX8MM6_M4
|
||||||
|
default "_cm7" if SOC_MIMX8ML8_M7
|
||||||
|
default "_cm4" if SOC_MIMX8MQ6_M4
|
||||||
|
|
||||||
if SOC_MIMX8ML8_M7
|
if SOC_MIMX8ML8_M7
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright 2024 NXP
|
# Copyright 2024-2025 NXP
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
@ -24,4 +24,13 @@ if(CONFIG_MEMC_MCUX_FLEXSPI)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if((CONFIG_NXP_IMXRT_BOOT_HEADER) AND (CONFIG_BOOT_FLEXSPI_NOR))
|
||||||
|
set(RT118x_DEVICE_BOOT_HEADER_DIR
|
||||||
|
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/devices/RT/RT1180/MIMXRT1189")
|
||||||
|
|
||||||
|
zephyr_library_sources(${RT118x_DEVICE_BOOT_HEADER_DIR}/xip/fsl_flexspi_nor_boot.c)
|
||||||
|
zephyr_library_include_directories(${RT118x_DEVICE_BOOT_HEADER_DIR}/xip)
|
||||||
|
zephyr_library_include_directories(${RT118x_DEVICE_BOOT_HEADER_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")
|
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")
|
||||||
|
|
|
@ -340,7 +340,7 @@ __weak void clock_init(void)
|
||||||
|
|
||||||
#endif /* CONFIG_COUNTER_MCUX_GPT */
|
#endif /* CONFIG_COUNTER_MCUX_GPT */
|
||||||
|
|
||||||
#ifdef CONFIG_MCUX_ACMP
|
#if defined(CONFIG_COMPARATOR_MCUX_ACMP) || defined(CONFIG_SENSOR_MCUX_ACMP)
|
||||||
|
|
||||||
#if (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(acmp1)) \
|
#if (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(acmp1)) \
|
||||||
|| DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(acmp2)) \
|
|| DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(acmp2)) \
|
||||||
|
@ -352,7 +352,7 @@ __weak void clock_init(void)
|
||||||
CLOCK_SetRootClock(kCLOCK_Root_Acmp, &rootCfg);
|
CLOCK_SetRootClock(kCLOCK_Root_Acmp, &rootCfg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CONFIG_MCUX_ACMP */
|
#endif /* CONFIG_COMPARATOR_MCUX_ACMP || CONFIG_SENSOR_MCUX_ACMP */
|
||||||
|
|
||||||
#if defined(CONFIG_ETH_NXP_IMX_NETC) && (DT_CHILD_NUM_STATUS_OKAY(DT_NODELABEL(netc)) != 0)
|
#if defined(CONFIG_ETH_NXP_IMX_NETC) && (DT_CHILD_NUM_STATUS_OKAY(DT_NODELABEL(netc)) != 0)
|
||||||
/* Configure ENET using SYS_PLL1_DIV2_CLK */
|
/* Configure ENET using SYS_PLL1_DIV2_CLK */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, NXP
|
* Copyright (c) 2021, 2025 NXP
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
@ -57,7 +57,6 @@ static void gpc_set_transition_flow(void)
|
||||||
gpc_tran_step_config_t step_cfg;
|
gpc_tran_step_config_t step_cfg;
|
||||||
|
|
||||||
step_cfg.enableStep = true;
|
step_cfg.enableStep = true;
|
||||||
step_cfg.cntMode = kGPC_StepCounterDisableMode;
|
|
||||||
|
|
||||||
/* Cortex M7 */
|
/* Cortex M7 */
|
||||||
GPC_CM_ConfigCpuModeTransitionStep(GPC_CPU_MODE_CTRL,
|
GPC_CM_ConfigCpuModeTransitionStep(GPC_CPU_MODE_CTRL,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2021-2024 NXP
|
* Copyright 2021-2025 NXP
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
|
LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
|
||||||
|
|
||||||
#ifdef CONFIG_NXP_IMXRT_BOOT_HEADER
|
#if defined(CONFIG_NXP_IMXRT_BOOT_HEADER) && defined(CONFIG_CPU_CORTEX_M7)
|
||||||
#include <fsl_flexspi_nor_boot.h>
|
#include <fsl_flexspi_nor_boot.h>
|
||||||
#endif
|
#endif
|
||||||
#include <zephyr/dt-bindings/clock/imx_ccm_rev2.h>
|
#include <zephyr/dt-bindings/clock/imx_ccm_rev2.h>
|
||||||
|
@ -127,7 +127,7 @@ usb_phy_config_struct_t usbPhyConfig = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NXP_IMXRT_BOOT_HEADER
|
#if defined(CONFIG_NXP_IMXRT_BOOT_HEADER) && defined(CONFIG_CPU_CORTEX_M7)
|
||||||
const __imx_boot_data_section BOOT_DATA_T boot_data = {
|
const __imx_boot_data_section BOOT_DATA_T boot_data = {
|
||||||
#ifdef CONFIG_XIP
|
#ifdef CONFIG_XIP
|
||||||
.start = CONFIG_FLASH_BASE_ADDRESS,
|
.start = CONFIG_FLASH_BASE_ADDRESS,
|
||||||
|
@ -494,7 +494,7 @@ __weak void clock_init(void)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_MCUX_ACMP
|
#if defined(CONFIG_COMPARATOR_MCUX_ACMP) || defined(CONFIG_SENSOR_MCUX_ACMP)
|
||||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(acmp1))
|
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(acmp1))
|
||||||
/* Configure ACMP1 using Osc48MDiv2*/
|
/* Configure ACMP1 using Osc48MDiv2*/
|
||||||
rootCfg.mux = kCLOCK_ACMP_ClockRoot_MuxOscRc48MDiv2;
|
rootCfg.mux = kCLOCK_ACMP_ClockRoot_MuxOscRc48MDiv2;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2024 NXP
|
* Copyright 2024-2025 NXP
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -88,12 +88,9 @@ static void flash_init(XSPI_Type *base, CACHE64_CTRL_Type *cache)
|
||||||
/* Enable subordinate as auto update mode. */
|
/* Enable subordinate as auto update mode. */
|
||||||
base->DLLCR[0] |= XSPI_DLLCR_SLV_EN_MASK | XSPI_DLLCR_SLAVE_AUTO_UPDT_MASK;
|
base->DLLCR[0] |= XSPI_DLLCR_SLV_EN_MASK | XSPI_DLLCR_SLAVE_AUTO_UPDT_MASK;
|
||||||
/* program DLL to desired delay. */
|
/* program DLL to desired delay. */
|
||||||
base->DLLCR[0] |=
|
base->DLLCR[0] |= XSPI_DLLCR_DLLRES(FSL_FEATURE_XSPI_DLL_REF_VALUE_AUTOUPDATE_RES) |
|
||||||
XSPI_DLLCR_DLLRES(FSL_FEATURE_XSPI_DLL_REF_VALUE_AUTOUPDATE_X16_DISABLE_RES) |
|
XSPI_DLLCR_DLL_REFCNTR(2U) | XSPI_DLLCR_DLL_CDL8(1U) | XSPI_DLLCR_FREQEN(1U) |
|
||||||
XSPI_DLLCR_DLL_REFCNTR(
|
XSPI_DLLCR_SLV_FINE_OFFSET(0) | XSPI_DLLCR_SLV_DLY_OFFSET(0);
|
||||||
FSL_FEATURE_XSPI_DLL_REF_VALUE_AUTOUPDATE_X16_DISABLED_REF_COUNTER) |
|
|
||||||
XSPI_DLLCR_SLV_FINE_OFFSET(0) | XSPI_DLLCR_SLV_DLY_OFFSET(0) |
|
|
||||||
XSPI_DLLCR_FREQEN(1U);
|
|
||||||
/* Load above settings into delay chain. */
|
/* Load above settings into delay chain. */
|
||||||
base->DLLCR[0] |= XSPI_DLLCR_SLV_UPD_MASK;
|
base->DLLCR[0] |= XSPI_DLLCR_SLV_UPD_MASK;
|
||||||
base->DLLCR[0] |= XSPI_DLLCR_DLLEN_MASK;
|
base->DLLCR[0] |= XSPI_DLLCR_DLLEN_MASK;
|
||||||
|
|
2
west.yml
2
west.yml
|
@ -203,7 +203,7 @@ manifest:
|
||||||
groups:
|
groups:
|
||||||
- hal
|
- hal
|
||||||
- name: hal_nxp
|
- name: hal_nxp
|
||||||
revision: c41a401b2dec24e0b6d6e3f4bb1b052ad30a7361
|
revision: 6d316e701d4388001d12b65dbae3a8e5f434a5c2
|
||||||
path: modules/hal/nxp
|
path: modules/hal/nxp
|
||||||
groups:
|
groups:
|
||||||
- hal
|
- hal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue