Guidelines for Developing a Nios II HAL Device Driver

ID 683146
Date 6/12/2015
Public
Document Table of Contents

1.2.2. Preparing the my_uart_driver Device Driver

This section provides some background on how the my_uart_driver device driver is associated with a component instance. You must specify the name of the directory to store both the software device drivers and the custom components. The name should be descriptive enough to identify the custom component. The directory must be under the <my_design>/ip directory. The librarian searches for user component files named <component_name>_sw.tcl in directories below this ip directory.

Every HAL device driver has a software description file. The software description file naming convention is <component_name> _sw.tcl. This name must match the corresponding <component_name> _hw.tcl file generated by the Component Editor.

The my_uart_driver device driver’s software description file is <my_design> /ip/my_uart/my_uart_sw.tcl.

All components generated by the Component Editor have a <component_name> _hw.tcl file. However, certain components provided by Altera, such as the Altera_Avalon_UART, are generated outside the Component Editor, and therefore do not have a <component_name> _hw.tcl file.

For additional information about creating device driver Tcl scripts, refer to the “Driver and Software Package Tcl Script Creation” section of the Developing Device Drivers for the Hardware Abstraction Layer chapter in the Nios II Software Developer’s Handbook.

Altera provides an additional tool with the Nios II processor, the System Console, that is useful for testing component instances and software device drivers, and for constructing BSPs. This application note does not describe the System Console.

For information about the System Console, refer to the System Console User Guide.

Did you find the information on this page useful?

Characters remaining:

Feedback Message