User guide
Creating Projects
About the Nios II IDE Managed-Make Build Environment
This topic describes the Nios II IDE build environment for building programs based on the
Nios II hardware abstraction layer (HAL) system library. If you are a typical user, the Nios II
IDE completely manages the build environment for you, relieving you of the need to
understand the inner workings of this managed-make environment.
Internally, the Nios II IDE uses a standard GNU GCC compiler tool chain to compile projects.
The Nios II IDE managed make environment translates your settings and actions in the GUI
into variables and rules in makefiles. The Nios II IDE manages the contents of the makefiles
associated with a project so that you do not need to know anything about makefiles. The
Nios II IDE provides a helpful interface for building complex embedded programs, but there is
no hidden magic to how the Nios II IDE builds projects; in the end, executable software files
are generated by running make.
The Nios II IDE manages the complex task of building software for the Nios II soft-core
processor architecture, which can change from project to project. You might find it useful to
understand how the Nios II IDE manipulates makefiles if you need to separate the process of
building your project from the graphical user interface.
This topic assumes that you are familiar with:
Using the IDE to build projects and browse through project source files
HAL development concepts described in the Nios II Software Developer's Handbook
Makefile usage and syntax
The GCC compiler toolchain
For a full understanding of the inner workings of the build environment, opening and reading
the makefiles is as important as the information contained in this topic. Examples of all of the
makefiles discussed in this topic are located in the directory of any existing project created
with the Nios II IDE, or in the directory where the Nios II Embedded Design Suite (EDS) is
installed.
The following sections provide more details about the Nios II IDE managed-make build
environment.
HAL-Based Projects:
An executable program based on the HAL is constructed using two projects:
A Nios II system library project—The Nios II system library project is used to
build a library which contains all of the system-specific device drivers, and HAL
system routines. This library is automatically configured to match the associated
SOPC Builder system hardware.
A Nios II C/C++ application project—The application project builds the user's
application software, and links it with a Nios II system library project.
The Nios II IDE manages the build process for both of these classes of project using the
makefiles described in this document.
Configuration information is communicated to the build process using the following files:
SOPC Builder system file (.ptf)—The SOPC Builder system describes the
hardware configuration, and is generated by SOPC Builder. Every Nios II system
library is associated to exactly one SOPC Builder system.
31