AN 669: Drive-On-Chip Design Example for Cyclone V Devices

ID 683466
Date 5/15/2022
Public
Document Table of Contents

Building the Preloader for XiP

Intel provides prebuilt preloader image in the software\spl_bsp\uboot-socfpga\spl directory. Only rebuild the preloader if you change the XiP hardware project.
  1. Configure the preloader for XiP in the bsp-editor:
    1. Turn off BOOT_FROM_SDMMC
    2. Turn on BOOT_FROM_QSPI
    3. Turn on SKIP_SDRAM
    4. Turn off WATCHDOG_ENABLE (unless the application is modified to pet the watchdog)
    5. Turn off SDRAM_SCRUBBING
    6. Turn off SDRAM_SCRUB_REMAIN_REGION
    7. Turn off HARDWARE_DIAGNOSTIC
  2. Generate the preloader.
  3. Compile the preloader (make all).
  4. In include/configs/socfpga_common.h, search for the following macros and #define or #undef:

    #define CONFIG_SPL_SPI_XIP

    #define CONFIG_SPL_SPI_XIP_ADDR 0xFFA40040

    #undef CONFIG_USE_IRQ

  5. Compile the preloader again (make).