User guide
Creating Projects
About Nios II IDE Projects
An individual Nios II IDE project is a group of files treated as a unit, containing source code,
makefiles, binaries, and other related files. The Nios II IDE provides the following project
types. A typical executable program consists of two or more individual projects working in
conjunction. The most common combination is a Nios II C/C++ application project that
depends on a Nios II system library project.
Nios II C/C++ application project:
A Nios II C/C++ application project contains a C/C++ program, usually including a
project's main() function. Building a Nios II C/C++ application project results in an
executable file (.elf) that you can run on target hardware, the Nios II instruction set
simulator (ISS), and the ModelSim hardware simulator. A Nios II C/C++ application
project depends on a single system library project and might reference functions in a
Nios II C/C++ library project.
A Nios II C/C++ application project is a Nios II IDE managed-make project. The Nios II
IDE creates the necessary makefiles and manages the project for you.
Nios II system library project:
A Nios II system library project serves as an interface to the target hardware. A Nios II
system library project contains all settings that affect how a program interacts with the
target, including the hardware abstraction layer (HAL) code. Nios II C/C++ application
projects depend on a Nios II system library project, making the application code portable
to other Nios II systems. Multiple Nios II C/C++ applications can share a single Nios II
system library.
A Nios II system library project contains automatically-generated code based on
hardware-specific information provided by the hardware designer, generated during the
normal hardware development flow. SOPC Builder generates the following files, which the
Nios II IDE uses to create, build, and run projects.
The SOPC Builder system file (.ptf)—This file contains the description of the
Nios II processor system, including processor cores, memories, and peripherals.
The Nios II IDE uses this file to create and build projects.
The SRAM object file (.sof)—This binary file contains the hardware image of the
SOPC Builder system for the target FPGA. The Nios II IDE uses this file to run
projects. After downloading the .sof file to the board, the FPGA behaves as
specified by the hardware design, which in this case, includes a Nios II processor
system.
After building
a Nios II system library project, source code for the device drivers for the
project is linked to the altera.components project found in the Nios II C/C++ Projects
view. The compiled object files reside under the system library project Debug or Release
obj directory.
Nios II C/C++ library project:
29