Building Zephyr for the Raspberry Pi Pico2 W

Originally published at: Building Zephyr for the Raspberry Pi Pico2 W - The Golioth Developer Blog

The Raspberry Pi Pico2 W is the one with a microcontroller and Wi-Fi. When most people think of Raspberry Pi as a single-board computer running Linux, this model is a microcontroller with a slew of impressive peripherals. While the original Pico (based on the RP2040) has had Zephyr support for a long time, the Pico2 is build on an RP2350 and the W variant delivers Wi-Fi support which lands in Zephyr with the upcoming release of v4.3.0. We love taking new IoT hardware for a spin on Golioth and couldn’t resist adding the Pico2 W to our list of “works with Golioth” boards. In fact, we like this one so much we’re planning to add it to our hardware-in-the-loop (HIL) rigs to test on the hardware with each PR and push to main. State of Pico2 W Support in Zephyr The RP2350 has had support in Zephyr for some time now, but the option of using the Wi-Fi–available thanks to the Infineon chip on the Pico2 W board–is brand new. For now, you’ll need to build on v4.3.0-rc2 to use the Wi-Fi. Also of note is that the last stable release of OpenOCD (0.12.0 release January 2023) does not support the RP2350. Since this is the version included in the Zephyr skd-ng, you’ll need to build OpenOCD from source (or find a newer build) in order to flash/debug the Pico2 W. I found that building OpenOCD was pretty straight-forward. Follow the compilation instructions on the README by running the following commands: ./bootstrap ./configure make sudo make install I didn’t actually run the install command, instead pointing Zephyr’s west tool to the binary and the scripts directory. More on that later.…

1 Like