How to add remote devices

nRF Connect for VS Code

tags
nRF Connect for VS Code

You can add remote J-Link devices that are accessible over the network to work with boards connected to remote debuggers. This allows you to flash and debug applications on devices that are not physically connected to your machine.

The following procedure shows how to connect to a device within LAN. The device is connected to the remote server using USB.

To add support for remote devices, complete the following steps:

  1. On the machine where the J-Link debugger is physically connected, open SEGGER J-Link Remote Server.
    Use the latest version tested and recommended by Nordic Semiconductor, as per prerequisites.
  2. Configure the J-Link remote server to match your network configuration.
    For example, the following configuration example uses USB as the J-Link connection and provides the serial number of the remote device; the server is configured to use LAN and uses the default listening port.

    SEGGER J-Link Remote Server configuration for USB connection and LAN

  3. Copy the listening port number.

  4. Click OK.
    The remote server starts and waits for client connection.

    SEGGER J-Link Remote Server waiting for client connection

  5. Copy the client connection IP string.

  6. Open VS Code settings.
    You can do this by selecting File > Preferences > Settings.

  7. Search for nrf-connect.remoteDevices.

    Remote devices setting in the VS Code UI

  8. Click Add Item to add a new entry to the configuration array.

  9. Provide the entry in the format IP:PORT, where IP is the IP address of the remote device and PORT is the listening port number, and click OK.

    Adding a remote device item in the VS Code UI

  10. Close VS Code settings.

  11. In the Connected Devices View, click Refresh Connected Devices.
    The newly added remote device is now visible in the list alongside locally connected devices.

    Remote device in the Connected Devices View

Note

Real-time monitoring of device connection and disconnection is not available for remote devices, as the extension cannot detect when a remote device is physically connected or disconnected from the J-Link debugger. You may need to manually refresh the Connected Devices View to see connection status changes.

After adding remote devices, you can use them just like locally connected devices. For example, flash applications to them, link them to build configurations, or connect to them using RTT.