Hello Shell

This is a derived work from the original Zephyr “Hello World” example! Most of the stuff in this README file needs to be redesigned and changed!

Overview

A simple Hello World example that can be used with any supported board and prints ‘Hello World! I’m THE SHELL’ to the console. This application can be built into modes:

Requirements

The sample supports the following platforms (located in samples/helloshell/tests.yaml):

Hardware platforms

Order number

Board name

Board target

STM32C5A3CG

XIAO STM32C5 (BBE)

xiao_stm32c5/stm32c5a3xx/bbe

STM32C5A3CG

XIAO STM32C5

xiao_stm32c5

xiao_stm32c5/stm32c5a3xx

ATSAMD21G18A

XIAO SAMD21 (Seeeduino XIAO)

xiao_samd21

xiao_samd21/samd21g18a

RP2350

XIAO RP2350 (BBE)

xiao_rp2350/rp2350a/m33_0/bbe

xiao_rp2350/rp2350a/hazard3_0/bbe

RP2350

XIAO RP2350

xiao_rp2350/rp2350a/m33_0

xiao_rp2350/rp2350a/hazard3_0

RP2040

XIAO RP2040 (BBE)

xiao_rp2040/rp2040/bbe

RP2040

XIAO RP2040

xiao_rp2040

xiao_rp2040/rp2040

STM32F103

WeAct BluePill+

weact_bluepillplus_stm32f103cb

weact_bluepillplus_stm32f103cb/stm32f103xb

weact_bluepillplus_stm32f103c8

CH32V203

WeAct BluePill+

weact_bluepillplus_ch32v203c8

weact_bluepillplus_ch32v203c8/ch32v203

weact_bluepillplus_ch32v203c6

RP2350

Waveshare RP2350-Matrix

waveshare_rp2350_matrix/rp2350a/m33_0

waveshare_rp2350_matrix/rp2350a/hazard3_0

RP2350

Waveshare RP2350-CAN

waveshare_rp2350_can/rp2350a/m33_0

waveshare_rp2350_can/rp2350a/hazard3_0

RP2040

Waveshare RP2040-Zero

waveshare_rp2040_zero

waveshare_rp2040_zero/rp2040

RP2040

Waveshare RP2040-Tiny

waveshare_rp2040_tiny

waveshare_rp2040_tiny/rp2040

RP2040

Waveshare RP2040-Plus

waveshare_rp2040_plus@16mb

waveshare_rp2040_plus@16mb/rp2040

waveshare_rp2040_plus

RP2040

Waveshare RP2040-One

waveshare_rp2040_one

waveshare_rp2040_one/rp2040

RP2040

Waveshare RP2040-Matrix

waveshare_rp2040_matrix

waveshare_rp2040_matrix/rp2040

RP2040

Waveshare RP2040-LCD-0.96

waveshare_rp2040_lcd_0_96

waveshare_rp2040_lcd_0_96/rp2040

RP2040

Waveshare RP2040-Geek

waveshare_rp2040_geek

waveshare_rp2040_geek/rp2040

RP2040

Waveshare RP2040-ETH

waveshare_rp2040_eth

waveshare_rp2040_eth/rp2040

STM32F103

VccGND BluePill

vccgnd_bluepill_stm32f103cb

vccgnd_bluepill_stm32f103cb/stm32f103xb

vccgnd_bluepill_stm32f103c8

STM32F072

VccGND BluePill

vccgnd_bluepill_stm32f072cb

vccgnd_bluepill_stm32f072cb/stm32f072xb

vccgnd_bluepill_stm32f072c8

STM32F051

VccGND BluePill

vccgnd_bluepill_stm32f051c8

vccgnd_bluepill_stm32f051c8/stm32f051x8

STM32F030

VccGND BluePill

vccgnd_bluepill_stm32f030c8

vccgnd_bluepill_stm32f030c8/stm32f030x8

ATSAMD21G18A

Seeeduino XIAO (BBE)

seeeduino_xiao/samd21g18a/bbe

ATSAMD21G18A

Seeeduino XIAO

seeeduino_xiao

seeeduino_xiao/samd21g18a

ATSAMD21G18A

Seeeduino Lotus Cortex-M0+

seeeduino_lotus

seeeduino_lotus/samd21g18a

ATSAMD21G18A

Seeeduino Cortex-M0+

seeeduino_cm0

seeeduino_cm0/samd21g18a

RP2040

Raspberry Pi Pico (BBE)

rpi_pico/rp2040/w/bbe

rpi_pico/rp2040/bbe

RP2040

Raspberry Pi Pico

rpi_pico/rp2040/w

rpi_pico

RP2350

Raspberry Pi Pico 2 (BBE)

rpi_pico2/rp2350a/m33_0/w/bbe

rpi_pico2/rp2350a/m33_0/bbe

rpi_pico2/rp2350a/hazard3_0/bbe

RP2350

Raspberry Pi Pico 2

rpi_pico2/rp2350a/m33_0/w

rpi_pico2/rp2350a/m33_0

rpi_pico2/rp2350a/hazard3_0

RP2040

PicoBoy

picoboy

picoboy/rp2040

RP2040

PicoBoy Color

picoboy_color

picoboy_color/rp2040

RP2350

PicoBoy Color Plus (PBC+)

picoboy_color_plus/rp2350a/m33_0

picoboy_color_plus/rp2350a/hazard3_0

STM32L496ZG

Nucleo L496ZG (BBE)

nucleo_l496zg/stm32l496xx/bbe

STM32L496ZG

Nucleo L496ZG

nucleo_l496zg

nucleo_l496zg/stm32l496xx

STM32F767ZI

Nucleo F767ZI (BBE)

nucleo_f767zi/stm32f767xx/bbe

STM32F767ZI

Nucleo F767ZI

nucleo_f767zi

nucleo_f767zi/stm32f767xx

STM32F746ZG

Nucleo F746ZG (BBE)

nucleo_f746zg/stm32f746xx/bbe

STM32F746ZG

Nucleo F746ZG

nucleo_f746zg

nucleo_f746zg/stm32f746xx

STM32F413ZH

Nucleo F413ZH (BBE)

nucleo_f413zh/stm32f413xx/bbe

STM32F413ZH

Nucleo F413ZH

nucleo_f413zh

nucleo_f413zh/stm32f413xx

STM32F401RE

Nucleo F401RE (BBE)

nucleo_f401re/stm32f401xe/bbe

STM32F401RE

Nucleo F401RE

nucleo_f401re

nucleo_f401re/stm32f401xe

STM32F303RE

Nucleo F303RE (BBE)

nucleo_f303re/stm32f303xe/bbe

STM32F303RE

Nucleo F303RE

nucleo_f303re

nucleo_f303re/stm32f303xe

nRF9160

nRF9160 DK

nrf9160dk/nrf9160

nRF52840

nRF9160 DK

nrf9160dk/nrf52840

nRF52840

nRF52840 DK

nrf52840dk/nrf52840

Native (64-bit)

Native simulator - native_sim

native_sim/native/64

Native (32-bit)

Native simulator - native_sim

native_sim

native_sim/native

RP2350

Mini USB RP2350

mini_usb_rp2350/rp2350a/m33_0

mini_usb_rp2350/rp2350a/hazard3_0

mini_usb_rp2350@16mb/rp2350a/m33_0

mini_usb_rp2350@16mb/rp2350a/hazard3_0

RP2040

Mini USB RP2040

mini_usb_rp2040@chipled

mini_usb_rp2040@chipled/rp2040

mini_usb_rp2040@16mb

mini_usb_rp2040

i.MX RT1170 (CM7)

MIMXRT1170-EVK

with Bridle’s MIMXRT1170-EVK (BBE)

mimxrt1170_evk@B/mimxrt1176/cm7

mimxrt1170_evk@A/mimxrt1176/cm7

i.MX RT1170 (CM4)

MIMXRT1170-EVK

with Bridle’s MIMXRT1170-EVK (BBE)

mimxrt1170_evk@B/mimxrt1176/cm4

mimxrt1170_evk@A/mimxrt1176/cm4

i.MX RT1060

MIMXRT1060-EVK (BBE)

mimxrt1060_evk@C/mimxrt1062/qspi/bbe

mimxrt1060_evk@C/mimxrt1062/hyperflash/bbe

mimxrt1060_evk@B/mimxrt1062/qspi/bbe

mimxrt1060_evk@A/mimxrt1062/qspi/bbe

i.MX RT1060

MIMXRT1060-EVK

mimxrt1060_evk@C/mimxrt1062/qspi

mimxrt1060_evk@C/mimxrt1062/hyperflash

mimxrt1060_evk@B/mimxrt1062/qspi

mimxrt1060_evk@A/mimxrt1062/qspi

i.MX RT1010

MIMXRT1010-EVK (BBE)

mimxrt1010_evk/mimxrt1011/bbe

i.MX RT1010

MIMXRT1010-EVK

mimxrt1010_evk

mimxrt1010_evk/mimxrt1011

STM32F777NI

TiaC Magpie F777NI

magpie_f777ni

magpie_f777ni/stm32f777xx

RP2350

Cytron MOTION 2350 Pro

cytron_motion_2350_pro/rp2350a/m33_0

cytron_motion_2350_pro/rp2350a/hazard3_0

RP2040

Cytron Maker Pi RP2040

cytron_maker_pi_rp2040

cytron_maker_pi_rp2040/rp2040

RP2040

Cytron Maker Nano RP2040

cytron_maker_nano_rp2040

cytron_maker_nano_rp2040/rp2040

nRF52840

TiaC CoffeeCaller nRF52

coffeecaller_nrf52

coffeecaller_nrf52/nrf52840

ATSAMD21G18A

Arduino/Genuino Zero (BBE)

arduino_zero/samd21g18a/bbe

ATSAMD21G18A

Arduino/Genuino Zero

arduino_zero

arduino_zero/samd21g18a

For simulated or emulated testing and development purposes one of the following runtime environments (boards) are also possible to use:

Building and Running

This project outputs ‘Hello World! I’m THE SHELL’ to the console. It can be built and executed as emulation in QEMU Emulation for X86 as follows:

west build -b qemu_x86 -p -d build/helloshell-qemu_x86 bridle/samples/helloshell
west build -t run -d build/helloshell-qemu_x86

Hint

Exit QEMU by pressing CTRL+A x.

Also it can be built and executed on following targets:

  • As Native simulator - native_sim, fancy command set mode:

    west build -b native_sim -p -d build/helloshell-native_sim bridle/samples/helloshell
    west build -t run -d build/helloshell-native_sim
    

    Hint

    Connect a terminal emulator to the given pseudotty or start the application directly with the autoconnect argument:

    ./build/helloshell-native_sim/zephyr/zephyr.exe -attach_uart
    
  • As emulation in QEMU Emulation for ARM Cortex-M3, fancy command set mode:

    west build -b qemu_cortex_m3 -p -d build/helloshell-qemu_cortex_m3 bridle/samples/helloshell
    west build -t run -d build/helloshell-qemu_cortex_m3
    

    Hint

    Exit QEMU by pressing CTRL+A x.

  • On Nucleo F746ZG board, fancy command set mode:

    west build -b nucleo_f746zg -p -d build/helloshell-nucleo_f746zg bridle/samples/helloshell
    west flash -d build/helloshell-nucleo_f746zg
    

Further you can deside either to run in a basic or fancy command set mode:

  • On Nucleo F746ZG board, tiny command set mode for an absolutely minimal environment (lowest memory footprint):

    west build -b nucleo_f746zg -p -d build/helloshell-nucleo_f746zg bridle/samples/helloshell -- -DEXTRA_CONF_FILE="prj-tiny.conf"
    west flash -d build/helloshell-nucleo_f746zg
    
  • On Nucleo F746ZG board, minimal command set mode for basic system operations:

    west build -b nucleo_f746zg -p -d build/helloshell-nucleo_f746zg bridle/samples/helloshell -- -DEXTRA_CONF_FILE="prj-minimal.conf"
    west flash -d build/helloshell-nucleo_f746zg
    
  • On Nucleo F746ZG board, helpful command set mode for hardware startups and bug hunting:

    west build -b nucleo_f746zg -p -d build/helloshell-nucleo_f746zg bridle/samples/helloshell -- -DEXTRA_CONF_FILE="prj-hwstartup.conf"
    west flash -d build/helloshell-nucleo_f746zg
    
  • On Nucleo F746ZG board, fancy command set mode (implies prj.conf merged with board specific configuration):

    west build -b nucleo_f746zg -p -d build/helloshell-nucleo_f746zg bridle/samples/helloshell
    west flash -d build/helloshell-nucleo_f746zg
    

Sample Output

(text in bold is a command input, text in angle brackets are keys to press)

Hello World! I'm THE SHELL from nucleo_f746zg


uart:~$ <Tab>
  adc        bridle     clear      dac        date       device     devmem
  eeprom     flash      gpio       hello      help       history    hwinfo
  i2c        kernel     led        log        pwm        regulator  rem
  resize     retval     rtc        sensor     shell      timer

uart:~$ help
Please press the <Tab> button to see all available commands.
You can also use the <Tab> button to prompt or auto-complete all commands or its subcommands.
You can try to call commands with <-h> or <--help> parameter for more information.

Shell supports following meta-keys:
  Ctrl + (a key from: abcdefklnpuw)
  Alt  + (a key from: bf)
Please refer to shell documentation for more details.

Available commands:
  adc        : ADC commands
  bridle     : Bridle commands.
  clear      : Clear screen.
  dac        : DAC shell commands
  date       : Date commands
  device     : Device commands
  devmem     : Read/write physical memory
               Usage:
               Read memory at address with optional width:
               devmem address [width]
               Write memory at address with mandatory width and value:
               devmem address <width> <value>
  eeprom     : EEPROM shell commands
  flash      : Flash shell commands
  gpio       : GPIO commands
  hello      : say hello
  help       : Prints the help message.
  history    : Command history.
  hwinfo     : HWINFO commands
  i2c        : I2C commands
  kernel     : Kernel commands
  led        : LED commands
  log        : Commands for controlling logger
  pwm        : PWM shell commands
  regulator  : Regulator playground
  rem        : Ignore lines beginning with 'rem '
  resize     : Console gets terminal screen size or assumes default in case the
               readout fails. It must be executed after each terminal width
               change to ensure correct text display.
  retval     : Print return value of most recent command
  sensor     : Sensor commands
  shell      : Useful, not Unix-like shell commands.
  timer      : Timer commands
uart:~$ hello -h
hello - say hello
uart:~$ hello
Hello from shell.
uart:~$ kernel version
Zephyr version 4.5.0

uart:~$ bridle version
Bridle version 4.4.99

uart:~$ bridle version long
Bridle version 4.4.99.0

uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
uart:~$ kernel uptime
Uptime: 327750 ms

uart:~$ kernel cycles
cycles: 3586181929 hw cycles
uart:~$ kernel thread list
Scheduler: 792 since last call
Threads:
*0x20010990 shell_uart
        options: 0x0, priority: 14 timeout: 0
        state: queued, entry: 0x8005025
        stack size 2048, unused 1008, usage 1040 / 2048 (50 %)

 0x20010d10
        options: 0x0, priority: 0 timeout: 0
        state: pending, entry: 0x8006d09
        stack size 1024, unused 832, usage 192 / 1024 (18 %)

 0x20010490 logging
        options: 0x0, priority: 14 timeout: 0
        state: pending, entry: 0x8002aed
        stack size 768, unused 568, usage 200 / 768 (26 %)

 0x20011610 idle
        options: 0x1, priority: 15 timeout: 0
        state: , entry: 0x8015079
        stack size 320, unused 256, usage 64 / 320 (20 %)
uart:~$ kernel thread stacks
0x20010990 shell_uart      (real size 2048):   unused 1008     usage 1040 / 2048 (50 %)
0x20010d10                 (real size 1024):   unused  832     usage  192 / 1024 (18 %)
0x20010490 logging         (real size  768):   unused  568     usage  200 /  768 (26 %)
0x20011610 idle            (real size  320):   unused  256     usage   64 /  320 (20 %)
0x20015900 IRQ 00          (real size 2048):   unused 1752     usage  296 / 2048 (14 %)

TCP/IP Network over Wi-Fi on the RPi Pico W or 2W

This project provides an extended board-specific configuration for the RPi Pico W or RPi Pico 2W with a pre-activated TCP/IP network stack via the Infineon 2.4GHz Wi-Fi chip.

For the RPi Pico W, also with Raspberry Pi Pico (BBE):

west build -b rpi_pico/rp2040/w -p -S usb-console -d build/helloshell-rpi_pico_w bridle/samples/helloshell
west flash -r uf2 -d build/helloshell-rpi_pico_w
west build -b rpi_pico/rp2040/w/bbe -p -S usb-console -d build/helloshell-rpi_pico_w bridle/samples/helloshell
west flash -r uf2 -d build/helloshell-rpi_pico_w

For the RPi Pico 2W, also with Raspberry Pi Pico 2 (BBE):

west build -b rpi_pico2/rp2350a/m33_0/w -p -S usb-console -d build/helloshell-rpi_pico2_w bridle/samples/helloshell
west flash -r uf2 -d build/helloshell-rpi_pico2_w
west build -b rpi_pico2/rp2350a/m33_0/w/bbe -p -S usb-console -d build/helloshell-rpi_pico2_w bridle/samples/helloshell
west flash -r uf2 -d build/helloshell-rpi_pico2_w

You should see the following message on the console (e.g. on RPi Pico W):

[3440] WLAN MAC Address : 29:F7:28:FC:67:1C
[3443] WLAN Firmware    : wl0: Jun  5 2024 06:33:59 version 7.95.88 (cf1d613 CY) FWID 01-7b7cf51a
[3447] WLAN CLM         : API: 12.2 Data: 9.10.39 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2024-04-16 21:20:55
[3447] WHD VERSION      : 3.3.3.26653
[3447]  : WIFI5-v3.3.3
[3447]  : GCC 14.3
[3447]  : 2025-04-14 03:18:50 +0000

*** Booting Zephyr OS build v4.5.0…***
Hello World! I'm THE SHELL from rpi_pico
[00:00:03.473,000] <inf> net_config: Initializing network
[00:00:03.473,000] <inf> net_config: Waiting interface 1 (0x200014e8) to be up...

Simple test execution on target

(text in bold is a command input)