1 /* 2 * Copyright 2017-2020 NXP 3 * All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #include "fsl_flexspi_nor_boot.h" 9 10 /* Component ID definition, used by tools. */ 11 #ifndef FSL_COMPONENT_ID 12 #define FSL_COMPONENT_ID "platform.drivers.xip_device" 13 #endif 14 15 #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) 16 #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 17 __attribute__((section(".boot_hdr.ivt"), used)) 18 #elif defined(__ICCARM__) 19 #pragma location = ".boot_hdr.ivt" 20 #endif 21 /************************************* 22 * IVT Data 23 *************************************/ 24 const ivt image_vector_table = { 25 IVT_HEADER, /* IVT Header */ 26 IMAGE_ENTRY_ADDRESS, /* Image Entry Function */ 27 IVT_RSVD, /* Reserved = 0 */ 28 (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */ 29 (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */ 30 (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */ 31 (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */ 32 IVT_RSVD /* Reserved = 0 */ 33 }; 34 35 #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 36 __attribute__((section(".boot_hdr.boot_data"), used)) 37 #elif defined(__ICCARM__) 38 #pragma location = ".boot_hdr.boot_data" 39 #endif 40 /************************************* 41 * Boot Data 42 *************************************/ 43 const BOOT_DATA_T g_boot_data = { 44 FLASH_BASE, /* boot start location */ 45 FLASH_SIZE, /* size */ 46 PLUGIN_FLAG, /* Plugin flag*/ 47 0xFFFFFFFFU /* empty - extra data word */ 48 }; 49 #endif 50