#!/usr/bin/env bash
set -euo pipefail

echo "[verify-probe] connected probes"
probe-rs list || {
  echo "probe-rs list failed"
  exit 1
}

echo "[verify-probe] known chip check"
if probe-rs chip list | grep -q 'STM32F103C8'; then
  echo "chip id available: STM32F103C8"
else
  echo "chip id STM32F103C8 not found in probe-rs chip list"
  exit 1
fi

echo "[verify-probe] done"
