Skip to content

Bluepad32 for Pico W and Pico 2 W using Pico SDK

Supported boards

Installation

1. Download Pico SDK

You need to install Pico SDK. The instructions are different for Linux/macOS and Windows.

Recommended: Use Pico SDK v2.1.1 or newer.

Clone Pico SDK from Github: <https://github.com/raspberrypi/pico-sdk>

```sh
# Optionally create a destination folder
mkdir ~/pico && cd ~/pico

# Clone it from Github
git clone https://github.com/raspberrypi/pico-sdk.git --branch master
cd pico-sdk
git submodule update --init
```

And set `PICO_SDK_PATH` to the correct path:

```
# set PICO_SDK_PATH to the correct path
export PICO_SDK_PATH=$HOME/pico/pico-sdk/
```

2. Clone Bluepad32 GitHub repo

git clone --recursive https://github.com/ricardoquesada/bluepad32.git

3. Patch BTstack

cd ${BLUEPAD32_SRC}/external/btstack
git apply ../patches/*.patch

4. Modify example

Go to example folder:

# ${BLUEPAD32} represents the folder where Bluepad32 Github repo was cloned
cd ${BLUEPAD32}/examples/pico_w

Customize src/my_platform.c file to your needs:

5. Build it

Build the .uf2 file by doing:

mkdir build
cd build
cmake ..
make -j

6. Flash it

Copy build/bluepad32_picow_example_app.uf2 to Pico W.

Use this guide if you are not sure how to do it: