828687b9ac
- preserve: bonding 정보 및 settings/NVS 유지, application만 다시 올리는 용도
20 lines
528 B
PowerShell
20 lines
528 B
PowerShell
param(
|
|
[string]$Hex = "build\merged.hex"
|
|
)
|
|
|
|
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$RepoRoot = Split-Path -Parent $PSScriptRoot
|
|
$HexPath = Join-Path $RepoRoot $Hex
|
|
|
|
if (-not (Test-Path -LiteralPath $HexPath)) {
|
|
throw "Hex file not found: $HexPath. Build the project first."
|
|
}
|
|
|
|
Write-Host "[FLASH] FULL ERASE mode"
|
|
Write-Host "[FLASH] This wipes application flash, NVS/settings, and BLE bonds."
|
|
Write-Host "[FLASH] Programming: $HexPath"
|
|
|
|
nrfjprog --program $HexPath --chiperase --verify --reset
|