Results 1 to 4 of 4

Thread: Need to route stdout to standard UART instead of JTAG UART

  1. #1
    Join Date
    Jul 2015
    Posts
    27
    Rep Power
    1

    Default 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

  2. #2
    Join Date
    Aug 2014
    Posts
    231
    Rep Power
    1

    Default Re: Need to route stdout to standard UART instead of JTAG UART

    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.

  3. #3
    Join Date
    Jul 2015
    Posts
    27
    Rep Power
    1

    Default Re: Need to route stdout to standard UART instead of JTAG UART

    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

  4. #4
    Join Date
    Jul 2015
    Posts
    27
    Rep Power
    1

    Default Re: Need to route stdout to standard UART instead of JTAG UART

    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

Similar Threads

  1. Change STDOUT dynamically amongst UART RS232 and JTAG UART in C program
    By anuj121990 in forum General Software Forum
    Replies: 1
    Last Post: October 2nd, 2014, 10:21 PM
  2. How to access UART that is not STDIN or STDOUT
    By jetro57070 in forum General Discussion Forum
    Replies: 5
    Last Post: January 4th, 2012, 07:24 AM
  3. using uart as stdin/stdout/stderr
    By prasad_forums in forum General Discussion Forum
    Replies: 1
    Last Post: October 19th, 2005, 10:31 PM
  4. How to print buffer using UART as stdout
    By apai in forum General Software Forum
    Replies: 1
    Last Post: September 24th, 2005, 11:04 AM
  5. custom UART and JTAG UART
    By freezy2000 in forum General Discussion Forum
    Replies: 0
    Last Post: August 3rd, 2005, 01:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •