Files
hardware/firmware/test/Makefile
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

27 lines
884 B
Makefile

# SPDX-License-Identifier: AGPL-3.0-only
# Copyright (C) 2026 Neo-Desktop
# Host tests for the portable core: make -C firmware/test
CFLAGS ?= -std=c11 -O1 -g -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -fsanitize=address,undefined
CORE = ../src/core/core.c ../src/core/autobaud.c
DEPS = $(CORE) $(wildcard ../src/core/*.h) fake_hal.h wave.h wave.c
all: test_core test_autobaud test_link
test_core: test_core.c fake_hal.c $(DEPS)
$(CC) $(CFLAGS) -o $@ test_core.c fake_hal.c wave.c $(CORE) -lm
test_autobaud: test_autobaud.c $(DEPS)
$(CC) $(CFLAGS) -o $@ test_autobaud.c wave.c ../src/core/autobaud.c -lm
test_link: test_link.c fake_hal.c ../src/core/link.c $(DEPS)
$(CC) $(CFLAGS) -o $@ test_link.c fake_hal.c ../src/core/link.c $(CORE) -lm
.PHONY: all run clean
run: all
./test_core
./test_autobaud
./test_link
clean:
rm -f test_core test_autobaud test_link