Nios® V Processor Software Developer Handbook

ID 743810
Date 10/12/2024
Public
Document Table of Contents

8.12. Overriding the HAL Default Device Drivers

All components can elect to provide a HAL device driver.

However, if the driver supplied with a component is inappropriate for your application, you can override the default driver by supplying a different driver.

You can use the BSP Editor to specify a custom driver in the BSP Editor GUI or on the command line.

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 niosv-bsp command, you replace the default driver for uart0 with a driver called custom_driver as follows:

niosv-bsp -c -p=top.qpf -s=sys.qsys -T=hal settings.bsp --cmd=”set_driver 
custom_driver {uart0}”