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

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

5.4. Creating and Booting an HPS SD Card Software Image

You create a bootable SD card that contains the software image, so you can boot the software automatically without using the Arm Development Studio Debugger.
  1. Create a bootable SD card image using the prebuilt image that the SoC EDS includes.
    1. On Windows, download and install an SD card image writing utility, for example balenaEtcher or win32diskimager.
    2. Find the bootable image for your development board.
      For the Cyclone SoC development board find CycloneV_Linux_SDCard .img in the Intel SoC EDS default installation directory: C:\intelFPGA\17.0\embedded\embeddedsw\socfpga\prebuilt_images\CycloneV_Linux_SDCard.tar.gz
    3. Launch SOC EDS Command Shell as an administrator, and change the current directory to the prebuilt_images directory by typing:
      cd ‘C:\intelFPGA\17.0\embedded\embeddedsw\socfpga\prebuilt_images’
    4. Untar the compressed image file by typing:.
      tar -xf CycloneV_Linux_SDCard.tar.gz
    5. Write the bootable image, CycloneV_Linux_SDCard.img, with your SD card image writing utility on Windows or dd command on Linux onto your SD card.
  2. Update the preloader with the binary image made from the Drive-On-Chip design.
    1. Type cd <project_dir>/software/spl_bsp in the SoC EDS command shell.
    2. Write the preloader image into the proper location in your SD card by typing:
      alt-boot-disk-util -p preloader-mkpimage.bin -a write -d <sdcard_drive_letter> .
      Where <sdcard_drive> is the drive your SD card appears as on your computer.
  3. Copy doc_tandem_cvsx.bin to the FAT partition on the SD card.
  4. Enter U-Boot:
    1. Unmount the SD card from PC, then insert the SD card in the board
    2. Open your Terminal Emulator software and connect to the board.
    3. Apply power to the board.
    4. Press a key in the terminal window when prompted, before the countdown finishes and the operating system boots.
  5. At the U-Boot prompt, edit the U-Boot environment by typing:
    setenv mmcload "mmc rescan;fatload mmc 0:1 0x01000000 doc_tandem_cvsx.bin ;go 0x01000000"
  6. Save the new environment setting by typing:
    env save
  7. Configure the FPGA.
  8. Boot the software: press Cold Reset on the development boards again.