1#
2# Copyright (c) 2018-2020, NXP
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6
7if(CONFIG_BOARD_MIMXRT1010_EVK)
8  set(MCUX_BOARD evkmimxrt1010)
9elseif(CONFIG_BOARD_MIMXRT1015_EVK)
10  set(MCUX_BOARD evkmimxrt1015)
11elseif(CONFIG_BOARD_MIMXRT1020_EVK)
12  set(MCUX_BOARD evkmimxrt1020)
13elseif(CONFIG_BOARD_MIMXRT1024_EVK)
14  set(MCUX_BOARD evkmimxrt1024)
15elseif(CONFIG_BOARD_MIMXRT1050_EVK OR CONFIG_BOARD_MIMXRT1050_EVK_QSPI)
16  set(MCUX_BOARD evkbimxrt1050)
17elseif(CONFIG_BOARD_MIMXRT1060_EVK OR CONFIG_BOARD_MIMXRT1060_EVK_HYPERFLASH)
18  set(MCUX_BOARD evkmimxrt1060)
19elseif(CONFIG_BOARD_MIMXRT1064_EVK)
20  set(MCUX_BOARD evkmimxrt1064)
21elseif(CONFIG_BOARD_MIMXRT685_EVK)
22  set(MCUX_BOARD evkmimxrt685)
23elseif(CONFIG_BOARD_MIMXRT1170_EVK_CM7 OR CONFIG_BOARD_MIMXRT1170_EVK_CM4)
24  set(MCUX_BOARD evkmimxrt1170)
25endif()
26
27zephyr_compile_definitions_ifdef(CONFIG_NXP_IMX_RT_BOOT_HEADER XIP_BOOT_HEADER_ENABLE=1)
28zephyr_compile_definitions_ifdef(CONFIG_NXP_IMX_RT6XX_BOOT_HEADER BOOT_HEADER_ENABLE=1)
29zephyr_compile_definitions_ifdef(CONFIG_DEVICE_CONFIGURATION_DATA XIP_BOOT_HEADER_DCD_ENABLE=1)
30zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
31
32if (${MCUX_BOARD} MATCHES "evk[bm]imxrt1[0-9][0-9][0-9]")
33zephyr_library_sources_ifdef(CONFIG_BOOT_FLEXSPI_NOR ${MCUX_BOARD}/${MCUX_BOARD}_flexspi_nor_config.c)
34zephyr_library_sources_ifdef(CONFIG_DEVICE_CONFIGURATION_DATA ${MCUX_BOARD}/dcd.c)
35zephyr_include_directories(./${MCUX_BOARD})
36elseif (${MCUX_BOARD} MATCHES "evkmimxrt6[0-9][0-9]")
37zephyr_library_sources_ifdef(CONFIG_NXP_IMX_RT6XX_BOOT_HEADER ${MCUX_BOARD}/flash_config.c)
38endif()
39