Files
uv-k5-v3-emulator/work/boot-radio.ps1
mckero 2667e046e8 Emulator: multiboot slots from the page, flash controller, portable tests
flash controller: store ACR/OPTKEYR instead of swallowing them, which is what stopped the factory bootloader from starting

slots over the firmware's own serial protocol (0x0720 family); uvk5_socket/uvk5_testenv so a fresh checkout skips instead of failing; web UI slot table and Multiboot button; quick start, CONTRIBUTING, and stop tracking firmware images and radio dumps
2026-10-01 14:54:34 +08:00

20 lines
911 B
PowerShell

# Boot one firmware image in the emulator, paused, with a key held from reset.
#
# powershell -File work/boot-radio.ps1 -Image <path> -Qmp <port> -Gdb <port> [-Flash <img>]
#
# The quoting matters: passing a Windows path with spaces or commas straight through
# cmd /c from a caller that is itself quoted mangles it, which is what "unsupported
# machine type" and friends look like from outside. A script keeps one layer of it.
param(
[Parameter(Mandatory=$true)][string]$Image,
[int]$Qmp = 4470,
[int]$Gdb = 1260,
[string]$Flash = "$PSScriptRoot\ms-scratch.img"
)
$env:PATH = 'F:\msys64\mingw64\bin;' + $env:PATH
$env:UVK5_FLASH_IMAGE = $Flash
$qemu = 'F:\dsh-build\qemu-7.2.0\build\qemu-system-arm.exe'
& $qemu -M uv-k5-v3 -S -nographic -monitor none -serial null `
-qmp "tcp:127.0.0.1:$Qmp,server=on,wait=off" `
-kernel $Image -gdb "tcp::$Gdb" 2> "$PSScriptRoot\boot-radio-err.log"