Specifications

Related Information
Nios II Software Build Tools on page 4-1
For more information about the software example scripts, refer to “Nios II Design Example Scripts”.
Nios II Software Build Tools Reference on page 15-1
For further information about each command argument in the table, refer to "Nios II Software Build
Tools Utilities" chapter; and for more information about the software example scripts, refer to "Nios II
Design Example Scripts".
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-elfr
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
Creating Memory Initialization Files
To create memory initialization files for a Nios II system, you can use the Nios II Command Shell. Change
to the software application folder, and type:
make mem_init_generater
This command creates the memory initialization and simulation files for all memory devices. It also
generates a Quartus II IP File (.qip). The .qip file tells the Quartus II software where to find the initializa‐
tion files. Add the .qip file to your Quartus II project.
Document Revision History for Getting Started from the Command Line
Date Version Changes
May 2015 2015.05.14
Maintenance release.
Renamed to Nios II Classic.
January 2014 13.1.0
Updated GCC4 toolchain from 4.1.2 to GCC 4.7.3.
Removed references to the Nios II IDE.
Removed references to GCC 3.
Removed the “Using the Nios II C2H Compiler” section.
3-12
Running make
NII5V2
2015.05.14
Altera Corporation
Getting Started from the Command Line
Send Feedback