1#
2# Copyright 2018-2022 NXP
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6
7if (CONFIG_DISPLAY)
8message(WARNING "
9CONFIG_DISPLAY: Running this firmware on a board without a display may damage the board
10")
11endif()
12
13if(CONFIG_NXP_IMX_RT_BOOT_HEADER)
14  zephyr_library()
15  if(CONFIG_BOARD_MIMXRT1060_EVK)
16    set(FLASH_CONF evkmimxrt1060_flexspi_nor_config.c)
17    set(BOARD_NAME evkmimxrt1060)
18  elseif(CONFIG_BOARD_MIMXRT1060_EVK_HYPERFLASH)
19    # No flash configuration block exists for the RT1060 with HyperFlash in
20    # the SDK, but we can reuse the block for the RT1050 as both boards use
21    # the same HyperFlash chip
22    set(FLASH_CONF evkbimxrt1050_flexspi_nor_config.c)
23    set(BOARD_NAME evkbimxrt1050)
24  elseif(CONFIG_BOARD_MIMXRT1060_EVKB)
25    set(FLASH_CONF evkbmimxrt1060_flexspi_nor_config.c)
26    set(BOARD_NAME evkbmimxrt1060)
27  else()
28    message(WARNING "It appears you are using the board definition for "
29     "the MIMXRT1060-EVK, but targeting a custom board. You may need to "
30     "update your flash configuration or device configuration data blocks")
31    # Default EVK configuration uses qspi, so use that file
32    set(FLASH_CONF evkbmimxrt1060_flexspi_nor_config.c)
33    set(BOARD_NAME evkbmimxrt1060)
34  endif()
35  set(RT1060_BOARD_DIR
36    "${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/${BOARD_NAME}")
37  if(CONFIG_BOOT_FLEXSPI_NOR)
38    # Include flash configuration block for RT1060 EVK from NXP's HAL.
39    # This configuration block may need modification if another flash chip is
40    # used on your custom board. See NXP AN12238 for more information.
41    zephyr_compile_definitions(XIP_BOOT_HEADER_ENABLE=1)
42    zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
43    zephyr_library_sources(${RT1060_BOARD_DIR}/xip/${FLASH_CONF})
44    zephyr_library_include_directories(${RT1060_BOARD_DIR}/xip)
45  endif()
46  if(CONFIG_DEVICE_CONFIGURATION_DATA)
47    # Include device configuration data block for RT1060 EVK from NXP's HAL.
48    # This configuration block may need modification if another SDRAM chip
49    # is used on your custom board.
50    zephyr_compile_definitions(XIP_BOOT_HEADER_DCD_ENABLE=1)
51    zephyr_library_sources(${RT1060_BOARD_DIR}/dcd.c)
52  else()
53    if(CONFIG_SRAM_BASE_ADDRESS EQUAL 0x80000000)
54      message(WARNING "You are using SDRAM as RAM but no device "
55        "configuration data (DCD) is included. This configuration may not boot")
56    endif()
57  endif()
58endif()
59
60if(CONFIG_MCUX_GPT_TIMER)
61  message(WARNING "You appear to be using the GPT hardware timer. "
62    "This timer will enable lower power modes, but at the cost of reduced "
63    "hardware timer resolution")
64endif()
65