Files
hardware/.github/workflows/firmware.yml
T
Claude cddb085d4e firmware: Bluetooth for pico-serial W (BLE NUS, SPP, pairing)
PS_BOARD=w builds for the W board: the RM2 wired as on Pico W, with
BTstack polled from the main loop.

- Classic SPP server ("pico-serial", RFCOMM 1) with credit-based flow
  control; LE Nordic UART Service plus the pico-serial control service
  (line coding, outputs, inputs, mode, break, flow, credits, info).
- Port ownership (SPEC-W 4.6) in a new portable links layer
  (src/core/link.c): USB with its port open, else the first wireless
  link, else USB. The wired boards behave as before.
- Over SPP, DCD follows the phone's CONNECT / NO CARRIER.
- Pairing only in a 2-minute window (at power-up with no bonds, PAIR
  button, or a new USB request); hold PAIR 10 s to forget. Up to 4 bonds
  in flash, below the settings sector. Just Works with LE Secure
  Connections / SSP; data and control need an encrypted link.
- BT LED shows advertising, the pairing window or a connection; RD/SD go
  to the RM2's GPIOs.
- Host tests for the links layer; CI builds the W image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 10:53:28 +00:00

63 lines
2.1 KiB
YAML

# SPDX-License-Identifier: AGPL-3.0-only
# Copyright (C) 2026 Neo-Desktop
name: firmware
on:
push:
paths: ["firmware/**", "hardware/netlist/**", ".github/workflows/firmware.yml"]
pull_request:
paths: ["firmware/**", "hardware/netlist/**", ".github/workflows/firmware.yml"]
jobs:
build-and-test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Tools
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib ninja-build cmake
- name: Pin header matches the netlist
run: |
python3 hardware/netlist/build_netlist.py
git diff --exit-code -- firmware/src/generated hardware/netlist
- name: Core tests (host)
run: make -C firmware/test run
- name: Build (hood board)
run: |
cmake -S firmware -B firmware/build-hood -G Ninja -DPS_BOARD=hood
ninja -C firmware/build-hood
- name: Build (W board, Bluetooth)
run: |
cmake -S firmware -B firmware/build-w -G Ninja -DPS_BOARD=w \
-DPICO_SDK_PATH=$PWD/firmware/build-hood/_deps/pico_sdk-src \
-DPICO_TINYUSB_PATH=$PWD/firmware/build-hood/_deps/tinyusb-src
ninja -C firmware/build-w
- name: Build (Pico bench rig)
run: |
cmake -S firmware -B firmware/build-pico -G Ninja -DPS_BOARD=pico \
-DPICO_SDK_PATH=$PWD/firmware/build-hood/_deps/pico_sdk-src \
-DPICO_TINYUSB_PATH=$PWD/firmware/build-hood/_deps/tinyusb-src
ninja -C firmware/build-pico
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Emulator test (rp2040js)
run: firmware/test/emu/run.sh firmware/build-hood/pico-serial-hood.bin
- uses: actions/upload-artifact@v4
with:
name: pico-serial-firmware
path: |
firmware/build-hood/pico-serial-hood.uf2
firmware/build-w/pico-serial-w.uf2
firmware/build-pico/pico-serial-pico.uf2