Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

3.5. Running make

nios2-bsp places all BSP files in the BSP directory, specified on the command line with argument --bsp-dir. After running nios2-bsp, you run make, which compiles the source code. The result of compilation is the BSP library file, also in the BSP directory. The BSP is ready to be linked with your application.

You can specify multiple targets on a make command line. For example, the following command removes existing object files in the current project directory, builds the project, downloads the project to a board, and runs it:

make clean download-elf

You can modify an application or user library makefile with the nios2-lib-update-makefile and nios2-app-update-makefile utilities. With these utilities, you can execute the following tasks:

  • Add source files to a project
  • Remove source files from a project
  • Add compiler options to a project’s make rules
  • Modify or remove compiler options in a project’s make rules