Pico 2 W First Blink: Build Official pico-examples with PICO_BOARD=pico2_w

61 views 0 likes 0 comments 14 minutesOriginalTutorials

Build and flash the official raspberrypi/pico-examples blink target for Raspberry Pi Pico 2 W with -DPICO_BOARD=pico2_w (RP2350 + CYW43). Covers LED-on-wireless differences vs non-W boards, BOOTSEL flashing, and common CMake mistakes. Includes an affiliate disclosure linking a Pico 2 W listing.

#Raspberry Pi Pico 2 W #RP2350 #pico-examples #pico-sdk #Microcontroller #Embedded #CYW43 #Affiliate
Pico 2 W First Blink: Build Official pico-examples with PICO_BOARD=pico2_w

Pico 2 W First Blink: Build Official pico-examples with PICO_BOARD=pico2_w

If you just bought a Raspberry Pi Pico 2 W, the fastest way to prove the board is alive is not another blog-only tutorial—it is the official sample tree that Raspberry Pi maintains alongside the SDK.

This post walks through building and flashing a blink (and notes what changes on the wireless “W” boards) using:

I also link a currently listed Pico 2 W (RP2350) board that is convenient to order when you want a spare. Disclosure: that product link is an eBay affiliate link (customid=blog01). If you buy through it, I may earn a commission at no extra cost to you. Specs and shipping always win over marketing copy—check the listing yourself before you pay.

Why Pico 2 W is not “just another Pico”

Board MCU Wireless Board CMake flag
Pico RP2040 No pico
Pico W RP2040 CYW43 pico_w
Pico 2 RP2350 No pico2
Pico 2 W RP2350 CYW43 pico2_w

Two traps that waste an evening:

  1. Building with the wrong PICO_BOARD. A UF2 built for pico / pico_w is the wrong family for Pico 2 / Pico 2 W. Use -DPICO_BOARD=pico2_w.
  2. Looking for PICO_DEFAULT_LED_PIN on Pico 2 W. On the W boards the user LED is behind the wireless chip (CYW43_WL_GPIO_LED_PIN), not a plain RP GPIO. The official blink example already accounts for that when you select the right board.

You can confirm the board definition in the SDK itself: src/boards/include/boards/pico2_w.h sets PICO_PLATFORM to rp2350 and PICO_CYW43_SUPPORTED to 1.

Hardware checklist

  • A Pico 2 W (silkscreen should say Pico 2 W; the MCU marking is RP2350, not RP2040).
  • USB data cable (charge-only cables are a classic false “brick”).
  • Host with CMake, a GCC ARM embedded toolchain, and Python 3.

If you still need a board: here is the listing I checked while writing this — Raspberry Pi Pico 2 W (RP2350) on eBay (affiliate). When I opened it, the title matched Pico 2 W / RP2350, condition was New, and the buy price shown was about US $15.99. Seller fields on marketplaces are sometimes messy (wrong “model” / category)—trust the photo silkscreen + chip marking, and confirm shipping to your country on the listing page before checkout.

1) Clone SDK + examples

bash 复制代码
git clone https://github.com/raspberrypi/pico-sdk.git
git clone https://github.com/raspberrypi/pico-examples.git
export PICO_SDK_PATH="$PWD/pico-sdk"
## first time only:
git -C "$PICO_SDK_PATH" submodule update --init

Keep PICO_SDK_PATH exported (or pass -DPICO_SDK_PATH=... to CMake every time).

2) Configure specifically for Pico 2 W

From the examples repo:

bash 复制代码
cd pico-examples
cmake -S . -B build_pico2_w -G Ninja -DPICO_BOARD=pico2_w -DCMAKE_BUILD_TYPE=Release
cmake --build build_pico2_w --target blink hello_usb

Official pico-setup scripts build the same board set (pico, pico_w, pico2, pico2_w). The important part is the board flag, not memorizing a one-off blog CMakeLists.

After a successful build you should see UF2 artifacts under build_pico2_w/ (exact subfolder depends on the example target layout—search with find build_pico2_w -name 'blink*.uf2').

3) Flash via BOOTSEL

  1. Hold BOOTSEL on the Pico 2 W.
  2. Plug into USB; release BOOTSEL.
  3. The board mounts as a mass-storage volume named something like RP2350 (Pico 1 family often shows RPI-RP2).
  4. Drag the blink UF2 onto that volume; the board reboots.

If the LED starts blinking, your toolchain, cable, and board selection are good. Next, try hello_usb and open a serial terminal on the CDC ACM device (often /dev/ttyACM0 on Linux).

4) When you care about Wi-Fi next

Do not start with a custom MQTT stack on day one. In pico-examples, build the wireless examples only after PICO_BOARD=pico2_w (or another CYW43 board). Those targets pull in the CYW43 arch libraries that non-W boards simply do not provide.

A sane sequence:

  1. blink / hello_usb (bring-up)
  2. Official Wi-Fi “connect / scan” style examples from pico-examples
  3. Then your own sensor + HTTP/MQTT firmware

Common failure modes

Symptom Likely cause What to try
CMake succeeds but LED never blinks Wrong board flag / wrong UF2 Rebuild with -DPICO_BOARD=pico2_w
No USB disk appears Charge-only cable / weak port Swap cable; try another USB port
Disk appears, drag does nothing Wrong UF2 family Confirm volume name and rebuild for pico2_w
Wi-Fi examples will not link Built for non-W board Reconfigure with pico2_w / pico_w

Takeaway

The open-source path is already there: pico-sdk board headers + pico-examples CMake board matrix. Your job is mostly to pick pico2_w, flash a known-good UF2, and only then invent product firmware.

If you need a spare Pico 2 W on the desk while you iterate, this eBay listing is the one I used as a concrete SKU reference while drafting (affiliate disclosure above). Prefer official distributors when you need guaranteed regional shipping or bulk pricing; marketplace stock is handy for one-off maker runs.

References

Last Updated:2026-11-02 10:08:27

Comments (0)

Post Comment

Loading...
0/500

No comments yet, be the first to comment!