Altera_Forum
Honored Contributor
15 years agooverriding HAL driver, alt_sys_init()
On my system there are 3 uarts and with one of them I'd like to use a custom uart driver. Referring to the software developer's handbook for overriding default device drivers I switched to the software build flow (which I am new to) and called
set_driver my_uart_driver uart_2 in the bsp's tcl script. For now the my_uart driver is just a copy of altera's driver with all instances of altera_avalon_uart replaced by my_uart, with appropriate capitalization, except for the hw_class_name property in my_uart_sw.tcl. Looking at the bsp's summary.html correctly shows that my_uart_driver is used for uart_2, however when looking at alt_sys_init.c it looks like it is not calling the MY_UART_INSTANCE or MY_UART_INIT macros on this device but rather the ALTERA_AVALON_UART_ ones. Auto_initialize is set to true in my_uart_sw.tcl so I am not sure why it isn't using my driver's macros. Any info about what is going on would be appreciated. Thanks!