fsl_flexspi_nor_boot.c 1.7 KB

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