Guidelines for Developing a Nios II HAL Device Driver

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

1.12.3.1. Using the Reduced Device Drivers API Option

The Reduced device drivers option generates a #define statement for ALT_USE_SMALL_DRIVERS. To turn on this option, set hal.enable_reduced_device_drivers to true. Setting this option has the following effects on correctly-written UART device drivers:

  • Sets #define ALT_USE_SMALL_DRIVERS
  • Activates polled mode only for the UART device
  • Disables floating-point support in printf() and sprintf()
  • Configures drivers to ignore flow control.

The figure below shows excerpts from the summary.html file generated by the SBT for a BSP with reduced device drivers enabled.

Figure 22. hal.enable_reduced_device_drivers in summary.html
Note: For more information about the Reduced device drivers option, refer to "Reducing Code Footprint" in the "Developing Programs Using the Hardware Abstraction Layer" chapter and to "Reducing Code Footprint" in the "Developing Device Drivers for the Hardware Abstraction Layer" chapter of the Nios II Software Developer's Handbook.