Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

JTAG uart usage

Hi

Maby i'ts stupid quastion, but anyway i ask.

Is it possible to use Jtag uart in NIos2 system like terminal for exchage commands.

For example i write in C++ code some - printf("hello world"); and that "hello word" shown on my PC in some window

If yes, give me,please the link with documentation or just tell me how to do it.

tnx.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you can use the jtag to communicate with the integrated terminal in

    the debugger, but not with user programs (no description,

    how to access the jtag device from user pc programs)

    under your debugger NIOS II harwareconfiguration->Tab "Target Connection"

    you can set NiosII Terminal communication device to your jtag_uart.

    in your system library properties you can set stdout,stderr,stdin to your

    jtag_uart, then you can use normal printf("hello world").

    otherwise

    FILE* jtfp;

    ...

    jtfp = fopen ("/dev/jtag_uart","rw");

    if(jtfp) {

    fprintf(jtfp,"JTAG UART OPEN FOR DEBUG\n");

    }
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The JTAG UART handling program on the host is nios2-terminal. This is what is used by the IDE to communicate with the target.

    You can use this from the SDK shell (or from any other shell which has the path set up correctly).

    It has quite extensive help text available using `nios2-terminal --help` if you're not happy with the standard options.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Is there a way to access the JTAG UART directly from a windows app. perhaps by redirecting the IO from nios2-terminal?

    The xxxBlaster cables use either the parallel port or USB, but getting at the uart at this low level is probably not the way to go.

    thanks