Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,162 Views

Need to route stdout to standard UART instead of JTAG UART

Hi, 

 

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
Altera_Forum
Honored Contributor I
149 Views

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.

Altera_Forum
Honored Contributor I
149 Views

Hi TCWORLD, 

 

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
Altera_Forum
Honored Contributor I
149 Views

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
Reply