Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/update-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,16 @@ jobs:
--out /tmp/adafruit-usb-pids.json
wc -l /tmp/adafruit-usb-pids.json

- name: Fetch SparkFun USB PID supplement (USB-VID tier-1 supplement)
id: fetch-sparkfun-first-party-pids
continue-on-error: true
run: |
uv run --no-project --script \
"${{ github.workspace }}/online-data-tools/fetch_sparkfun_usb_pids.py" \
--tier first-party \
--out /tmp/sparkfun-first-party-usb-pids.json
wc -l /tmp/sparkfun-first-party-usb-pids.json

- name: Fetch FTDI USB PID supplement (USB-VID tier-3 supplement)
id: fetch-ftdi-pids
continue-on-error: true
Expand Down Expand Up @@ -301,6 +311,16 @@ jobs:
--out /tmp/microchip-supplemental-usb-pids.json
wc -l /tmp/microchip-supplemental-usb-pids.json

- name: Fetch SparkFun supplemental USB PID rows (USB-VID tier-4 supplement)
id: fetch-sparkfun-supplemental-pids
continue-on-error: true
run: |
uv run --no-project --script \
"${{ github.workspace }}/online-data-tools/fetch_sparkfun_usb_pids.py" \
--tier supplemental \
--out /tmp/sparkfun-supplemental-usb-pids.json
wc -l /tmp/sparkfun-supplemental-usb-pids.json

- name: Dump PlatformIO board catalog → /tmp/all_boards.json
id: dump-pio
continue-on-error: true
Expand Down Expand Up @@ -351,6 +371,9 @@ jobs:
if [ "${{ steps.fetch-adafruit-pids.outcome }}" = "success" ] && [ -s /tmp/adafruit-usb-pids.json ]; then
args+=(--json "adafruit-usb-pids=/tmp/adafruit-usb-pids.json")
fi
if [ "${{ steps.fetch-sparkfun-first-party-pids.outcome }}" = "success" ] && [ -s /tmp/sparkfun-first-party-usb-pids.json ]; then
args+=(--json "sparkfun-first-party-usb-pids=/tmp/sparkfun-first-party-usb-pids.json")
fi
if [ "${{ steps.run-dump.outcome }}" = "success" ] && [ -s /tmp/usb-ids-rs.json ]; then
args+=(--json "usb-ids-rs=/tmp/usb-ids-rs.json")
fi
Expand Down Expand Up @@ -405,6 +428,11 @@ jobs:
# fill gaps only after first-party and generic USB-ID sources.
args+=(--json "microchip-supplemental-usb-pids=/tmp/microchip-supplemental-usb-pids.json")
fi
if [ "${{ steps.fetch-sparkfun-supplemental-pids.outcome }}" = "success" ] && [ -s /tmp/sparkfun-supplemental-usb-pids.json ]; then
# Third-party SparkFun board-package rows are deliberately weak:
# they fill gaps only after first-party and generic USB-ID sources.
args+=(--json "sparkfun-supplemental-usb-pids=/tmp/sparkfun-supplemental-usb-pids.json")
fi
if [ "${#args[@]}" -eq 0 ]; then
echo "::warning::all USB-VID sources failed; preserving previously committed data"
exit 1
Expand Down Expand Up @@ -580,6 +608,7 @@ jobs:
echo "| microchip first-party pids | ${{ steps.fetch-microchip-first-party-pids.outcome }} |"
echo "| arduino usb-pids | ${{ steps.fetch-arduino-pids.outcome }} |"
echo "| adafruit usb-pids | ${{ steps.fetch-adafruit-pids.outcome }} |"
echo "| sparkfun first-party pids | ${{ steps.fetch-sparkfun-first-party-pids.outcome }} |"
echo "| ftdi usb-pids | ${{ steps.fetch-ftdi-pids.outcome }} |"
echo "| wch usb-pids | ${{ steps.fetch-wch-pids.outcome }} |"
echo "| teensy usb-pids | ${{ steps.fetch-teensy-pids.outcome }} |"
Expand All @@ -588,6 +617,7 @@ jobs:
echo "| silabs usb-pids | ${{ steps.fetch-silabs-pids.outcome }} |"
echo "| renesas weak pids | ${{ steps.fetch-renesas-pids.outcome }} |"
echo "| microchip weak pids | ${{ steps.fetch-microchip-supplemental-pids.outcome }} |"
echo "| sparkfun weak pids | ${{ steps.fetch-sparkfun-supplemental-pids.outcome }} |"
echo "| pio boards (platformio) | ${{ steps.dump-pio.outcome }} |"
echo "| merge usb-vid | ${{ steps.merge-usb.outcome }} |"
echo "| emit inlined supplement | ${{ steps.emit-inlined.outcome }} |"
Expand Down
17 changes: 17 additions & 0 deletions online-data-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ is committed to orphan branches:
| `fetch_microchip_usb_pids.py` | Microchip pyedbglib/pykitinfo plus weak AVRDUDE/board-package supplements | merge-compatible `/tmp/microchip-*-usb-pids.json` |
| `fetch_arduino_usb_pids.py` | Official ArduinoCore `boards.txt` files | merge-compatible `/tmp/arduino-usb-pids.json` |
| `fetch_adafruit_usb_pids.py` | Adafruit Arduino cores + TinyUF2 + CircuitPython descriptors | merge-compatible `/tmp/adafruit-usb-pids.json` |
| `fetch_sparkfun_usb_pids.py` | SparkFun board packages plus weak PlatformIO/CircuitPython supplements | merge-compatible `/tmp/sparkfun-*-usb-pids.json` |
| `fetch_ftdi_usb_pids.py` | Linux `ftdi_sio_ids.h` original-FTDI PID section | merge-compatible `/tmp/ftdi-usb-pids.json` |
| `fetch_wch_usb_pids.py` | WCH CH343 Linux driver + udev rules | merge-compatible `/tmp/wch-usb-pids.json` |
| `fetch_teensy_usb_pids.py` | PJRC Teensy core headers + loader CLI | merge-compatible `/tmp/teensy-usb-pids.json` |
Expand Down Expand Up @@ -89,6 +90,21 @@ Adafruit first-party product names win, but entries still describe USB
products rather than fbuild board support; support is governed by
`crates/fbuild-config/assets/boards`.

The SparkFun supplement has explicit source tiers for VID `0x1b4f`.
`--tier first-party` parses SparkFun-maintained Arduino board package files,
product-repo board files, and SparkFun product descriptors such as UF2
`board_config.h` and CircuitPython `mpconfigboard.mk` files. The workflow
orders this first-party tier before generic USB-ID feeds so SparkFun-owned
product names win. `--tier supplemental` parses third-party PlatformIO board
JSON `build.hwids` and Adafruit CircuitPython descriptors for SparkFun-named
boards only after first-party and generic USB-ID sources. Those weak rows fill
gaps such as newer SparkFun ESP32/RP/Teensy MicroMod products but must not
override first-party rows. SparkFun's Apollo3 package currently has no
`vid.N`/`pid.N` rows, so Artemis/Apollo3 board discovery remains a weak CH340
bridge hint rather than a SparkFun PID table. A SparkFun VID/PID row is USB
product metadata, not proof of fbuild board support; support still depends on
the board existing under `crates/fbuild-config/assets/boards`.

The FTDI supplement parses the upstream Linux `ftdi_sio_ids.h` header but only
the original FTDI PID section before the third-party marker. It emits a small
allowlist of missing FTDI-owned bridge/product rows such as `0403:6040` and
Expand Down Expand Up @@ -159,6 +175,7 @@ uv run --no-project --with pytest pytest online-data-tools/test_nordic_usb_pids.
uv run --no-project --with pytest pytest online-data-tools/test_microchip_usb_pids.py -v
uv run --no-project --with pytest pytest online-data-tools/test_arduino_usb_pids.py -v
uv run --no-project --with pytest pytest online-data-tools/test_adafruit_usb_pids.py -v
uv run --no-project --with pytest pytest online-data-tools/test_sparkfun_usb_pids.py -v
uv run --no-project --with pytest pytest online-data-tools/test_ftdi_usb_pids.py -v
uv run --no-project --with pytest pytest online-data-tools/test_wch_usb_pids.py -v
uv run --no-project --with pytest pytest online-data-tools/test_teensy_usb_pids.py -v
Expand Down
Loading
Loading