1a7f0689ab
Devcontainer now grants libusb access to the FT2232H so iceprog (bitstream) and pyftdi (FT2232H EEPROM) run inside the container: - devcontainer.json: --privileged + /dev/bus/usb bind mount - Dockerfile: sudo (NOPASSWD for vscode; USB nodes are root-owned), libusb-1.0-0, libftdi1-2, pyftdi Add the flash-re-bba-rb skill documenting the procedure (bitstream via best swept seed, optional EEPROM string, troubleshooting, guardrails) and flash_ftdi_eeprom.py (pyftdi, backup-first, dry-run default) + ftdi_eeprom.conf value spec. Bring-up on the repaired V1 unit: bitstream flash VERIFY OK (iceprog build/seed4/top.bin, capture 58.36 MHz). EEPROM product string CANNOT be programmed on V1 — U7 is a 93LC46B (128 B), too small for the FT2232H, which needs a 93LC56B (256 B); the 128 B chip mirrors and the config write fails verify. This overturns the old REVIEW note "93LC46B = correct for FT2232H" (that only checked ORG, not size). Board still works blank -> ROM defaults; iceprog + UART unaffected. Documented in REVIEW.md + TODO.md (swap U7->93LC56B for V2); flash_ftdi_eeprom.py detects the mirroring and refuses the write. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
56 lines
1.9 KiB
Docker
56 lines
1.9 KiB
Docker
FROM debian:sid-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
git \
|
|
git-lfs \
|
|
sudo \
|
|
python3 \
|
|
python3-venv \
|
|
python3-pip \
|
|
yosys \
|
|
nextpnr-ice40 \
|
|
fpga-icestorm \
|
|
libusb-1.0-0 \
|
|
libftdi1-2 \
|
|
nodejs npm \
|
|
graphviz \
|
|
poppler-utils \
|
|
kicad \
|
|
kicad-libraries \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
# libusb-1.0-0 + libftdi1-2: USB backend for `iceprog` (FPGA flash) and `pyftdi`
|
|
# (FT2232H EEPROM). sudo: the /dev/bus/usb nodes are root-owned, so the vscode
|
|
# user flashes via `sudo` (NOPASSWD, configured below).
|
|
|
|
# Debian marks the system Python as externally-managed (PEP 668), so install
|
|
# project deps into a venv. /opt/venv is first on PATH, so `python`/`pip` resolve
|
|
# to it for all users.
|
|
ENV VIRTUAL_ENV=/opt/venv
|
|
RUN python3 -m venv "$VIRTUAL_ENV"
|
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
|
|
RUN npm install -g @anthropic-ai/claude-code
|
|
|
|
COPY requirements.txt /tmp/requirements.txt
|
|
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
|
|
|
# pyftdi: programs the FT2232H EEPROM (product string "re-BBA-rb") over libusb.
|
|
RUN pip install --no-cache-dir pyftdi
|
|
|
|
RUN useradd -m -u 1000 -s /bin/bash vscode \
|
|
&& echo 'vscode ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/vscode \
|
|
&& chmod 0440 /etc/sudoers.d/vscode
|
|
|
|
USER vscode
|
|
|
|
# KiCad global library tables (copied from the installed templates) so kicad-cli
|
|
# can run the library-parity DRC/ERC checks. Without these, every standard
|
|
# footprint/symbol reports "library not configured". KiCad's built-in defaults
|
|
# resolve the ${KICAD10_*_DIR} paths inside the templates, so no env vars needed.
|
|
RUN mkdir -p /home/vscode/.config/kicad/10.0 \
|
|
&& cp /usr/share/kicad/template/fp-lib-table /home/vscode/.config/kicad/10.0/fp-lib-table \
|
|
&& cp /usr/share/kicad/template/sym-lib-table /home/vscode/.config/kicad/10.0/sym-lib-table
|
|
|
|
WORKDIR /workspace
|