Embedded Design Handbook

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

3.6.5.8.2. Compile the Project

You have to compile the project to produce an executable software image. For the tutorial design example, you must first adjust the project settings to minimize the memory footprint of the software, because your Nios® II hardware system contains only 20 KB of memory. To adjust the project settings and compile the project, perform the following steps:

  1. In the Project Explorer view, right-click count_binary_bsp and click Properties. The Properties for count_binary_bsp dialog box appears.
  2. Click the Nios® II BSP Properties page. The Nios® II BSP Properties page contains basic software build settings.
    Though not needed for this tutorial, note the BSP Editor button in the lower right corner of the dialog box. You use the Nios® II BSP Editor to access advanced BSP settings.
  3. Adjust the following settings to reduce the size of the compiled executable:
    1. Turn on enable_reduced_device_drivers.
    2. Turn off enable_gprof.
    3. Turn on enable_small_c_library.
    4. Turn off enable_sim_optimize.
  4. Click OK.
    The BSP regenerates, the Properties dialog box closes, and you return to the Nios® II SBT for Eclipse.
  5. In the Project Explorer view, right-click the count_binary project and click Build Project.
The Build Project dialog box appears, and the Nios® II SBT for Eclipse begins compiling the project. When compilation completes, a count_binary build complete message appears in the Console view.