Specifications

For more information about how the SBT keeps your BSP up-to-date with your hardware system, refer to
“Revising Your BSP” in the "Nios II Software Build Tools" chapter.
In summary, when your program is based on a HAL BSP, you can always keep it synchronized with the
target hardware with a few simple SBT commands.
Related Information
Nios II Software Build Tools Reference on page 15-1
Nios II Embedded Software Projects on page 4-4
The system.h System Description File
The system.h file provides a complete software description of the Nios II system hardware. Not all
information in system.h is useful to you as a programmer, and it is rarely necessary to include it explicitly
in your C source files. Nonetheless, system.h holds the answer to the question, “What hardware is present
in this system?”
The system.h file describes each peripheral in the system and provides the following details:
The hardware configuration of the peripheral
The base address
Interrupt request (IRQ) information (if any)
A symbolic name for the peripheral
The Nios II SBT generates the system.h file for HAL BSP projects. The contents of system.h depend on
both the hardware configuration and the HAL BSP properties.
Note:
Do not edit system.h. The SBT provides facilities to manipulate system settings.
For more information about how to control BSP settings, refer to the “HAL BSP Settings” chapter.
Example 6–1. Excerpts from a system.h File Detailing Hardware Configuration Options
/*
* sys_clk_timer configuration
*
*/
#define SYS_CLK_TIMER_NAME "/dev/sys_clk_timer"
#define SYS_CLK_TIMER_TYPE "altera_avalon_timer"
#define SYS_CLK_TIMER_BASE 0x00920800
#define SYS_CLK_TIMER_IRQ 0
#define SYS_CLK_TIMER_ALWAYS_RUN 0
#define SYS_CLK_TIMER_FIXED_PERIOD 0
/*
* jtag_uart configuration
*
*/
#define JTAG_UART_NAME "/dev/jtag_uart"
#define JTAG_UART_TYPE "altera_avalon_jtag_uart"
#define JTAG_UART_BASE 0x00920820
#define JTAG_UART_IRQ 1
Related Information
HAL BSP Settings on page 6-1
NII5V2
2015.05.14
The system.h System Description File
6-3
Developing Programs Using the Hardware Abstraction Layer
Altera Corporation
Send Feedback