File tree Expand file tree Collapse file tree 11 files changed +110
-1
lines changed
arch/arm/cortex_m/scripts Expand file tree Collapse file tree 11 files changed +110
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ zephyr_compile_definitions(${MCUX_CPU})
2828zephyr_sources(devices/${MCUX_DEVICE} /fsl_clock.c)
2929
3030# Build mcux drivers that can be used for multiple SoC's.
31+ add_subdirectory (boards)
3132add_subdirectory (components)
3233add_subdirectory (drivers)
3334
Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (c) 2018, NXP
3+ #
4+ # SPDX-License-Identifier: Apache-2.0
5+ #
6+
7+ add_subdirectory_ifdef(CONFIG_BOARD_MIMXRT1020_EVK evkmimxrt1020)
8+ add_subdirectory_ifdef(CONFIG_BOARD_MIMXRT1050_EVK evkbimxrt1050)
9+ add_subdirectory_ifdef(CONFIG_BOARD_MIMXRT1060_EVK evkmimxrt1060)
Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (c) 2018, NXP
3+ #
4+ # SPDX-License-Identifier: Apache-2.0
5+ #
6+
7+ zephyr_compile_definitions_ifdef(CONFIG_NXP_IMX_RT_BOOT_HEADER XIP_BOOT_HEADER_ENABLE=1)
8+
9+ zephyr_sources_ifdef(CONFIG_BOOT_FLEXSPI_NOR evkbimxrt1050_flexspi_nor_config.c)
Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (c) 2018, NXP
3+ #
4+ # SPDX-License-Identifier: Apache-2.0
5+ #
6+
7+ zephyr_compile_definitions_ifdef(CONFIG_NXP_IMX_RT_BOOT_HEADER XIP_BOOT_HEADER_ENABLE=1)
8+
9+ zephyr_sources_ifdef(CONFIG_BOOT_FLEXSPI_NOR evkmimxrt1020_flexspi_nor_config.c)
Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (c) 2018, NXP
3+ #
4+ # SPDX-License-Identifier: Apache-2.0
5+ #
6+
7+ zephyr_compile_definitions_ifdef(CONFIG_NXP_IMX_RT_BOOT_HEADER XIP_BOOT_HEADER_ENABLE=1)
8+
9+ zephyr_sources_ifdef(CONFIG_BOOT_FLEXSPI_NOR evkmimxrt1060_flexspi_nor_config.c)
Original file line number Diff line number Diff line change 99#define __FLEXSPI_NOR_BOOT_H__
1010
1111#include <stdint.h>
12- #include "board.h"
1312
1413/*! @name Driver version */
1514/*@{*/
Original file line number Diff line number Diff line change @@ -135,6 +135,14 @@ SECTIONS
135135 KEEP (*(.dbghdr ))
136136 KEEP (*(" .dbghdr.*" ))
137137#endif
138+
139+ #ifdef CONFIG_NXP_IMX_RT_BOOT_HEADER
140+ KEEP (*(.boot_hdr .conf ))
141+ . = CONFIG_IMAGE_VECTOR_TABLE_OFFSET;
142+ KEEP (*(.boot_hdr .ivt ))
143+ KEEP (*(.boot_hdr .data ))
144+ #endif
145+
138146 . = CONFIG_TEXT_SECTION_OFFSET;
139147
140148#if defined(CONFIG_SW_VECTOR_RELAY)
Original file line number Diff line number Diff line change 2323#define __ccm_data_section _GENERIC_SECTION(_CCM_DATA_SECTION_NAME)
2424#define __ccm_bss_section _GENERIC_SECTION(_CCM_BSS_SECTION_NAME)
2525#define __ccm_noinit_section _GENERIC_SECTION(_CCM_NOINIT_SECTION_NAME)
26+ #define __imx_boot_conf_section _GENERIC_SECTION(IMX_BOOT_CONF)
27+ #define __imx_boot_data_section _GENERIC_SECTION(IMX_BOOT_DATA)
28+ #define __imx_boot_ivt_section _GENERIC_SECTION(IMX_BOOT_IVT)
2629#endif /* CONFIG_ARM */
2730
2831#if defined(CONFIG_NOCACHE_MEMORY )
Original file line number Diff line number Diff line change 5858#define _CCM_NOINIT_SECTION_NAME .ccm_noinit
5959#endif
6060
61+ #define IMX_BOOT_CONF .boot_hdr.conf
62+ #define IMX_BOOT_DATA .boot_hdr.data
63+ #define IMX_BOOT_IVT .boot_hdr.ivt
64+
6165#ifdef CONFIG_NOCACHE_MEMORY
6266#define _NOCACHE_SECTION_NAME nocache
6367#endif
Original file line number Diff line number Diff line change @@ -152,4 +152,41 @@ config IPG_DIV
152152 int "IPG clock divider"
153153 range 0 3
154154
155+ menuconfig NXP_IMX_RT_BOOT_HEADER
156+ bool "Enable the boot header"
157+ help
158+ Enable data structures required by the boot ROM to boot the
159+ application from an external flash device.
160+
161+ if NXP_IMX_RT_BOOT_HEADER
162+
163+ choice BOOT_DEVICE
164+ prompt "Boot device selection"
165+ default BOOT_FLEXSPI_NOR
166+
167+ config BOOT_FLEXSPI_NOR
168+ bool "FlexSPI serial NOR"
169+
170+ config BOOT_FLEXSPI_NAND
171+ bool "FlexSPI serial NAND"
172+
173+ config BOOT_SEMC_NOR
174+ bool "SEMC parallel NOR"
175+
176+ config BOOT_SEMC_NAND
177+ bool "SEMC parallel NAND"
178+
179+ endchoice
180+
181+ config IMAGE_VECTOR_TABLE_OFFSET
182+ hex "Image vector table offset"
183+ default 0x1000 if BOOT_FLEXSPI_NOR || BOOT_SEMC_NOR
184+ default 0x400 if BOOT_FLEXSPI_NAND || BOOT_SEMC_NAND
185+ help
186+ The Image Vector Table (IVT) provides the boot ROM with pointers to
187+ the application entry point and device configuration data. The boot
188+ ROM reqiures a fixed IVT offset for each type of boot device.
189+
190+ endif # NXP_IMX_RT_BOOT_HEADER
191+
155192endif # SOC_SERIES_IMX_RT
You can’t perform that action at this time.
0 commit comments