1#
2# Copyright 2024 NXP
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6
7zephyr_library()
8zephyr_library_sources(board.c)
9
10if(CONFIG_NXP_IMXRT_BOOT_HEADER)
11  if(NOT ((DEFINED CONFIG_BOARD_MIMXRT1180_EVK_MIMXRT1189_CM33)
12	  OR (DEFINED CONFIG_BOARD_MIMXRT1180_EVK_MIMXRT1189_CM7)))
13    message(WARNING "It appears you are using the board definition for "
14     "the MIMXRT1180-EVK, but targeting a custom board. You may need to "
15     "update your flash configuration or device configuration data blocks")
16  endif()
17  set(RT1180_BOARD_DIR
18    "${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1180")
19  if(CONFIG_BOOT_FLEXSPI_NOR)
20    # Include flash configuration block for RT1180 EVK from NXP's HAL.
21    # This configuration block may need modification if another flash chip is
22    # used on your custom board.
23    zephyr_compile_definitions(XIP_EXTERNAL_FLASH=1)
24    zephyr_compile_definitions(XIP_BOOT_HEADER_ENABLE=1)
25    zephyr_library_sources(${RT1180_BOARD_DIR}/xip/evkmimxrt1180_flexspi_nor_config.c)
26    zephyr_library_include_directories(${RT1180_BOARD_DIR}/xip)
27    zephyr_library_include_directories(${RT1180_BOARD_DIR})
28  endif()
29  if(CONFIG_EXTERNAL_MEM_CONFIG_DATA AND CONFIG_NXP_IMX_EXTERNAL_HYPERRAM)
30     zephyr_compile_definitions(USE_HYPERRAM)
31     zephyr_library_sources(${RT1180_BOARD_DIR}/xip/evkmimxrt1180_flexspi_nor_config.c)
32  endif()
33endif()
34