Unhooking stdio from JTAG UART
In my world of deeply embedded real time systems stdin and stdout are more of a hinderance than a help, so I usually leave them as stubs. What I need instead is relatively low level access to UARTs so I can process byte streams using byte queues and interrupts.
I've been reading secion 7.7 of the NIOS2 software developer handbook where is says:
The HAL manages stdin , stdout , and stderr behind the scenes, which allows you to send and receive characters through these channels without explicitly managing file descriptors. For example, the HAL directs the output of printf() to standard out, and perror() to standard error. You associate each channel to a specific hardware device by manipulating BSP settings.
How exactly do I tell the HAL to butt out so I can do my own thing with the UARTs?
Hi,
Greetings and welcome to Intel's forum.
The Intel-provided driver implements a HAL character-mode device driver that integrates into the HAL system library for Nios® II and Nios® V processors systems. HAL users should access the JTAG UART via the familiar HAL API and the ANSI C standard library, rather than accessing the JTAG UART registers. ioctl() requests are defined that allow HAL users to control the hardware-dependent aspects of the JTAG UART.
As the HAL and JTAG UART are co-related, there is no way to separate both operations and carry out only one of the operations. Here is the link for more information on the JTAG UART IP core with software programming model for your reference: https://www.intel.com/content/www/us/en/docs/programmable/683130/21-4/software-programming-model-16085.html
Hope this clarify your doubts.
Thank you.
Regards,
Kelly