As part of a series on Zephyr with Adafruit hardware, this guide shows how to write a Zephyr board definition for the Adafruit Feather RP2350 with an I2C SHT41 temperature and humidity sensor. Future guides will look more at using sensors and displays. This is intended for developers who want to know about adding support for Adafruit boards to Zephyr. If you just want to write CircuitPython code, you can safely ignore this stuff.
The Feather RP2350 is a good starter board for exploring custom Zephyr board definitions because it comes with pre-soldered debug, STEMMA QT, and HSTX FPC ports. The debug port works with the Raspberry Pi Debug Probe to conveniently flash Zephyr builds during development. The STEMMA QT port makes it easy to connect I2C sensors and displays. The HSTX port makes it possible to experiment with HDMI displays.
- Solder Feather headers using a breadboard to hold the pins. If you are unfamiliar with soldering headers, you might want to read:
- (optional) If you don't want to use the same breadboard for soldering and developing, move the Feather RP2350 to another breadboard.
- Connect one of the SHT41 STEMMA QT ports to the Feather RP2350 I2C port with a STEMMA QT jumper cable
- Look at the top of the Pi Debug Probe. On the enclosure lid, above the 3-pin female connectors, you should see the letters "U" and "D" molded into the plastic. U is over the UART serial port and D is over the SWD debug port.
- Connect the probe's gray cable from its D port to the Feather Debug (SWD) connector.
- Connect the probe's Orange/Black/Yellow male header cable from its U port to the Feather serial pins:
- Orange wire: probe serial TX; connects to Feather RX
- Black wire: probe GND; connects to Feather GND
- Yellow wire: probe serial RX; connects to Feather TX
- Connect the Pi Debug Probe to your computer with a USB A to Micro B data cable, such as the one that came with the Pi Debug Probe (CAUTION: charge-only cables won't work!)
- Connect the Feather RP2350 to your computer with a USB C data cable (CAUTION: charge-only cables won't work!)
- Set up a Zephyr workspace with
westand the Zephyr SDK. The Getting Started with Zephyr on Linux Playground guide walks through a streamlined setup procedure that works on Debian 12 (and probably also Ubuntu LTS). If you prefer Windows or macOS, check out the Zephyr project Getting Started Guide. - Make sure the
arm-zephyr-eabiZephyr SDK ARM toolchain is installed. You can check by running thewest sdkcommand in your shell, then looking at the "installed-toolchains" section of its output. If you follow the Zephyr project Getting Started Guide instructions about installing the Zephyr SDK, it will install all the available toolchains. Alternately, if you started with the minimal Zephyr SDK to save disk space, you may need to runwest sdk install arm-zephyr-eabi. - To get OpenOCD support for programming the RP2350, you currently (Feb 2025) need to build the Raspberry Pi fork of
openocdfrom source (see example below). Once the RP2350 support eventually makes it into upstream openocd source and downstream distro packages, this step will be unnecessary. - (Optional) If you want to avoid copying and pasting, you can get a copy of the RP2350 board definition described in this guide below by cloning my zphqst-01 GitHub repository. Alternately, it might be interesting to manually create the files one by one so you get a chance to see the types of error messages that can happen with an incomplete board definition.
This is an example of how how I cloned my board definition repo into my Zephyr workspace on Debian 12 Linux:
$ cd ~/code/zephyr-workspace/ $ ls bootloader modules tools zephyr $ git clone https://github.com/samblenny/zphqst-01.git ... $ ls bootloader modules tools zephyr zphqst-01 $ cd zphqst-01/ $ ls boards Feather_RP2350_Pi_Debug_Probe.jpeg LICENSES Makefile README.md $
This is an example of how I downloaded and installed the Raspberry Pi version of openocd into my Zephyr workspace:
$ sudo apt install make libtool pkg-config \
autoconf automake texinfo libusb-1.0-0-dev libhidapi-dev
$ cd ~/code/zephyr-workspace
$ git clone https://github.com/raspberrypi/openocd.git
$ cd openocd
$ ./bootstrap
$ ./configure --prefix=$(pwd)/build
$ make
$ make install
Tips, Tricks, and Docs
Writing a custom board definition for Zephyr requires knowledge of Devicetree specifications, CMake build configuration, the Zephyr build system, and implementation details of the SoC and schematic for your board.
This section includes:
- Tips and tricks for troubleshooting build issues
- Links to various references that may help with board porting in general
- TLDR summaries with specific details needed for the Adafruit Feather RP2350 board
West & CMake
Zephyr's multipurpose command line meta-tool, west, helps to coordinate the complex tasks involved in creating and maintaining Zephyr applications. Making new board definitions involves many invocations of the west build and west flash sub-commands. Often, when something goes wrong, the initial error message from west will be terse and cryptic. So, it helps to have some tricks and documentation on hand for understanding what west is doing.
-
west builduses CMake extensively. To troubleshoot build issues, it helps to have a working knowledge of CMake. I recommend bookmarking the Introduction, cmake-commands(7), cmake-variables(7), and CMake Tutorial pages of the CMake reference documentation. Browsing through the cmake-commands page may help you to understand the syntax and semantics ofCMakeLists.txtfiles. Browsing through the tutorial pages may help you to understand what CMake is about and how it is meant to work. - The Zephyr Project Build System (CMake) docs page explains the roles of various configuration files in controlling what
west builddoes with CMake. Before reading this page, it may help to first learn a bit about CMake (perhaps by browsing through the tutorials linked above). -
Beyond
CMakeLists.txt,board.cmake, and other config files, it's also possible to control the CMake configuration withwest buildcommand line options. Whatever you put after the--gets passed on to CMake. Normally,west buildhides the stdout and stderr output from commands it runs. By setting CMAKE_EXECUTE_PROCESS_COMMAND_ECHO, you can see the commands and options CMake is using:
west build ... -- -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDERR
Once you know the command CMake was running when it hit the error, you can re-run that command manually to see the full error message. (seedtcandgen_edttargets inMakefile).
Devicetree
Zephyr uses devicetree files to specify the hardware configuration that west build should use to compile a firmware image. Zephyr's implementation of devicetree was inspired by the Linux kernel, and they use a similar specification syntax. But, Zephyr's devicetree implementation is really its own thing.
- Zephyr uses the C preprocessor for C style
#include <...>includes and macro expansions. The results of the preprocessing get saved to thebuild/zephyr/zephyr.dtsfile when you runwest build - Zephyr has its own device tree compiler, but it also uses the regular
dtccompiler to check for syntax errors inzephyr.dts - If west build fails with a mysterious error message with "result code 2" or whatever during the device tree compilation stage, you may be able to get a more detailed error message by running
dtcorzephyr/scripts/dts/gen_edt.pymanually from the command line. For example,dtc -O dts -o - -b 0 -E unit_address_vs_reg -Wno-unique_unit_address -Wunique_unit_address_if_enabled build/zephyr/zephyr.dts
is whatwest builduses for the final devicetree syntax check (I learned this by settingCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDERR). - Zephyr project Introduction to devicetree documentation page explains how Zephyr uses devicetree
- Zephyr project Raspberry Pi Foundation (raspberrypi) section of the Bindings Index page links to driver pages including: raspberrypi,pico-uart, raspberrypi,pico-i2c, and raspberrypi,pico-header.
- The Devicetree Specification v0.4 (pdf attachment to GitHub release) explains the syntax and structure of devicetree files
- The RP2350 datasheet from Raspberry Pi explains the address space layout, peripherals, and pin names of the RP2350
- The Adafruit Feather RP2350 Learn Guide Downloads page has a schematic that you can use to determine how the Feather board silk screen labels correspond to RP2350 GPIO pins
Feather RP2350 pin mapping TLDR:
| Feather Silk / Net | QFN-60 | RP2350 Signal |
| TX | 2 | TX0/GPIO0 |
| RX | 3 | RX0/GPIO1 |
| SDA | 4 | SDA1/GPIO2 |
| SCL | 5 | SCL1/GPIO3 |
| D9 | 13 | GPIO9 |
| D10 | 14 | GPIO10 |
| D11 | 15 | GPIO11 |
| MISO | 32 | MISO0/GPIO20 |
| NEOPIX | 33 | GPIO21 |
| SCK | 34 | SCK0/GPIO22 |
| MOSI | 35 | MOSI0/GPIO23 |
| QSPI_SCK | 56 | QSPI_SCLK |
| QSPI_CS | 60 | QSPI_CS (inverted) |
| QSPI_DATA[0] | 57 | QSPI_SD0 |
| QSPI_DATA[1] | 59 | QSPI_SD1 |
| QSPI_DATA[2] | 58 | QSPI_SD2 |
| QSPI_DATA[3] | 55 | QSPI_SD3 |
Flash & Debug
To flash your firmware, I recommend using the Raspberry Pi Debug Probe with OpenOCD.
- You can
git clonethe Raspberry Pi version of openocd from raspberrypi/openocd on GitHub (see "Dev Tool Setup" section above for build & install instructions). You will need to providewest buildwith a-- -DOPENOCD=...option to make sure that west flash can find the right version ofopenocd. - The Raspberry Pi Debug Probe Documentation explains how to wire the debug probe to a Raspberry Pi Pico. For the Feather RP2350, use the Feather RX and TX pins for the UART connection.
- Zephyr's Building, Flashing and Debugging documentation page explains a lot of background details.
Pi Debug Probe Wiring TLDR:
- Gray cable with 3-pin connectors is SWD (connect this from Pi Debug Probe D port to Feather debug port)
- Orange/Black/Yellow cable with male header pins is UART serial (connect 3-pin end to Pi Debug Probe U port and pin header ends to Feather breadboard)
- Orange: TX (connect to Feather RX)
- Black: GND (connect to Feather GND)
- Yellow: RX (connect to Feather TX)
Board Porting Guide
The Zephyr Project Board Porting Guide documentation page explains how Zephyr board definitions work and what the various files do. If you want to understand more details behind what's going on in this example, the Board Porting Guide would be a good place to look.
Create a board/adafruit/ Directory
The Zephyr repository on GitHub includes many board definitions, but you can also make your own for boards that aren't yet supported. In your Zephyr workspace, you can use west to build an application that mixes code and board definitions from your own git repo(s) and the main Zephyr repo.
The west build tool expects board definitions to exist inside of a directory tree using file and subdirectory names that relate to the board's vendor, board ID, and "qualifiers" in specific ways. For more details, refer to the Create your board directory section of the Zephyr Board Porting docs page.
For creating Adafruit board definitions:
- Vendor directory is
board/adafruit - Board directory is
board/adafruit/$BOARD_ID, where$BOARD_IDis the board's Circuitpythonboard.board_id, modified to remove the "adafruit_" at the front. - The "qualifiers" for the M33 core of the Feather RP2350 are
rp2350a/m33in somewestcommand line options orrp2350a_m33when used as part of a file name.
The required files for a minimal Feather RP2350 board definition are:
- boards/adafruit/feather_rp2350/board.yml
- boards/adafruit/feather_rp2350/Kconfig.feather_rp2350
- boards/adafruit/feather_rp2350/feather_rp2350_rp2350a_m33.dts
Other files can be added to enable additional features (see Zephyr docs linked above).
For this example, to get building and flashing working well, I needed the following files (see listings and descriptions below):
- board.cmake
- board.yml
- Kconfig.feather_rp2350
- feather_rp2350_rp2350a_m33.dts
- feather_rp2350_rp2350a_m33_defconfig
To try my Feather RP2350 board definition, you can either clone my zphqst-01 GitHub repo or create the files individually by hand.
board.cmake
This provides CMake configuration settings for using OpenOCD with the Raspberry Pi Debug probe to flash firmware to the Feather RP2350.
# SPDX-License-Identifier: Apache-2.0 OR MIT
# SPDX-FileCopyrightText: Copyright 2025 Sam Blenny
# CAUTION: For this to work, you will need the Raspberry Pi fork of openocd,
# including the openocd binary and the target/rp2350.cfg config file. At the
# time I'm writing this (Feb 9, 2025), upstream openocd does not yet support
# the RP2350. To get openocd, you can do:
#
# $ cd ~/code/zephyr-workspace
# $ git clone https://github.com/raspberrypi/openocd.git
#
board_runner_args(openocd --cmd-pre-init "adapter driver cmsis-dap")
board_runner_args(openocd --cmd-pre-init "adapter speed 5000")
board_runner_args(openocd --cmd-pre-init "source [find target/rp2350.cfg]")
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
board: name: feather_rp2350 vendor: adafruit socs: - name: rp2350a
# SPDX-License-Identifier: Apache-2.0 OR MIT # SPDX-FileCopyrightText: Copyright 2025 Sam Blenny config BOARD_FEATHER_RP2350 select SOC_RP2350A_M33
feather_rp2350_rp2350a_m33.dts
This is where most the interesting board-specific stuff happens. This starts by including devicetree configuration from the zephyr/boards/raspberrypi/rpi_pico2 board definition for the Raspberry Pi Pico 2 board. But, the Adafruit Feather RP2350 uses a different pinout. So, I delete some pinout-related device tree nodes and replace them with the correct UART and I2C pins.
/* SPDX-License-Identifier: Apache-2.0 OR MIT */
/* SPDX-FileCopyrightText: Copyright 2025 Sam Blenny */
/* For addresses, registers, flash partition table info, etc refer to the
* Raspberry Pi RP2350 datasheet:
* https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf
*
* Datasheet notes:
* - Section 4.1: boot rom is 32kB starting at 0x00000000
* - Section 5.1: Bootroom Concepts
* - Section 5.1.2: Partition Tables
* - Section 5.1.4: Image Definitions (purpose of .image_def partition)
* See also:
* https://docs.zephyrproject.org/latest/build/dts/api/bindings/mtd/fixed-partitions.html
*/
/* 1. Start with the Pi Pico 2 devicetree config.
*/
#include "../../../zephyr/boards/raspberrypi/rpi_pico2/rpi_pico2_rp2350a_m33.dts"
/* 2. Remove unsuitable nodes and properties for Pico 2 board pinout.
*/
/ {
aliases {
/delete-property/ led0;
/delete-property/ pwm-led0;
};
/delete-node/ connector;
/delete-node/ led_0;
/delete-node/ pwm_led_0;
};
&i2c0 {
status = "disabled";
};
/* 3. Add config for Feather RP2350 board pinout.
* See:
* - zephyr/include/zephyr/dt-bindings/pinctrl/rpi-pico-pinctrl-common.h
* - zephyr/include/zephyr/dt-bindings/pinctrl/rpi-pico-rp2350-pinctrl-common.h
* - zephyr/include/zephyr/dt-bindings/pinctrl/rpi-pico-rp2350a-pinctrl.h
* for definitions of UART0_TX_P0, UART0_RX_P1, etc.
*/
&pinctrl {
uart0_feather: uart0_feather {
group1 {
pinmux = <UART0_TX_P0>;
};
group2 {
pinmux = <UART0_RX_P1>;
input-enable;
};
};
i2c1_feather: i2c1_feather {
group1 {
pinmux = <I2C1_SDA_P2>, <I2C1_SCL_P3>;
input-enable;
input-schmitt-enable;
};
};
};
&uart0 {
current-speed = <115200>;
pinctrl-0 = <&uart0_feather>;
pinctrl-names = "default";
status = "okay";
};
&i2c1 {
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c1_feather>;
pinctrl-names = "default";
status = "okay";
sht4x@44 {
compatible = "sensirion,sht4x";
friendly-name = "Adafruit SHT41 Humidity & Temp";
reg = <0x44>;
repeatability = <1>;
status = "okay";
};
};
feather_rp2350_rp2350a_m33_defconfig
This file stores a set of CMake configuration settings that will get applied when you specify this board with west build -b feather_rp2350/rp2350a/m33
To understand what all these things do, the easiest way is to open the menuconfig tool (west build -t menuconfig or make menuconfig), search for the config variable, then read the help message about it. For example, to search for CONFIG_I2C_SHELL ,
- Start menuconfig
- Type the
/key to activate the search screen, then type "i2c_shell" or "I2C_SHELL" (Important: don't type the "CONFIG_" prefix. You need the prefix in config files, but not in the menuconfig tool.) - If the search result list has more than 1 item, use the the arrow keys to move down to the item you want, then type your Enter or Return key.
- You should now be somewhere in the menuconfig menus, at the location where your search result lives in the menu hierarchy. Type the
?key to see the help message describing that config option.
For more information about menuconfig, you can read the Zephyr project Interactive Kconfig interfaces documentation page.
CONFIG_BUILD_OUTPUT_HEX=y CONFIG_BUILD_OUTPUT_UF2=y CONFIG_CLOCK_CONTROL=y CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=150000000 CONFIG_USE_DT_CODE_PARTITION=y CONFIG_I2C=y CONFIG_I2C_SHELL=y CONFIG_SENSOR=y CONFIG_SENSOR_SHELL=y CONFIG_SHT4X=y # Turn off shell extras CONFIG_SHELL_CMDS_RESIZE=n CONFIG_SHELL_CMDS_SELECT=n CONFIG_SHELL_CMDS_RETURN_VALUE=n CONFIG_SHELL_DEVICE_HELPERS=n CONFIG_SHELL_PROMPT_CHANGE=n CONFIG_SHELL_METAKEYS=n CONFIG_SHELL_STATS=n CONFIG_DATE_SHELL=n CONFIG_DEVICE_SHELL=n CONFIG_DEVMEM_SHELL=n CONFIG_KERNEL_SHELL=n CONFIG_STATS=n CONFIG_STATS_SHELL=n
Begin Zephyr dev session
To begin a terminal session using Zephyr command line build tools, you need to:
- Open a terminal shell
- Change to your zephyr workspace directory (e.g.
~/code/zephyr-workspace) - Activate your zephyr workspace's Python virtual environment (e.g.
~/code/zephyr-workspace/.venv) - (optional) Use
west sdkto make sure you have thearm-zephyr-eabitoolchain installed so you can build for the Raspberry Pi RP2350's M33 core. Alternately, you can install all the supported toolchains when you set up your Zephyr workspace, but doing it that way uses much more disk space.
When I start a Zephyr dev session on Debian 12 and check the installed toolchains, it looks like this:
$ cd ~/code/zephyr-workspace/
$ source .venv/bin/activate
(.venv) $ ls
bootloader modules tools zephyr zphqst-01
(.venv) $ west sdk
0.17.0:
path: /home/sam/zephyr-sdk-0.17.0
hosttools: installed
installed-toolchains:
- xtensa-espressif_esp32s3_zephyr-elf
- arm-zephyr-eabi
available-toolchains:
- aarch64-zephyr-elf
...
Some notes:
- The
zephyrdirectory inside of my workspace directory is a cloned copy of the main Zephyr repository on GitHub. This has source for the Zephyr kernel and drivers along with the default set of board definitions and CMake configuration files. - The
zphqst-01directory is a clone of my zphqst-01 repository. This has my custom Feather RP2350 board definition and a Makefile to help build the Zephyr shell sample application. - There are multiple ways of arranging Zephyr workspace directories to combine the Zephyr kernel with its library dependencies and your application code. To keep this guide simple, I'm just using
gitto manually clone my application repository into myzephyr-workspacedirectory. If you want to learn about fancier options wherewestcan help you manage your project dependencies, check out the Zephyr project West Manifests and Basics documentation pages.
Using west with make
This example uses a Zephyr workspace set up with Debian 12 Linux according to the procedure described my Getting Started with Zephyr on Linux Playground guide. For Windows, it's possible the west commands here may work unchanged if you install WSL to get a Linux-like shell, but I haven't tried that.
If you clone my zphqst-01 repo, you can use the Makefile with make to do:
$ make shell $ make flash $ make uart
When you do make uart, it will run screen -fn ... 115200 to open a serial monitor session using the screen command line program as a terminal emulator. If you don't like screen, any other serial monitor that can do 115200 8N1 should work fine.
# SPDX-License-Identifier: Apache-2.0 OR MIT
# SPDX-FileCopyrightText: Copyright 2025 Sam Blenny
# CAUTION: Using OpenOCD with the RP2350 requires a recent version of openocd
# with RP2350 support. At the time I'm writing this, (Feb 9, 2025), you need to
# build the Raspberry Pi openocd fork from source. You will also need to be
# sure that the west OPENOCD cmake variable gets set correctly in a
# board.cmake, CMakeLists.txt, or command line argument.
# Uncomment the next line if you want extra debug info from cmake
#_CMAKE_ECHO=-DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDERR
_OPENOCD=-DOPENOCD=../openocd/build/bin/openocd
# Build Zephyr shell for Feather RP2350 with OpenOCD and Pi Debug Probe.
shell:
west build -b feather_rp2350/rp2350a/m33 \
../zephyr/samples/subsys/shell/shell_module/ \
-- -DBOARD_ROOT=$$(pwd) ${_OPENOCD} ${_CMAKE_ECHO}
# Interactively modify config from previous build
menuconfig:
west build -t menuconfig
# Flash previously built firmware
flash:
west flash
# Connect to board's serial console using Pi Debug Probe UART interface
# This works for me on Debian 12 with one and only 1 Pi Debug Probe plugged
# in. You may need to use a different device path for other system setups.
uart:
@screen -fn /dev/serial/by-id/*Pi_Debug* 115200
clean:
rm -rf build
# If west build chokes on the dts file, it will give an uninformative numeric
# error code instead of dtc's stderr/stdout. But, it does leave behind a
# build/zephyr/zephyr.dts file with the preprocessed and merged output of all
# the various dts files. In zephyr/cmake/modules/dts.cmake, on about line 404,
# there is an `execute_process(COMMAND ${DTC} ...)` command. If you edit that
# command to include the ECHO_OUTPUT_VARIABLE and ECHO_ERROR_VARIABLE args, it
# will echo dtc's error message explaining what went wrong. You can also do
# `west build ... -- -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDERR` to see the
# command cmake uses to invoke dtc. (that's where the invocation below came
# from)
dtc:
@dtc -O dts -o - -b 0 -E unit_address_vs_reg \
-Wno-unique_unit_address \
-Wunique_unit_address_if_enabled \
build/zephyr/zephyr.dts
# This may help diagnose errors during gen_edt.py script (after dtc)
gen_edt:
python3 ../zephyr/scripts/dts/gen_edt.py \
--dts build/zephyr/zephyr.dts.pre \
--dtc-flags '' \
--bindings-dirs ../zephyr/dts/bindings \
--dts-out build/zephyr/zephyr.dts.new \
--edt-pickle-out build/zephyr/edt.pickle.new \
--vendor-prefixes ../zephyr/dts/bindings/vendor-prefixes.txt
.PHONY: shell menuconfig flash uart clean dtc gen_edt
Zephyr Shell: I2C Scan + SHT41
If you build the shell sample with CONFIG_I2C=y , CONFIG_I2C_SHELL=y , CONFIG_SENSOR=y , CONFIG_SENSOR_SHELL=y , andCONFIG_SHT4X=y , then you can use the i2c scan command to scan the I2C bus and the sensor get sht4x@44 command to read temperature and humidity. You can read more about the Zephyr shell and related configuration options at the Zephyr project Shell documentation page.
When the shell first starts, you may not see any immediate output in the serial terminal. Try pressing Return or Enter a few times. You should get a uart:~$ prompt. At the prompt, try typing help to see a list of available commands.
This is an example Zephyr shell session where I check the board and kernel info, scan the I2C bus, and read a measurement from the SHT41 temperature and humidity sensor attached to the I2C bus.
uart:~$
uart:~$ demo board
feather_rp2350
uart:~$ version
Zephyr version 4.0.99
uart:~$ i2c
scan recover read read_byte direct_read write
write_byte speed
uart:~$ i2c scan i2c@40098000
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
1 devices found on i2c@40098000
uart:~$
uart:~$ sensor
get attr_set attr_get trig
uart:~$ sensor get sht4x@44
channel type=13(ambient_temp) index=0 shift=6 num_samples=1 value=29788083603ns (19.800868)
channel type=16(humidity) index=0 shift=6 num_samples=1 value=29788083603ns (46.141982)
uart:~$
To locate the code which implements various shell features, you can use grep, a text editor, or an IDE to search the zephyr repository for related CMake config variables (see menuconfig or the feather_rp2350_rp2350a_m33_defconfig file for ideas). For example, to find the I2C scan code:
- Search the zephyr repo for "CONFIG_I2C_SHELL" (e.g.
grep -r CONFIG_I2C_SHELL zephyr) - Observe that the zephyr/drivers/i2c/CMakeLists.txt file has a rule to include
i2c_shell.cwhen the I2C shell variable is set - Look at the zephyr/drivers/i2c/i2c_shell.c file to see how the scan feature is implemented
When you finish with the shell, if you're using screen (from make uart), you can exit the serial monitor with the key sequence: Ctrl-a k y
This page (Zephyr Quest: Feather RP2350 Board Def) was last updated on February 11, 2025.
Text editor powered by tinymce.