/
Using Serial Console and Zephyr Shell
Using Serial Console and Zephyr Shell
1. Overview
This note describes how to set up and use the serial console for the SOM-NRF9151 board. Use of the Zephyr interactive shell command interface, on top of the serial consoles, is explained as well.
2. Setting Up Serial Consoles
After the board is connected to your Linux PC, use dmesg
to identify the board serial port:
$ sudo dmesg
...
[7356251.975352] usb 3-7.2: new full-speed USB device number 17 using xhci_hcd
[7356252.071980] usb 3-7.2: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[7356252.072000] usb 3-7.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[7356252.072007] usb 3-7.2: Product: FT232R USB UART
[7356252.072012] usb 3-7.2: Manufacturer: FTDI
[7356252.072017] usb 3-7.2: SerialNumber: B002LIR7
[7356252.082000] ftdi_sio 3-7.2:1.0: FTDI USB Serial Device converter detected
[7356252.082102] usb 3-7.2: Detected FT232R
[7356252.085252] usb 3-7.2: FTDI USB Serial Device converter now attached to ttyUSB0
...
Connect to it using a terminal program on your Linux PC:
picocom -b 115200 /dev/ttyUSB0
After the application image is programmed to the target board, reset the board and observe the Zephyr banner and shell on the serial console:
*** Booting nRF Connect SDK v2.8.0-e3db2104b81d ***
*** Using Zephyr OS v3.7.99-78e3b9740208 ***
...
uart:~$
3. Using Zephyr Shell
The SOM-NRF9151 software is configured to run the Zephyr interactive shell command interface in the serial console.
Most of the standard Zephyr shell features are available, such as the auto-completion, command history, etc.
Various Zephyr shell commands are enabled:
uart:~$ kernel
kernel - Kernel commands
Subcommands:
cycles :Kernel cycles.
reboot :Reboot.
stacks :List threads stack usage.
threads :List kernel threads.
version :Kernel version.
sleep :ms
log-level :<module name> <severity (0-4)>
uart:~$ device
device - Device commands
Subcommands:
list :List configured devices
uart:~$
, multiple selections available,
Related content
Setting Up Emcraft SOM-NRF9151 Hardware Platform
Setting Up Emcraft SOM-NRF9151 Hardware Platform
More like this
Installing SOM-NRF9151 Images
Installing SOM-NRF9151 Images
More like this
Building SOM-NRF9151 Software
Building SOM-NRF9151 Software
More like this
QA Test Plan
QA Test Plan
Read with this
Setting up the STM32MP1 SOM Starter Kit
Setting up the STM32MP1 SOM Starter Kit
More like this
Understanding Zephyr BSP for SOM-NRF9151
Understanding Zephyr BSP for SOM-NRF9151
Read with this