Specifications

Overriding the HAL Default Device Drivers
All components can elect to provide a HAL device driver.
For more information, refer to Integrating a Device Driver in the HAL.
However, if the driver supplied with a component is inappropriate for your application, you can override
the default driver by supplying a different driver.
In the Nios II SBT for Eclipse, you can use the BSP Editor to specify a custom driver.
For more information about selecting device drivers, refer to “Using the BSP Editor” in the "Getting
Started with the Graphical User Interface" chapter.
On the command line, you specify a custom driver with the following BSP Tcl command:
set_driver <driver name> <component name>
For example, if you are using the nios2-bsp command, you replace the default driver for uart0 with a
driver called custom_driver as follows:
nios2-bsp hal my_bsp --cmd set_driver custom_driver uart0r
Related Information
Integrating a Device Driver in the HAL on page 7-15
Getting Started with the Graphical User Interface on page 2-1
Document Revision History for Developing Device Drivers for the
Hardware Abstraction Layer
Date Version Changes
May 2015 2015.05.14
Maintenance release.
Renamed to Nios II Classic.
May 2011 11.0.0
Introduction of Qsys system integration tool
Added figure illustrating NicheStack implementation layers
February 2011 10.1.0 Removed “Referenced Documents” section.
July 2010 10.0.0 Maintenance release.
November 2009 9.1.0
Introduced the Nios II Software Build Tools for Eclipse.
Removed Nios II IDE-specific information.
7-32
Overriding the HAL Default Device Drivers
NII5V2
2015.05.14
Altera Corporation
Developing Device Drivers for the Hardware Abstraction Layer
Send Feedback