Swift Embedded on Pico W

Pre-requisites

Set up Pico C/C++ SDK

git clone https://github.com/raspberrypi/pico-sdk
cd pico-sdk
git submodule update --init
export PICO_SDK_PATH=${PWD}

I would recommend adding the following to your ~/.zshrc or ~/.bash_profile

export PICO_SDK_PATH=<path>
export PICO_BOARD=pico_w

Apple's Swift Embedded Example

git clone https://github.com/apple/swift-embedded-examples
cd swift-embedded-examples

python3 -m venv env
source env/bin/activate
python3 -m pip install -r Tools/requirements.txt

cd pico-w-blink-sdk
export PICO_BOARD=pico_w
export TOOLCHAINS="Swift Development Snapshot"
cmake -B build -G Ninja .

Now, you can plug your board to your computer while holding down the BOOTSEL button. Then, simply copy the uf2 file

cp build/swift-blinky.uf2 /Volumes/RPI-RP2
If you have scrolled this far, consider subscribing to my mailing list here. You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.