Specifications
Table 4-3: Application Makefile Targets
Target Operation
help Displays all available application makefile targets.
all (default) Builds the associated BSP and libraries, and then builds the
application executable file.
app Builds only the application executable file.
bsp Builds only the BSP.
libs Builds only the libraries and the BSP.
clean Performs a clean build of the application. Deletes all applica‐
tion-related generated files. Leaves associated BSP and
libraries alone.
clean_all Performs a clean build of the application, and associated
BSP and libraries (if any).
clean_bsp Performs a clean build of the BSP.
clean_libs Performs a clean build of the libraries and the BSP.
download-elf Builds the application executable file and then downloads
and runs it.
program-flash Runs the Nios II flash programmer to program your flash
memory.
Note: You can use the download-elf makefile target if the host system is connected to a single USB-
Blaster download cable. If you have more than one download cable, you must download your
executable with a separate command. Set up a run configuration in the Nios II SBT for Eclipse, or
use nios2-download, with the --cable option to specify the download cable.
Nios II Embedded Software Projects
The Nios II SBT supports the following kinds of software projects:
• C/C++ application projects
• C/C++ user library projects
• BSP projects
This section discusses each type of project in detail.
Applications and Libraries
The Nios II SBT has nearly identical support for C/C++ applications and libraries. The support for
applications and libraries is very simple. For each case, the SBT generates a private makefile (named
Makefile). The private makefile is used to build the application or user library.
The private makefile builds one of two types of files:
• A .elf file—For an application
• A library archive file (.a)—For a user library
4-4
Nios II Embedded Software Projects
NII5V2
2015.05.14
Altera Corporation
Nios II Software Build Tools
Send Feedback