blob: 97e50d37d6579020591291f16a3058e36fc6b8b1 [file] [log] [blame]
#
# Copyright 2017-2022 NXP
#
# SPDX-License-Identifier: Apache-2.0
#
if (CONFIG_DISPLAY)
message(WARNING "
CONFIG_DISPLAY: Running this firmware on a board without a display may damage the board
")
endif()
if(CONFIG_NXP_IMX_RT_BOOT_HEADER)
zephyr_library()
if(CONFIG_BOARD_MIMXRT1050_EVK)
set(FLASH_CONF evkbimxrt1050_flexspi_nor_config.c)
elseif(CONFIG_BOARD_MIMXRT1050_EVK_QSPI)
set(FLASH_CONF evkbimxrt1050_flexspi_nor_qspi_config.c)
else()
message(WARNING "It appears you are using the board definition for "
"the MIMXRT1050-EVK, but targeting a custom board. You may need to "
"update your flash configuration or device configuration data blocks")
# Default EVK configuration uses hyperflash, so use that file
set(FLASH_CONF evkbimxrt1050_flexspi_nor_config.c)
endif()
set(RT1050_BOARD_DIR
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkbimxrt1050")
if(CONFIG_BOOT_FLEXSPI_NOR)
# Include flash configuration block for RT1050 EVK from NXP's HAL.
# This configuration block may need modification if another flash chip is
# used on your custom board. See NXP AN12238 for more information.
zephyr_compile_definitions(XIP_BOOT_HEADER_ENABLE=1)
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
zephyr_library_sources(${RT1050_BOARD_DIR}/xip/${FLASH_CONF})
zephyr_library_include_directories(${RT1050_BOARD_DIR}/xip)
endif()
if(CONFIG_DEVICE_CONFIGURATION_DATA)
# Include device configuration data block for RT1050 EVK from NXP's HAL.
# This configuration block may need modification if another SDRAM chip
# is used on your custom board.
zephyr_compile_definitions(XIP_BOOT_HEADER_DCD_ENABLE=1)
zephyr_library_sources(${RT1050_BOARD_DIR}/dcd.c)
endif()
endif()