Bare Metal User Guide

ID 683211
Date 11/30/2015
Public
Document Table of Contents

1.7.2. Build the Project

Now that the project is imported, make sure the current toolchain (ARM Compiler 5 (DS-5 built-in)) is selected correctly in the Tool Chain Editor. This can be done with the following steps:
  1. Right click on the project and select "Properties".
  2. Go to C/C++ Build > Tool Chain Editor.
    Next, right click on the project and select "Build Project". This initiates a Make-based build that does the following:
    • Copies additional source files from HWLibs into the project.
    • Creates an object file of the FPGA image using standard Altera tools and objcopy.
    • Compiles and links everything into an AXF executable (ELF-compatible).
    Note: For details of what is happening, browse the Makefile that is part of the project.

Included with the project are a number of key items that are used to properly initialize the ARM core:

  • A scatter file (scatter.scat) that the ARM tools use for linking
    Note: Much simpler that GNU linker syntax
  • A DS script file (debug-hosted.ds) that controls debug flow
    • Loads and runs the Preloader
    • Loads the project executable (HWLIB.axf) and stops at the “main” symbol
  • A readme.txt file which describes more about this example