Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12618 Discussions

Unhooking stdio from JTAG UART

Oliver_I_Sedlacek
New Contributor III
734 Views

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?

0 Kudos
1 Solution
KellyJialin_Goh
Employee
681 Views

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



View solution in original post

0 Kudos
5 Replies
KellyJialin_Goh
Employee
682 Views

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



0 Kudos
KellyJialin_Goh
Employee
663 Views

Hi,

Any updates from your side? Is there any further help needed from my end?


Thank you.

Regards,

Kelly


0 Kudos
KellyJialin_Goh
Employee
646 Views

Hi,

Any updates from your side? Is there any further help needed from my end?


Thank you.

Regards,

Kelly


0 Kudos
Oliver_I_Sedlacek
New Contributor III
628 Views

Sorted now thanks. It took some looking to find the customisation settings for the BSP but I turned off the UART drivers and wrote my own.

0 Kudos
KellyJialin_Goh
Employee
616 Views

Hi,

 I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.


Thank you.

Regards,

Kelly Jialin, GOH


0 Kudos
Reply