fsl_flexspi_nor_boot.c 1.5 KB

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