nRF Terminal VSCode extension command arguments for scripted start w/o interaction

Hi,

I usually launch 2 terminals at the same time: One for a serial connection and another for RTT to monitor 2 MCUs in parallel. With the VSCode extension nRF Terminal this takes quite a amount of user input steps every time to open both. Also the command `nrf-terminal.startWithPrevConfig` is nice, but really only uses the latest config. A better solution would be another command to provide a list of the previously used configs (e.g. last 10) to start with. That would be nice improvement.

Additionally I am thinking of using a macro extension or keybinding which can execute multiple VSCode commands  (see VSCode's `runCommands` for key bindings) like the commands provided by your extension (e.g. `nrf-terminal.startTerminal`). But when calling `nrf-terminal.startTerminal` I would need to call it with a number of arguments to achieve no interaction (currently the default user input pops up when calling without arguments). I found out that I can call it with argument `{"connectionType":"serialport"}` or `{"connectionType":"rtt"}` but I don't know how to inject the followup options like COM port or Jlink S/N, etc. Is it even possible to start a terminal as a one-shot command with arguments without user input? if yes, can you provide the argument list API? Or would that also be a feature request?

I am currently using v2023.10.17 of nRF Terminal in VSCode and latest VSCode at the time of writing.

Note: The Marketplace of the extension points to https://github.com/nrfconnect/vscode-nrf-terminal, but this page is 404 as of today for me ... so I am posting my question here.

Parents
  • Hi Christian,

    Thank you very much for the feedback. I will discuss this with the team and get back to you as soon as possible.

    Best Regards,

    Priyanka

  • Hi Christian,

    I am attaching examples for both serial and rtt that should work. Also, thank you for the feedback, and we will improve on it. 

    "nRF Terminal - serial": {
      "command": "nrf-terminal.startTerminal",
      "args": {
        "connectionType": "serialport",
        "devicePath": "/dev/tty.usbmodem0006857411221", // use COM?? on windows
        "baudRate": 112500,
        "dataBits": 8,
        "stopBits": 1,
        "parity": "none",
        "rtscts": false
      }
    },
    "nRF Terminal - rtt": {
      "command": "nrf-terminal.startTerminal",
      "args": {
        "connectionType": "rtt",
        "serialNumber": "685741122",
        "device": "NRF52833_xxAA", // value of `nrfjprog --snr 685741122 --deviceversion` without the last _REV part
        "memoryAddress": "auto" // or use "0x01234567" as direct address
      }
    }

    Regards,

    Priyanka

Reply
  • Hi Christian,

    I am attaching examples for both serial and rtt that should work. Also, thank you for the feedback, and we will improve on it. 

    "nRF Terminal - serial": {
      "command": "nrf-terminal.startTerminal",
      "args": {
        "connectionType": "serialport",
        "devicePath": "/dev/tty.usbmodem0006857411221", // use COM?? on windows
        "baudRate": 112500,
        "dataBits": 8,
        "stopBits": 1,
        "parity": "none",
        "rtscts": false
      }
    },
    "nRF Terminal - rtt": {
      "command": "nrf-terminal.startTerminal",
      "args": {
        "connectionType": "rtt",
        "serialNumber": "685741122",
        "device": "NRF52833_xxAA", // value of `nrfjprog --snr 685741122 --deviceversion` without the last _REV part
        "memoryAddress": "auto" // or use "0x01234567" as direct address
      }
    }

    Regards,

    Priyanka

Children
No Data
Related