11 lines
329 B
PowerShell
11 lines
329 B
PowerShell
# 检查 pyOCD 是否已在运行,没有则启动
|
|
$port = 3333
|
|
$alreadyRunning = netstat -ano 2>$null | Select-String ":$port .*LISTENING"
|
|
|
|
if ($alreadyRunning) {
|
|
Write-Host "pyOCD already running on port $port"
|
|
} else {
|
|
Write-Host "Starting pyOCD GDB server..."
|
|
python -m pyocd gdbserver -t mspm0g3507 -f 500000
|
|
}
|