Add prebuilt firmware package
This commit is contained in:
30
firmware/flash.ps1
Normal file
30
firmware/flash.ps1
Normal file
@@ -0,0 +1,30 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user