Forum Discussion

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

Way to use CTRL-C w/o exiting nios2-terminal?

There are a lot of times when I need to stop a process that I've started by using CTRL-C, or perhaps suspend it with CTRL-Z. I do this all the time on my Linux development box. The problem with the Nios II IDE is that the nios2-terminal shell uses these same controls.

Is there a way to use CTRL-C and/or CTRL-Z functionality without exiting from the nios2-terminal?

Is there an escape sequence that can be used?

Can these controls be reassigned for the Nios II IDE shell?

Currently I've been running all of my programs in the background (i.e. appending a "&" at the end of the command line), but this is starting to get annoying.

Does anyone have a suggestion?

6 Replies

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

    I switched to serial console (with the client hyperTerminal) because of the "annoying" feature of nios2-terminal.

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

    Thanks for the suggestion. I have moved away from the JTAG serial console and utilized one of the nios serial ports. I am using minicom under Linux as my terminal emulator. No more CTRL-C problems.

    Thanks again!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I've done this "accidentally" before, I'm guessing I've pressed a key sequence that acted as escape character and then sent the break signal to the other side, but not sure how repeat it haha, anyone has any idea how to do this?

    the question is, how to send a break signal over the nios2-terminal?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    When uClinux is started use stty intr '$' to use ctrl + $ as break key

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

    To escape sequence to leave nios2-terminal is ^D (0x04).

    Here is the code used to close nios2-terminal at the end of main():

    printf("%c",0x04);