mirror of
https://github.com/D-Modem/hardware.git
synced 2026-11-28 17:48:05 -08:00
pico-serial Line's firmware: a USB front end for its Si3056 + Si3018 DAA, the modem itself being D-Modem on the host (SPEC-L.md). - Si3056 bring-up: 48 MHz MCLK from the USB PLL on GPIO21, reset in serial mode 0, PLL1 N = 125 / M = 256, 9600 Hz, 16-bit mode, line side powered up; FDT checked. - si3056.pio: the RP2040 as the serial port's slave; every word through the portable frame engine (daa_frame.c) from the PIO's interrupt. Register accesses ride in secondary frames (LSB flag, then FC pin). - USB: one vendor interface shaped like the SmartUSB56's (alt 1: isochronous OUT/IN at 1 ms, IN lengths set by the codec's clock, and an interrupt endpoint for events), vendor requests for rate, hook, flash, line monitor, register access, status, reset, UF2; 1209:0002. - Host tests (test_line.c): the frame engine against a model of the Si3056's serial port, the sample streams, the device logic; mutations of the frame engine are caught. PROTOCOL.md "Line stick" documents it for the host's driver; CI builds it. Not yet run on hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
74 lines
2.5 KiB
YAML
74 lines
2.5 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: Every function is documented
|
|
run: python3 firmware/tools/check_docs.py
|
|
|
|
- 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
|
|
|
|
- name: Build (phone-line stick)
|
|
run: |
|
|
cmake -S firmware -B firmware/build-line -G Ninja -DPS_BOARD=line \
|
|
-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-line
|
|
|
|
- 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
|
|
firmware/build-line/pico-serial-line.uf2
|