[{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/613/original/Feather_RP2350_Pi_Debug_Probe.jpeg?1739259054","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eOverview\u003c/h2\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eAs 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.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eThe 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.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eParts\u003c/h3\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/6000","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/5699","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/4210","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/5776","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/64","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/5153","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eWiring\u003c/h2\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n        \u003col\u003e\n\u003cli\u003eSolder Feather headers using a \u003ca href=\"https://www.adafruit.com/product/64\" target=\"_blank\"\u003ebreadboard\u003c/a\u003e to hold the pins. If you are unfamiliar with soldering headers, you might want to read:\n\u003cul\u003e\n\u003cli\u003e\n\u003cp\u003e\u003ca href=\"https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools\" target=\"_blank\"\u003eAdafruit Guide To Excellent Soldering\u003c/a\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e\u003ca href=\"https://learn.adafruit.com/how-to-solder-headers\" target=\"_blank\"\u003eHow To Solder Headers\u003c/a\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e(optional) If you don't want to use the same breadboard for soldering and developing, move the Feather RP2350 to another breadboard.\u003c/li\u003e\n\u003cli\u003eConnect one of the\u0026nbsp;\u003cstrong\u003eSHT41 STEMMA\u0026nbsp;QT\u003c/strong\u003e ports to the \u003cstrong\u003eFeather RP2350 I2C\u003c/strong\u003e port with a STEMMA QT jumper cable\u003c/li\u003e\n\u003cli\u003eLook at the top of the \u003ca href=\"https://www.adafruit.com/product/5699\" target=\"_blank\"\u003ePi Debug Probe\u003c/a\u003e. On the enclosure lid, above the 3-pin female connectors, you should see the letters \"U\" and \"D\" molded into the plastic. \u003cstrong\u003eU\u003c/strong\u003e is over the \u003cstrong\u003eUART serial port\u003c/strong\u003e and \u003cstrong\u003eD\u003c/strong\u003e is over the \u003cstrong\u003eSWD debug port\u003c/strong\u003e.\u003c/li\u003e\n\u003cli\u003eConnect the probe's\u0026nbsp;\u003cstrong\u003egray cable\u003c/strong\u003e from its \u003cstrong\u003eD port\u003c/strong\u003e to the \u003cstrong\u003eFeather Debug\u003c/strong\u003e (SWD) connector.\u003c/li\u003e\n\u003cli\u003eConnect the probe's\u0026nbsp;\u003cstrong\u003eOrange/Black/Yellow male header cable\u003c/strong\u003e from its \u003cstrong\u003eU port\u003c/strong\u003e to the\u0026nbsp;\u003cstrong\u003eFeather serial pins\u003c/strong\u003e:\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003eOrange wire\u003c/strong\u003e: probe serial TX; connects to \u003cstrong\u003eFeather RX\u003c/strong\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eBlack wire\u003c/strong\u003e: probe GND; connects to \u003cstrong\u003eFeather GND\u003c/strong\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eYellow wire\u003c/strong\u003e: probe serial RX; connects to \u003cstrong\u003eFeather TX\u003c/strong\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003eConnect 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!)\u003c/li\u003e\n\u003cli\u003eConnect the Feather RP2350 to your computer with a \u003ca href=\"https://www.adafruit.com/product/5153\" target=\"_blank\"\u003eUSB C data cable\u003c/a\u003e (CAUTION: charge-only cables won't work!)\u003c/li\u003e\n\u003c/ol\u003e\n      ","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eDev Tool Setup\u003c/h2\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003col\u003e\n\u003cli\u003eSet up a Zephyr workspace with \u003ccode\u003ewest\u003c/code\u003e and the Zephyr SDK. The\u0026nbsp;\u003ca href=\"https://adafruit-playground.com/u/SamBlenny/pages/getting-started-with-zephyr-on-linux\" target=\"_blank\"\u003eGetting Started with Zephyr on Linux\u003c/a\u003e\u003cspan\u003e Playground guide walks through a \u003c/span\u003estreamlined setup procedure that works on Debian 12 (and probably also Ubuntu LTS)\u003cspan\u003e. If you prefer Windows or macOS, check out the Zephyr project \u003ca href=\"https://docs.zephyrproject.org/latest/develop/getting_started/index.html\" target=\"_blank\"\u003eGetting Started Guide\u003c/a\u003e.\u003c/span\u003e\n\u003c/li\u003e\n\u003cli\u003eMake sure the \u003ccode\u003earm-zephyr-eabi\u003c/code\u003e Zephyr SDK ARM toolchain is installed. You can check by running the \u003ccode\u003ewest sdk\u003c/code\u003e command 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 run \u003ccode\u003ewest sdk install arm-zephyr-eabi\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eTo get OpenOCD support for programming the RP2350, you currently (Feb 2025) need to build the Raspberry Pi fork of \u003ccode\u003eopenocd\u003c/code\u003e from source (see example below). Once the RP2350 support eventually makes it into upstream openocd source and downstream distro packages, this step will be unnecessary.\u003c/li\u003e\n\u003cli\u003e(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\u0026nbsp;\u003ca href=\"https://github.com/samblenny/zphqst-01\" target=\"_blank\"\u003ezphqst-01\u003c/a\u003e 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.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eThis is an example of how how I cloned my board definition repo into my Zephyr workspace on Debian 12 Linux:\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"$ cd ~/code/zephyr-workspace/\n$ ls\nbootloader  modules  tools  zephyr\n$ git clone https://github.com/samblenny/zphqst-01.git\n...\n$ ls\nbootloader  modules  tools  zephyr  zphqst-01\n$ cd zphqst-01/\n$ ls\nboards  Feather_RP2350_Pi_Debug_Probe.jpeg  LICENSES  Makefile  README.md\n$","metadata":{"language":"terminal","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eThis is an example of how I downloaded and installed the Raspberry Pi version of openocd into my Zephyr workspace:\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"$ sudo apt install make libtool pkg-config \\\n    autoconf automake texinfo libusb-1.0-0-dev libhidapi-dev\n$ cd ~/code/zephyr-workspace\n$ git clone https://github.com/raspberrypi/openocd.git\n$ cd openocd\n$ ./bootstrap\n$ ./configure --prefix=$(pwd)/build\n$ make\n$ make install","metadata":{"language":"terminal","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eTips, Tricks, and Docs\u003c/h2\u003e\n\u003cp\u003eWriting 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.\u003c/p\u003e\n\u003cp\u003eThis section includes:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eTips and tricks for troubleshooting build issues\u003c/li\u003e\n\u003cli\u003eLinks to various references that may help with board porting in general\u003c/li\u003e\n\u003cli\u003eTLDR summaries with specific details needed for the Adafruit Feather RP2350 board\u003c/li\u003e\n\u003c/ol\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eWest \u0026amp; CMake\u003c/h3\u003e\n\u003cp\u003eZephyr's multipurpose command line meta-tool, \u003ccode\u003ewest\u003c/code\u003e, helps to coordinate the complex tasks involved in creating and maintaining Zephyr applications. Making new board definitions involves many invocations of the \u003ccode\u003ewest build\u003c/code\u003e and \u003ccode\u003ewest flash\u003c/code\u003e sub-commands. Often, when something goes wrong, the initial error message from\u0026nbsp;\u003ccode\u003ewest\u003c/code\u003e will be terse and cryptic. So, it helps to have some tricks and documentation on hand for understanding what \u003ccode\u003ewest\u003c/code\u003e is doing.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003ccode\u003ewest build\u003c/code\u003e uses CMake extensively. To troubleshoot build issues, it helps to have a working knowledge of CMake. I recommend bookmarking the \u003ca href=\"https://cmake.org/cmake/help/latest/\" target=\"_blank\"\u003eIntroduction\u003c/a\u003e, \u003ca href=\"https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html\" target=\"_blank\"\u003ecmake-commands(7)\u003c/a\u003e, \u003ca href=\"https://cmake.org/cmake/help/latest/manual/cmake-variables.7.html\" target=\"_blank\"\u003ecmake-variables(7)\u003c/a\u003e, and \u003ca href=\"https://cmake.org/cmake/help/latest/guide/tutorial/index.html\" target=\"_blank\"\u003eCMake Tutorial\u003c/a\u003e pages of the CMake reference documentation. Browsing through the cmake-commands page may help you to understand the syntax and semantics of \u003ccode\u003eCMakeLists.txt\u003c/code\u003e files. Browsing through the tutorial pages may help you to understand what CMake is about and how it is meant to work.\u003c/li\u003e\n\u003cli\u003eThe Zephyr Project\u0026nbsp;\u003ca href=\"https://docs.zephyrproject.org/latest/build/cmake/index.html\" target=\"_blank\"\u003eBuild System (CMake)\u003c/a\u003e\u003cspan\u003e docs page explains the roles of various configuration files in controlling what \u003ccode\u003ewest build\u003c/code\u003e does with CMake. Before reading this page, it may help to first learn a bit about CMake (perhaps by browsing through the tutorials linked above).\u003c/span\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cspan\u003eBeyond \u003ccode\u003eCMakeLists.txt\u003c/code\u003e, \u003ccode\u003eboard.cmake\u003c/code\u003e, and other config files, it's also possible to control the CMake configuration with \u003ccode\u003ewest build\u003c/code\u003e command line options. Whatever you put after the \u003ccode\u003e--\u003c/code\u003e gets passed on to CMake. Normally, \u003ccode\u003ewest build\u003c/code\u003e hides the stdout and stderr output from commands it runs. By setting\u0026nbsp;\u003ca href=\"https://cmake.org/cmake/help/latest/variable/CMAKE_EXECUTE_PROCESS_COMMAND_ECHO.html\" target=\"_blank\"\u003eCMAKE_EXECUTE_PROCESS_COMMAND_ECHO\u003c/a\u003e, you can see the commands and options CMake is using:\u003c/span\u003e\u003cbr\u003e\u003cspan\u003e\u0026nbsp;\u003ccode\u003ewest build ... -- -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDERR\u003c/code\u003e\u003cbr\u003eOnce 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. (see \u003ccode\u003edtc\u003c/code\u003e and \u003ccode\u003egen_edt\u003c/code\u003e targets in \u003ccode\u003eMakefile\u003c/code\u003e).\u003c/span\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eDevicetree\u003c/h3\u003e\n\u003cp\u003eZephyr uses devicetree files to specify the hardware configuration that \u003ccode\u003ewest build\u003c/code\u003e 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.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eZephyr uses the C preprocessor for C style\u0026nbsp;\u003ccode\u003e#include \u0026lt;...\u0026gt;\u003c/code\u003e includes and macro expansions. The results of the preprocessing get saved to the \u003ccode\u003ebuild/zephyr/zephyr.dts\u003c/code\u003e file when you run \u003ccode\u003ewest build\u003c/code\u003e\n\u003c/li\u003e\n\u003cli\u003eZephyr has its own device tree compiler, but it also uses the regular \u003ccode\u003edtc\u003c/code\u003e compiler to check for syntax errors in \u003ccode\u003ezephyr.dts\u003c/code\u003e\n\u003c/li\u003e\n\u003cli\u003eIf 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 \u003ccode\u003edtc\u003c/code\u003e or \u003ccode\u003ezephyr/scripts/dts/gen_edt.py\u003c/code\u003e manually from the command line. For example,\u0026nbsp;\u003cbr\u003e\u003ccode\u003edtc -O dts -o - -b 0 -E unit_address_vs_reg -Wno-unique_unit_address -Wunique_unit_address_if_enabled build/zephyr/zephyr.dts\u003c/code\u003e\u0026nbsp;\u003cbr\u003eis what \u003ccode\u003ewest build\u003c/code\u003e uses for the final devicetree syntax check (I learned this by setting \u003ccode\u003eCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDERR\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003eZephyr project\u0026nbsp;\u003ca href=\"https://docs.zephyrproject.org/latest/build/dts/intro.html\" target=\"_blank\"\u003eIntroduction to devicetree\u003c/a\u003e documentation page explains how Zephyr uses devicetree\u003c/li\u003e\n\u003cli\u003eZephyr project \u003ca href=\"https://docs.zephyrproject.org/latest/build/dts/api/bindings.html#raspberry-pi-foundation-raspberrypi\" target=\"_blank\"\u003eRaspberry Pi Foundation (raspberrypi)\u003c/a\u003e section of the Bindings Index page links to driver pages including: \u003ca href=\"https://docs.zephyrproject.org/latest/build/dts/api/bindings/serial/raspberrypi%2Cpico-uart.html#dtbinding-raspberrypi-pico-uart\" target=\"_blank\"\u003eraspberrypi,pico-uart\u003c/a\u003e, \u003ca href=\"https://docs.zephyrproject.org/latest/build/dts/api/bindings/i2c/raspberrypi%2Cpico-i2c.html#dtbinding-raspberrypi-pico-i2c\" target=\"_blank\"\u003eraspberrypi,pico-i2c\u003c/a\u003e, and \u003ca href=\"https://docs.zephyrproject.org/latest/build/dts/api/bindings/gpio/raspberrypi%2Cpico-header.html#dtbinding-raspberrypi-pico-header\" target=\"_blank\"\u003eraspberrypi,pico-header\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eThe \u003ca href=\"https://github.com/devicetree-org/devicetree-specification/releases/download/v0.4/devicetree-specification-v0.4.pdf\" target=\"_blank\"\u003eDevicetree Specification v0.4\u003c/a\u003e (pdf attachment to GitHub release) explains the syntax and structure of devicetree files\u003c/li\u003e\n\u003cli\u003eThe\u0026nbsp;\u003ca href=\"https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf\" target=\"_blank\"\u003eRP2350 datasheet\u003c/a\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003efrom Raspberry Pi explains the address space layout, peripherals, and pin names of the RP2350\u003c/li\u003e\n\u003cli\u003eThe Adafruit Feather RP2350 Learn Guide \u003ca href=\"https://learn.adafruit.com/adafruit-feather-rp2350/downloads\" target=\"_blank\"\u003eDownloads page\u003c/a\u003e\u003cspan\u003e has a schematic that you can use to determine how the Feather board silk screen labels correspond to RP2350 GPIO pins\u003c/span\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eFeather RP2350 pin mapping TLDR:\u003c/p\u003e\n\u003ctable\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eFeather Silk / Net\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eQFN-60\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eRP2350 Signal\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eTX\u003c/td\u003e\n\u003ctd\u003e2\u003c/td\u003e\n\u003ctd\u003eTX0/\u003cstrong\u003eGPIO0\u003c/strong\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eRX\u003c/td\u003e\n\u003ctd\u003e3\u003c/td\u003e\n\u003ctd\u003eRX0/\u003cstrong\u003eGPIO1\u003c/strong\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSDA\u003c/td\u003e\n\u003ctd\u003e4\u003c/td\u003e\n\u003ctd\u003eSDA1/\u003cstrong\u003eGPIO2\u003c/strong\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSCL\u003c/td\u003e\n\u003ctd\u003e5\u003c/td\u003e\n\u003ctd\u003eSCL1/\u003cstrong\u003eGPIO3\u003c/strong\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eD9\u003c/td\u003e\n\u003ctd\u003e13\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eGPIO9\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eD10\u003c/td\u003e\n\u003ctd\u003e14\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eGPIO10\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eD11\u003c/td\u003e\n\u003ctd\u003e15\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eGPIO11\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eMISO\u003c/td\u003e\n\u003ctd\u003e32\u003c/td\u003e\n\u003ctd\u003eMISO0/\u003cstrong\u003eGPIO20\u003c/strong\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eNEOPIX\u003c/td\u003e\n\u003ctd\u003e33\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eGPIO21\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSCK\u003c/td\u003e\n\u003ctd\u003e34\u003c/td\u003e\n\u003ctd\u003eSCK0/\u003cstrong\u003eGPIO22\u003c/strong\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eMOSI\u003c/td\u003e\n\u003ctd\u003e35\u003c/td\u003e\n\u003ctd\u003eMOSI0/\u003cstrong\u003eGPIO23\u003c/strong\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eQSPI_SCK\u003c/td\u003e\n\u003ctd\u003e56\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eQSPI_SCLK\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eQSPI_CS\u003c/td\u003e\n\u003ctd\u003e60\u003c/td\u003e\n\u003ctd\u003e\n\u003cstrong\u003eQSPI_CS\u003c/strong\u003e (inverted)\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eQSPI_DATA[0]\u003c/td\u003e\n\u003ctd\u003e57\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eQSPI_SD0\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eQSPI_DATA[1]\u003c/td\u003e\n\u003ctd\u003e59\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eQSPI_SD1\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eQSPI_DATA[2]\u003c/td\u003e\n\u003ctd\u003e58\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eQSPI_SD2\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eQSPI_DATA[3]\u003c/td\u003e\n\u003ctd\u003e55\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eQSPI_SD3\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eFlash \u0026amp; Debug\u003c/h3\u003e\n\u003cp\u003eTo flash your firmware, I recommend using the Raspberry Pi Debug Probe with OpenOCD.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eYou can \u003ccode\u003egit clone\u003c/code\u003e the Raspberry Pi version of openocd from \u003ca href=\"https://github.com/raspberrypi/openocd\" target=\"_blank\"\u003eraspberrypi/openocd\u003c/a\u003e on GitHub (see \"Dev Tool Setup\" section above for build \u0026amp; install instructions). You will need to provide \u003ccode\u003ewest build\u003c/code\u003e with a \u003ccode\u003e-- -DOPENOCD=...\u003c/code\u003e option to make sure that west flash can find the right version of \u003ccode\u003eopenocd\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eThe \u003ca href=\"https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html\" target=\"_blank\"\u003eRaspberry Pi Debug Probe Documentation\u003c/a\u003e explains how to wire the debug probe to a Raspberry Pi Pico. For the Feather RP2350, use the Feather \u003cstrong\u003eRX\u003c/strong\u003e and \u003cstrong\u003eTX\u003c/strong\u003e pins for the UART connection.\u003c/li\u003e\n\u003cli\u003eZephyr's \u003ca href=\"https://docs.zephyrproject.org/latest/develop/west/build-flash-debug.html\"\u003eBuilding, Flashing and Debugging\u003c/a\u003e\u003cspan\u003e documentation page explains a lot of background details.\u003c/span\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003ePi Debug Probe Wiring TLDR:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eGray cable with 3-pin connectors is SWD (connect this from \u003cstrong\u003ePi Debug Probe\u0026nbsp;D\u003c/strong\u003e port to\u0026nbsp;\u003cstrong\u003eFeather debug\u003c/strong\u003e port)\u003c/li\u003e\n\u003cli\u003eOrange/Black/Yellow cable with male header pins is UART serial (connect 3-pin end to \u003cstrong\u003ePi Debug Probe U\u003c/strong\u003e port and pin header ends to Feather breadboard)\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eOrange\u003c/strong\u003e: TX\u0026nbsp; (connect to \u003cstrong\u003eFeather RX\u003c/strong\u003e)\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eBlack\u003c/strong\u003e: GND (connect to \u003cstrong\u003eFeather GND\u003c/strong\u003e)\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eYellow\u003c/strong\u003e: RX (connect to \u003cstrong\u003eFeather TX\u003c/strong\u003e)\u003c/li\u003e\n\u003c/ul\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eBoard Porting Guide\u003c/h3\u003e\n\u003cp\u003eThe Zephyr Project \u003ca href=\"https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html\" target=\"_blank\"\u003eBoard Porting Guide\u003c/a\u003e 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.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eCreate a board/adafruit/ Directory\u003c/h2\u003e\n\u003cp\u003eThe \u003ca href=\"https://github.com/zephyrproject-rtos/zephyr\" target=\"_blank\"\u003eZephyr repository\u003c/a\u003e on GitHub includes many \u003ca href=\"https://github.com/zephyrproject-rtos/zephyr/tree/main/boards\" target=\"_blank\"\u003eboard definitions\u003c/a\u003e, but you can also make your own for boards that aren't yet supported.\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cspan\u003eIn your \u003ca href=\"https://docs.zephyrproject.org/latest/develop/application/index.html#zephyr-workspace-application\" target=\"_blank\"\u003eZephyr workspace\u003c/a\u003e, you can use \u003ccode\u003ewest\u003c/code\u003e to build an application that mixes code and board definitions from your own git repo(s) and the main Zephyr repo.\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003eThe\u0026nbsp;\u003ccode\u003ewest\u003c/code\u003e 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\u0026nbsp;\u003ca href=\"https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#create-your-board-directory\" target=\"_blank\"\u003eCreate your board directory\u003c/a\u003e section of the Zephyr Board Porting docs page.\u003c/p\u003e\n\u003cp\u003eFor creating Adafruit board definitions:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eVendor directory is \u003ccode\u003eboard/adafruit\u003c/code\u003e\n\u003c/li\u003e\n\u003cli\u003eBoard directory is \u003ccode\u003eboard/adafruit/$BOARD_ID\u003c/code\u003e, where \u003ccode\u003e$BOARD_ID\u003c/code\u003e is the board's Circuitpython\u0026nbsp;\u003ccode\u003eboard.board_id\u003c/code\u003e, modified to remove the \"adafruit_\" at the front.\u003c/li\u003e\n\u003cli\u003eThe \"qualifiers\" for the M33 core of the Feather RP2350 are \u003ccode\u003erp2350a/m33\u003c/code\u003e in some \u003ccode\u003ewest\u003c/code\u003e command line options or\u0026nbsp;\u003ccode\u003erp2350a_m33\u003c/code\u003e when used as part of a file name.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThe required files for a minimal Feather RP2350 board definition are:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eboards/adafruit/feather_rp2350/board.yml\u003c/li\u003e\n\u003cli\u003eboards/adafruit/feather_rp2350/Kconfig.feather_rp2350\u003c/li\u003e\n\u003cli\u003eboards/adafruit/feather_rp2350/feather_rp2350_rp2350a_m33.dts\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eOther files can be added to enable additional features (see Zephyr docs linked above).\u003c/p\u003e\n\u003cp\u003eFor this example, to get building and flashing working well, I needed the following files (see listings and descriptions below):\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eboard.cmake\u003c/li\u003e\n\u003cli\u003eboard.yml\u003c/li\u003e\n\u003cli\u003eKconfig.feather_rp2350\u003c/li\u003e\n\u003cli\u003efeather_rp2350_rp2350a_m33.dts\u003c/li\u003e\n\u003cli\u003efeather_rp2350_rp2350a_m33_defconfig\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eTo try my Feather RP2350 board definition, you can either clone my \u003ca href=\"https://github.com/samblenny/zphqst-01\" target=\"_blank\"\u003ezphqst-01\u003c/a\u003e GitHub repo or create the files individually by hand.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003e\u003cspan\u003eboard.cmake\u003c/span\u003e\u003c/h3\u003e\n\u003cp\u003e\u003cspan\u003eThis provides CMake configuration settings for using OpenOCD with the Raspberry Pi Debug probe to flash firmware to the Feather RP2350.\u003c/span\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://github.com/samblenny/zphqst-01/blob/v0.1.1/boards/adafruit/feather_rp2350/board.cmake"},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eboard.yml\u003c/h3\u003e\n\u003cp\u003eThis sets board metadata for the board, vendor and soc names.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://github.com/samblenny/zphqst-01/blob/v0.1.1/boards/adafruit/feather_rp2350/board.yml"},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003e\u003cspan\u003eKconfig.feather_rp2350\u003c/span\u003e\u003c/h3\u003e\n\u003cp\u003e\u003cspan\u003eThis selects the soc and cpu core to use for the build.\u003c/span\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://github.com/samblenny/zphqst-01/blob/v0.1.1/boards/adafruit/feather_rp2350/Kconfig.feather_rp2350"},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003e\u003cspan\u003efeather_rp2350_rp2350a_m33.dts\u003c/span\u003e\u003c/h3\u003e\n\u003cp\u003e\u003cspan\u003eThis is where most the interesting board-specific stuff happens. This starts by including devicetree configuration from the \u003ca href=\"https://github.com/zephyrproject-rtos/zephyr/tree/main/boards/raspberrypi/rpi_pico2\" target=\"_blank\"\u003ezephyr/boards/raspberrypi/rpi_pico2\u003c/a\u003e 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.\u003c/span\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://github.com/samblenny/zphqst-01/blob/v0.1.1/boards/adafruit/feather_rp2350/feather_rp2350_rp2350a_m33.dts"},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003efeather_rp2350_rp2350a_m33_defconfig\u003c/h3\u003e\n\u003cp\u003eThis file stores a set of CMake configuration settings that will get applied when you specify this board with \u003ccode\u003ewest build -b feather_rp2350/rp2350a/m33\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eTo understand what all these things do, the easiest way is to open the menuconfig tool (\u003ccode\u003ewest build -t menuconfig\u003c/code\u003e or \u003ccode\u003emake menuconfig\u003c/code\u003e), search for the config variable, then read the help message about it. For example, to search for \u003ccode\u003eCONFIG_I2C_SHELL\u003c/code\u003e ,\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eStart menuconfig\u003c/li\u003e\n\u003cli\u003eType the \u003ccode\u003e/\u003c/code\u003e 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.)\u003c/li\u003e\n\u003cli\u003eIf 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.\u003c/li\u003e\n\u003cli\u003eYou should now be somewhere in the menuconfig menus, at the location where your search result lives in the menu hierarchy. Type the \u003ccode\u003e?\u003c/code\u003e key to see the help message describing that config option.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eFor more information about \u003ccode\u003emenuconfig\u003c/code\u003e, you can read the Zephyr project \u003ca href=\"https://docs.zephyrproject.org/latest/build/kconfig/menuconfig.html\" target=\"_blank\"\u003eInteractive Kconfig interfaces\u003c/a\u003e documentation page.\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://github.com/samblenny/zphqst-01/blob/v0.1.1/boards/adafruit/feather_rp2350/feather_rp2350_rp2350a_m33_defconfig"},{"element_type":"text","content":"\n  \n  \n  \n  \n        \u003ch2\u003eBuild / Flash / Run\u003c/h2\u003e\n      \n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n        \u003ch3\u003eBegin Zephyr dev session\u003c/h3\u003e\n\u003cp\u003eTo begin a terminal session using Zephyr command line build tools, you need to:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eOpen a terminal shell\u003c/li\u003e\n\u003cli\u003eChange to your zephyr workspace directory (e.g. \u003ccode\u003e~/code/zephyr-workspace\u003c/code\u003e)\u003c/li\u003e\n\u003cli\u003eActivate your zephyr workspace's Python virtual environment (e.g. \u003ccode\u003e~/code/zephyr-workspace/.venv\u003c/code\u003e)\u003c/li\u003e\n\u003cli\u003e(optional) Use \u003ccode\u003ewest sdk\u003c/code\u003e to make sure you have the \u003ccode\u003e\u003cspan\u003earm-zephyr-eabi\u003c/span\u003e\u003c/code\u003e toolchain 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.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eWhen I start a Zephyr dev session on Debian 12 and check the installed toolchains, it looks like this:\u003c/p\u003e\n      \n","metadata":{}},{"element_type":"code","content":"$ cd ~/code/zephyr-workspace/\n$ source .venv/bin/activate\n(.venv) $ ls\nbootloader  modules  tools  zephyr zphqst-01\n(.venv) $ west sdk\n0.17.0:\n  path: /home/sam/zephyr-sdk-0.17.0\n  hosttools: installed\n  installed-toolchains:\n    - xtensa-espressif_esp32s3_zephyr-elf\n    - arm-zephyr-eabi\n  available-toolchains:\n    - aarch64-zephyr-elf\n...","metadata":{"language":"terminal","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eSome notes:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eThe \u003ccode\u003ezephyr\u003c/code\u003e directory inside of my workspace directory is a cloned copy of the main\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003ca href=\"https://github.com/zephyrproject-rtos/zephyr\" target=\"_blank\"\u003eZephyr repository\u003c/a\u003e\u003cspan\u003e on GitHub. This has source for the Zephyr kernel and drivers along with the default set of board definitions and CMake configuration files.\u003c/span\u003e\n\u003c/li\u003e\n\u003cli\u003eThe \u003ccode\u003ezphqst-01\u003c/code\u003e directory is a clone of my \u003ca href=\"https://github.com/samblenny/zphqst-01\" target=\"_blank\"\u003ezphqst-01 repository\u003c/a\u003e. This has my custom Feather RP2350 board definition and a Makefile to help build the Zephyr shell sample application.\u003c/li\u003e\n\u003cli\u003eThere 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\u0026nbsp;\u003ccode\u003egit\u003c/code\u003e to manually clone my application repository into my \u003ccode\u003ezephyr-workspace\u003c/code\u003e directory. If you want to learn about fancier options where \u003ccode\u003ewest\u003c/code\u003e can help you manage your project dependencies, check out the\u0026nbsp;Zephyr project \u003ca href=\"https://docs.zephyrproject.org/latest/develop/west/manifest.html\" target=\"_blank\"\u003eWest Manifests\u003c/a\u003e and \u003ca href=\"https://docs.zephyrproject.org/latest/develop/west/basics.html\" target=\"_blank\"\u003eBasics\u003c/a\u003e documentation pages.\u003c/li\u003e\n\u003c/ol\u003e\n      \n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n        \u003ch3\u003eUsing west with make\u003c/h3\u003e\n\u003cp\u003eThis example uses a Zephyr workspace set up with Debian 12 Linux according to the procedure described my \u003ca href=\"https://adafruit-playground.com/u/SamBlenny/pages/getting-started-with-zephyr-on-linux\" target=\"_blank\"\u003eGetting Started with Zephyr on Linux\u003c/a\u003e Playground guide. For Windows, it's possible the \u003ccode\u003ewest\u003c/code\u003e commands here may work unchanged if you install\u0026nbsp;\u003ca href=\"https://learn.microsoft.com/en-us/windows/wsl/about\" target=\"_blank\"\u003eWSL\u003c/a\u003e to get a Linux-like shell, but I haven't tried that.\u003c/p\u003e\n\u003cp\u003eIf you clone my zphqst-01\u0026nbsp;repo, you can use the\u0026nbsp;\u003ccode\u003eMakefile\u003c/code\u003e with \u003ccode\u003emake\u003c/code\u003e to do:\u003c/p\u003e\n      \n\n","metadata":{}},{"element_type":"code","content":"$ make shell\n$ make flash\n$ make uart","metadata":{"language":"terminal","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eWhen you do \u003ccode\u003emake uart\u003c/code\u003e, it will run \u003ccode\u003escreen -fn ... 115200\u003c/code\u003e to open a serial monitor session using the \u003ccode\u003escreen\u003c/code\u003e command line program as a terminal emulator. If you don't like \u003ccode\u003escreen\u003c/code\u003e, any other serial monitor that can do 115200 8N1 should work fine.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eThe Makefile\u003c/h3\u003e\n\u003cp\u003eThis is what my Makefile looks like:\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"# SPDX-License-Identifier: Apache-2.0 OR MIT\n# SPDX-FileCopyrightText: Copyright 2025 Sam Blenny\n\n# CAUTION: Using OpenOCD with the RP2350 requires a recent version of openocd\n# with RP2350 support. At the time I'm writing this, (Feb 9, 2025), you need to\n# build the Raspberry Pi openocd fork from source. You will also need to be\n# sure that the west OPENOCD cmake variable gets set correctly in a\n# board.cmake, CMakeLists.txt, or command line argument.\n\n\n# Uncomment the next line if you want extra debug info from cmake\n#_CMAKE_ECHO=-DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDERR\n_OPENOCD=-DOPENOCD=../openocd/build/bin/openocd\n\n# Build Zephyr shell for Feather RP2350 with OpenOCD and Pi Debug Probe.\nshell:\n\twest build -b feather_rp2350/rp2350a/m33         \\\n\t\t../zephyr/samples/subsys/shell/shell_module/ \\\n\t\t-- -DBOARD_ROOT=$$(pwd) ${_OPENOCD} ${_CMAKE_ECHO}\n\n# Interactively modify config from previous build\nmenuconfig:\n\twest build -t menuconfig\n\n# Flash previously built firmware\nflash:\n\twest flash\n\n# Connect to board's serial console using Pi Debug Probe UART interface\n# This works for me on Debian 12 with one and only 1 Pi Debug Probe plugged\n# in. You may need to use a different device path for other system setups.\nuart:\n\t@screen -fn /dev/serial/by-id/*Pi_Debug* 115200\n\nclean:\n\trm -rf build\n\n# If west build chokes on the dts file, it will give an uninformative numeric\n# error code instead of dtc's stderr/stdout. But, it does leave behind a\n# build/zephyr/zephyr.dts file with the preprocessed and merged output of all\n# the various dts files. In zephyr/cmake/modules/dts.cmake, on about line 404,\n# there is an `execute_process(COMMAND ${DTC} ...)` command. If you edit that\n# command to include the ECHO_OUTPUT_VARIABLE and ECHO_ERROR_VARIABLE args, it\n# will echo dtc's error message explaining what went wrong. You can also do\n# `west build ... -- -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDERR` to see the\n# command cmake uses to invoke dtc. (that's where the invocation below came\n# from)\ndtc:\n\t@dtc -O dts -o - -b 0 -E unit_address_vs_reg \\\n\t\t-Wno-unique_unit_address                 \\\n\t\t-Wunique_unit_address_if_enabled         \\\n\t\tbuild/zephyr/zephyr.dts\n\n# This may help diagnose errors during gen_edt.py script (after dtc)\ngen_edt:\n\tpython3 ../zephyr/scripts/dts/gen_edt.py         \\\n\t\t--dts build/zephyr/zephyr.dts.pre            \\\n\t\t--dtc-flags ''                               \\\n\t\t--bindings-dirs ../zephyr/dts/bindings       \\\n\t\t--dts-out build/zephyr/zephyr.dts.new        \\\n\t\t--edt-pickle-out build/zephyr/edt.pickle.new \\\n\t\t--vendor-prefixes ../zephyr/dts/bindings/vendor-prefixes.txt\n\n.PHONY: shell menuconfig flash uart clean dtc gen_edt","metadata":{"language":"auto","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eZephyr Shell: I2C Scan + SHT41\u003c/h3\u003e\n\u003cp\u003eIf you build the shell sample with \u003ccode\u003eCONFIG_I2C=y\u003c/code\u003e , \u003ccode\u003eCONFIG_I2C_SHELL=y\u003c/code\u003e , \u003ccode\u003eCONFIG_SENSOR=y\u003c/code\u003e , \u003ccode\u003eCONFIG_SENSOR_SHELL=y\u003c/code\u003e , and\u003ccode\u003eCONFIG_SHT4X=y\u003c/code\u003e , then you can use the \u003ccode\u003ei2c scan\u003c/code\u003e command to scan the I2C bus and the \u003ccode\u003esensor get sht4x@44\u003c/code\u003e command to read temperature and humidity. You can read more about the Zephyr shell and related configuration options at the Zephyr project \u003ca href=\"https://docs.zephyrproject.org/latest/services/shell/index.html#shell-api\" target=\"_blank\"\u003eShell\u003c/a\u003e documentation page.\u003c/p\u003e\n\u003cp\u003eWhen 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 \u003ccode\u003euart:~$\u003c/code\u003e prompt. At the prompt, try typing \u003ccode\u003ehelp\u003c/code\u003e to see a list of available commands.\u003c/p\u003e\n\u003cp\u003eThis 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.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"uart:~$ \nuart:~$ demo board\nfeather_rp2350\nuart:~$ version\nZephyr version 4.0.99\nuart:~$ i2c \n  scan         recover      read         read_byte    direct_read  write\n  write_byte   speed\nuart:~$ i2c scan i2c@40098000 \n     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f\n00:             -- -- -- -- -- -- -- -- -- -- -- -- \n10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \n20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \n30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \n40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- -- \n50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \n60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \n70: -- -- -- -- -- -- -- --                         \n1 devices found on i2c@40098000\nuart:~$ \nuart:~$ sensor \n  get       attr_set  attr_get                      trig\nuart:~$ sensor get sht4x@44 \nchannel type=13(ambient_temp) index=0 shift=6 num_samples=1 value=29788083603ns (19.800868)\nchannel type=16(humidity) index=0 shift=6 num_samples=1 value=29788083603ns (46.141982)\nuart:~$","metadata":{"language":"terminal","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n        \u003cp\u003eTo locate the code which implements various shell features, you can use \u003ccode\u003egrep\u003c/code\u003e, 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:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eSearch the zephyr repo for \"CONFIG_I2C_SHELL\" (e.g. \u003ccode\u003egrep -r CONFIG_I2C_SHELL zephyr\u003c/code\u003e)\u003c/li\u003e\n\u003cli\u003eObserve that the \u003ca href=\"https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/i2c/CMakeLists.txt\" target=\"_blank\"\u003ezephyr/drivers/i2c/CMakeLists.txt\u003c/a\u003e file has a rule to include \u003ccode\u003ei2c_shell.c\u003c/code\u003e when the I2C shell variable is set\u003c/li\u003e\n\u003cli\u003eLook at the\u0026nbsp;\u003ca href=\"https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/i2c/i2c_shell.c\" target=\"_blank\"\u003ezephyr/drivers/i2c/i2c_shell.c\u003c/a\u003e file to see how the scan feature is implemented\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eWhen you finish with the shell, if you're using\u0026nbsp;\u003ccode\u003escreen\u003c/code\u003e (from \u003ccode\u003emake uart\u003c/code\u003e), you can \u003cstrong\u003eexit\u003c/strong\u003e the serial monitor \u003cstrong\u003ewith\u003c/strong\u003e the key sequence: \u003cstrong\u003eCtrl-a k y\u003c/strong\u003e\u003c/p\u003e\n      \n\n\n\n\n","metadata":{}}]