Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12435 Discussions

Need to route stdout to standard UART instead of JTAG UART

Honored Contributor II



I have a Nios II system that is running Linux 3.10.31 and I would like to update my system configuration so that the kernel debug messages during bootup that are sent to stdout are routed to a standard UART instead of the Altera JTAG UART.  


From my understanding, what I need to change is the following: 


  1. Add a UART component to my Qsys system and connect to the Nios II processor.  

  2. In my kernel configuration (menuconfig), I need to disable the Altera JTAG UART serial and turn on the enable the standard UART (8250/16550 compatible) serial port.  

  3. In my console boot parameters, I need to change the console output from ttyJ0 to ttyS0  



If all is good, I should be able to use minicom to access the ttyS0 port to see the debug output. 


Does that sound right or am I missing anything? 


Any feedback would be appreciated. I look forward to your response. 


- Brad
0 Kudos
3 Replies
Honored Contributor II

Are you using the Nios Eclipse plugin? If so, in the BSP Editor one of the screens allows you to select the default devices to use for each of STDIN/STDOUT/STDERR.

Honored Contributor II



Thank you for your reply. 


I'm booting from Linux so I'm not using the Altera Software Build Tool (SBT) chain that allows me to select the default output device for stdout. 


I'm currently heading down the path that involves updating the kernel build as well as the appropriate support files to use the Altera UART instead of the JTAG UART. 


- Brad
Honored Contributor II

UPDATE (08.26.15): 


I have an update on what I have found to switch from the Altera JTAG UART to a standard Altera UART for the linux console output for U-Boot. 


It appears that the u-boot configuration support file found @ /u-boot-socfpga/include/configs needs to be updated so that at a minimum: 


  1. #define config_altera_jtag_uart is undefined and #define config_altera_uart is defined. 

  2. #define config_sys_nios_fixedbaud needs to be undefined so I can set the baud rate based on the config_sys_uart_baud parameter. 

  3. #define config_sys_console_info_quiet is also undefined so that the console output is active. 


I'm also not enabling the UART (8250/16550 compatible) serial port in the kernel menuconfig because I will be using the Altera soft UART device found in the Qsys library. I will only be using some RS-232 level translators in a daughter card that is connected to one of the HSMC connectors on the Arria II GX board. 


However, I have made these changes and rebuilt the u-boot image but I still do not see any console output from u-boot when the processor is reset. 


Anyone have any ideas of what additional configuration changes that still might be needed? 


Any feedback would be appreciated. 


- Brad