Skip to content

Out of tree Zephyr board definition for Adafruit Feather RP2350

Notifications You must be signed in to change notification settings

samblenny/zphqst-01

Repository files navigation

zphqst-01

This repo has an out of tree Zephyr board definition for the Adafruit Feather RP2350 connected to an SHT41 I2C temperature and humidity sensor. The Makefile and board _defconfig file are set up to build a Zephyr shell with I2C scanning and SHT41 measurement support. The point of all this is to provide an example for my Zephyr Quest: Feather RP2350 Board Def playground guide, which explains how to make a custom Zephyr board definition for the Adafruit Feather RP2350.

Feather RP2350, Pi Debug Probe, and SHT41 sensor

Getting OpenOCD for RP2350

Until RP2350 support makes it into the upstream OpenOCD and downstream distro packages, flashing an RP2350 board with the Raspberry Pi Debug Probe requires using the Raspberry Pi fork of OpenOCD.

You can git clone and build the Raspberry Pi openocd like this (check openocd README file for more details):

$ 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

Those commands will put your new openocd binary in:

~/code/zephyr-workspace/openocd/build/bin/openocd

To make sure that west flash uses the correct openocd binary, you will need to set the OPENOCD cmake variable when you do west build. For example, you could put a set(OPENOCD ...) in CMakeLists.txt or do something like:

(.venv) $ cd ~/code/zephyr-workspace/zphqst-01
(.venv) $ west build ... -- -DOPENOCD=../openocd/build/bin/openocd

License & Copying

Files in this repo are dual licensed as "Apache-2.0 OR MIT" unless marked otherwise (check SPDX header comments).

This repo is meant to function as a box of spare parts to copy and paste into other projects.

The dual license with "OR" is intended to make it easier for you to re-use this example code in existing projects that require one license or the other. If you want to pick just one of the licenses, it's fine to remove the other license from the SPDX License Identifier header in your copy of the code.

About

Out of tree Zephyr board definition for Adafruit Feather RP2350

Resources

Stars

Watchers

Forks