Files
Radick/firmware/flash.ps1
dami 1a47837a2c
Some checks failed
build / host-tests (push) Has been cancelled
build / esp-idf (push) Has been cancelled
Add prebuilt firmware package
2026-07-21 08:45:33 +00:00

31 lines
760 B
PowerShell

param(
[Parameter(Mandatory = $true, Position = 0)]
[string]$Port
)
$ErrorActionPreference = "Stop"
$FirmwareDir = Split-Path -Parent $MyInvocation.MyCommand.Path
Write-Host "Keep the RD-03D external 5 V supply OFF while flashing."
$EsptoolArgs = @(
"-m", "esptool",
"--chip", "esp32s3",
"--port", $Port,
"--baud", "460800",
"--before", "default_reset",
"--after", "hard_reset",
"write_flash",
"--flash_mode", "dio",
"--flash_freq", "80m",
"--flash_size", "4MB",
"0x0", (Join-Path $FirmwareDir "bootloader.bin"),
"0x8000", (Join-Path $FirmwareDir "partition-table.bin"),
"0x10000", (Join-Path $FirmwareDir "radick.bin")
)
& python @EsptoolArgs
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}