Build worked:
west build -d build/microbit/hello_world -b bbc_microbit samples/hello_world
but flash failed:
west flash -d build/microbit/hello_world
Related: mattoppenheim.com/2018/06/24/using-udev-to-remove-the-need-for-sudo-with-the-bbc-microbit
The build also generates a .hex file by default, and we've tried to flash it manually with:
cp build/microbit/hello_world/zephyr/zephyr.hex /media/ciro/MICROBIT/
but we failed to see it do anything with zephyr/blink_gpio.c, so not sure if the flashing was broken or if the code was broken, or if we didn't find the IO pins correctly.
Any print() command ends up on the USB, and is shown on the computer via programs such as ampy get back.
However, you can also send data over actual UART.
We connect Pin 0 (TX), Pin 1 (RX) and Pin 2 (GND) to the DSD TECH, and the USB to the Ubuntu 25.04 host laptop.
Then on the host laptop I run:
screen /dev/ttyUSB0 9600
and a counter shows up there just fine!
rpi-pico-w/upython/blink_gpio.py by Ciro Santilli 37 Created 2025-07-26 Updated 2025-07-27
Blink on-board LED. Note that they broke the LED hello world compatibility from non-W to W for God's sake!!!
The MicroPython code needs to be changed from the Raspberry Pi Pico 1, forums.raspberrypi.com/viewtopic.php?p=2016234#p2016234 comments:
Unlike the original Raspberry Pi Pico, the on-board LED on Pico W is not connected to a pin on RP2040, but instead to a GPIO pin on the wireless chip.
picotool by Ciro Santilli 37 2025-07-26
Tested on Ubuntu 25.04,
sudo apt install libusb-1.0-0-dev
git clone https://github.com/raspberrypi/pico-sdk
git clone https://github.com/raspberrypi/picotool
cd picotool
git checkout de8ae5ac334e1126993f72a5c67949712fd1e1a4
export PICO_SDK_PATH="$(pwd)/../pico-sdk"
mkdir build
cd build
cmake ..
cmake --build . -- -j"$(npro)" VERBOSE=1
and the executable is there under build/picotool so copy it somewhere in your PATH like:
cp picotool ~/bin
and then trying to use a Zephyr example:
sudo ~/bin/picotool load -f build/zephyr/zephyr.uf2
fails with:
No accessible RP2040 devices in BOOTSEL mode were found
TODO: how to avoid that? youtu.be/tRXLxrtfU_s?t=207 gives a workaround if you are using the Pico SDK by adding to CMakeLists.txt:
pico_enable_stdio_usb(blink 1)
but how to do it in Zephyr? Video description says:
make sure that your program initializes the USB code via a call to "stdio_init_all()".
but again how to do that from Zephyr? It appears that this only works if the code currently running has support for the feature:
Video 1.
Never unplug your Raspberry Pi Pico again by deltocode
. Source.
The Zephir LED blinker example does not work on the Raspberry Pi Pico W because the on-board LED is wired differently. But the hello world works and with:
screen /dev/ttyUSB0 115200
host shows:
*** Booting Zephyr OS build v4.2.0-491-g47b07e5a09ef ***
Hello World! rpi_pico/rp2040
Nice!
This section is about the original Raspberry Pi Pico board. The "1" was added retroactively to the name as more boards were released and "Raspberry Pi Pico" became a generic name for the brand.
Figure 1.
Jerry Chun Shing Lee in blue tie at the unveiling of Leonardo da Vinci's 'Salvator Mundi' painting at the Christie's showroom in Hong Kong on Oct. 13, 2017
. Source.
Zephyr hello world example by Ciro Santilli 37 Created 2025-07-26 Updated 2025-07-27
Uses printf to print some bytes somewhere, usually the first UART of the board.
Zephyr blinky example by Ciro Santilli 37 Created 2025-07-26 Updated 2025-07-27
Blinks the on-board LED if the board has one.
Does not work on:
Note that the LED blinker example does not work on the Raspberry Pi Pico W, see also: Run Zephyr on Raspberry Pi Pico W.
You can speed up the debug loop a little bit by plugging the Pi with BOOTSEL selected, and then running:
west flash --runner uf2
This flashes the image, and immediately turns off BOOTSEL mode and runs the program.
However to run again you need to unplug the USB and re-plug with BOOTSEL again so it is still painful.
Video 1.
Let's run Zephyr RTOS on Raspberry Pi Pico. Ep.1 by Mr. Green's Workshop
. Source.
Then ignore the other steps from the tutorial, as theese use the picozero package, which is broken with this error: github.com/raspberrypilearning/getting-started-with-the-pico/issues/57
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'
and uses picozero specific code. Rather, just use our examples from rpi-pico-w.

Unlisted articles are being shown, click here to show only listed articles.