Skip to content

willswire/pico-swift

Repository files navigation

pico-swift

this project is a playground for embedded swift on the rasberry pi pico w. the first experiment is to get wifi up and running on the pico, using as little of the c sdk as possible. this may require some reimplementation of the sdk from c in swift native. we'll see how that goes...

build notes

install the following dependencies (Apple silicon):

# set up all git submodules
git submodule update --init

# set up creds (this file is ignored)
cp Credentials.swift.template Credentials.swift

# build commands
cmake -B build -G Ninja .
cmake --build build

run notes

# copy the program to the pico
cp build/ps.uf2  /Volumes/RPI-RP2

# the following usb tty id is specific to me
# run `ls /dev/tty.*` on macOS to find yours

screen /dev/tty.usbmodem11101 115200

To exit your Screen session completely1:

  • Make sure the Terminal window has focus.
  • Type Ctrl+A (you won’t see anything displayed yet)
  • Then type Ctrl+\ (the forward slash is located below Delete)
  • At the bottom of the Terminal window, you should see “Really quit and kill all your windows [y/n]”. Type “y”.
  • A confirmation to quit screen will show up in the bottom left corner of Terminal
  • You are now back in your regular Terminal command line.

helpful links

Footnotes

  1. Using Screen - Mac / Linux