Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

5.3.7.3. Building the Small Boot Copier Using 'make'

This section describes how to build the example small boot copier from the Nios® II command shell.

To build the example small boot copier in a new Intel® Quartus® Prime project directory, perform the following steps:

  1. Verify that you have downloaded and unzipped the file described in “Software Files” on page 2 to your <project> directory on your computer.
  2. Open a Nios® II command shell. (On Windows, click Start > All Programs > Intel > Nios® II EDS > Nios® II Command Shell).
  3. Change to the directory <project> /boot_copier_sw/app/small_boot_copier.
  4. In Platform Designer, determine the base address of your ext_flash component (<flash_base_address>).
  5. In the Nios® II command shell, type the following command:
    make all FLASH_BASE=<flash_base_address> \
    BOOT_IMAGE_OFFSET=0x00240000

This command builds the small boot copier, hardcoding it to look for a boot image at offset 0x00240000 in flash memory and assumes no other important data is located there. You can freely modify this offset to a value more relevant to your application, but when you program the boot image in flash memory (in step 2 on page 23), ensure that you program it to the same offset you choose in the current step.

Note: This example uses a makefile in place of the Nios® II software build tools because you are only compiling a single assembly file, with no associated drivers.

You now have an executable boot copier named small_boot_copier.hex that is ready to run on the Nios® II processor. Next, you must create an application to boot using the new boot copier.