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

Board target

nRF5340 DK

PCA10095

nrf5340dk

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, follow the instructions in Configuring and building an application for your preferred building environment. See also Programming an application for programming steps and Testing and optimization for general information about testing and debugging in the nRF Connect SDK.

Note

When building repository applications in the SDK repositories, building with sysbuild is enabled by default. If you work with out-of-tree freestanding applications, you need to manually pass the --sysbuild parameter to every build command or configure west to always use it.

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