Specifications
Related Information
• The system.h System Description File on page 6-3
• Getting Started with the Graphical User Interface on page 2-1
• Nios II Software Build Tools on page 4-1
• Nios II Software Build Tools Reference on page 15-1
The Nios II Embedded Project Structure
The creation and management of software projects based on the HAL is integrated tightly with the Nios II
SBT. This section discusses the Nios II projects as a basis for understanding the HAL.
Note:
The label for each block describes what or who generated that block, and an arrow points to each
block’s dependency.
Figure 6-1: The Nios II HAL Project Structure Emphasizing How the HAL BSP Fits In
Nios II Program
Based on HAL
Also known as: Your program, or user project
Defined by: .c, .h, .S, .s files
Created by: You
Defined by: .sopcinfo file
Defined by: Nios II BSP settings
Also known as: Nios II processor system, or the hardware
Created by: System integration tool (Qsys)
Created by: Nios II command line tools
Application Project
HAL BSP Project
Hardware System
Every HAL-based Nios II program consists of two Nios II projects.
For more information, refer to the figure above. Your application-specific code is contained in one project
(the user application project), and it depends on a separate BSP project (the HAL BSP).
The application project contains all the code you develop. The executable image for your program
ultimately results from building both projects.
With the Nios II SBT for Eclipse, the tools create the HAL BSP project when you create your application
project. In the Nios II SBT command line flow, you create the BSP using nios2-bsp or a related tool.
The HAL BSP project contains all information needed to interface your program to the hardware. The
HAL drivers relevant to your hardware system are incorporated in the BSP project.
The BSP project depends on the hardware system, defined by a SOPC Information File (.sopcinfo). The
Nios II SBT can keep your BSP up-to-date with the hardware system. This project dependency structure
isolates your program from changes to the underlying hardware, and you can develop and debug code
without concern about whether your program matches the target hardware.
You can use the Nios II SBT to update your BSP to match updated hardware. You control whether and
when these updates occur.
6-2
The Nios II Embedded Project Structure
NII5V2
2015.05.14
Altera Corporation
Developing Programs Using the Hardware Abstraction Layer
Send Feedback