nRF5340: Remote IPC shell

You can use this sample to run the remote shell on the nRF5340 network core through the IPC service.

Requirements

The sample supports the following development kit:

Hardware platforms

PCA

Board name

Build target

nRF5340 DK

PCA10095

nrf5340dk_nrf5340

nrf5340dk_nrf5340_cpuapp

Overview

The sample shows how to run remote shell on the remote CPU using IPC service backend for shell. It collects shell data from the IPC endpoint and forwards it to the terminal over USB transport or UART. If the shell runs on the network core, you might want to use a peripheral that the network core does not have, for example USB. You can use this sample to demonstrate how to forward shell data from the network core to the application core and connect the shell terminal through the application core.

Building and running

This sample can be found under samples/nrf5340/remote_shell in the nRF Connect SDK folder structure.

To build the sample with Visual Studio Code, follow the steps listed on the How to build an application page in the nRF Connect for VS Code extension documentation. See Configuring and building an application for other building scenarios, Programming an application for programming steps, and Testing and optimization for general information about testing and debugging in the nRF Connect SDK.

Testing

To test the sample, complete the following steps:

  1. Program the sample to the application core.

  2. Program the Radio test (short-range) sample to the network core.

  3. Plug the DK into a USB host device. The DK is visible as a COM port (Windows) or ttyACM device (Linux) after you connect the development kit over USB.

  4. Connect to the kit with a terminal emulator (for example, nRF Connect Serial Terminal). See Testing and optimization for the required settings and steps.

Dependencies

This sample the following Zephyr libraries:

  • Kernel Services:

    • include/device.h

    • include/drivers/uart.h

    • include/zephyr.h

    • include/sys/ring_buffer.h

    • include/sys/atomic.h

    • include/usb/usb_device.h