mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-25 15:03:46 +00:00
- Add setup.ps1: Auto-installs espup, espflash, and ESP32 toolchain - Add build.ps1: Auto-detects toolchain paths, no hardcoded values - Add flash.ps1: Auto-detects COM ports with interactive selection - Add env.ps1: Sets up environment for current session - Add monitor.ps1: Serial monitor with auto port detection - Update CLI to use PowerShell scripts on Windows - Improve COM port detection using System.IO.Ports - Update README with improved Windows workflow Fixes Windows-specific issues: - No more hardcoded paths (C:\Users\ruv\...) - Dynamic libclang and Python path resolution - Auto-detection of ESP toolchain location - Better error handling and user feedback 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
41 lines
1.2 KiB
PowerShell
41 lines
1.2 KiB
PowerShell
# monitor.ps1 - Open serial monitor for ESP32
|
|
# Auto-detects COM port
|
|
|
|
param(
|
|
[string]$Port = "",
|
|
[int]$Baud = 115200
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
Write-Host "`n=== RuvLLM ESP32 Serial Monitor ===" -ForegroundColor Cyan
|
|
Write-Host ""
|
|
|
|
# Auto-detect COM port if not specified
|
|
if (-not $Port) {
|
|
Add-Type -AssemblyName System.IO.Ports
|
|
$ports = [System.IO.Ports.SerialPort]::GetPortNames() |
|
|
Where-Object { $_ -match "COM\d+" } |
|
|
Sort-Object { [int]($_ -replace "COM", "") }
|
|
|
|
if ($ports.Count -eq 0) {
|
|
Write-Error "No COM ports found. Is the ESP32 connected?"
|
|
} elseif ($ports.Count -eq 1) {
|
|
$Port = $ports[0]
|
|
Write-Host "Auto-detected port: $Port" -ForegroundColor Green
|
|
} else {
|
|
Write-Host "Multiple COM ports found:" -ForegroundColor Yellow
|
|
for ($i = 0; $i -lt $ports.Count; $i++) {
|
|
Write-Host " [$i] $($ports[$i])"
|
|
}
|
|
$selection = Read-Host "Select port (0-$($ports.Count - 1))"
|
|
$Port = $ports[[int]$selection]
|
|
}
|
|
}
|
|
|
|
Write-Host "Opening monitor on $Port at $Baud baud..." -ForegroundColor Cyan
|
|
Write-Host "Press Ctrl+C to exit" -ForegroundColor Gray
|
|
Write-Host ""
|
|
|
|
# Use espflash monitor
|
|
& espflash monitor --port $Port --baud $Baud
|