# Build the firmware: build\build_out\tang25k_debugger_bl616.bin param([switch]$Clean) $ErrorActionPreference = 'Stop' . (Join-Path $PSScriptRoot 'common.ps1') $root = Get-ProjectRoot Set-BuildEnv $root Push-Location $root try { if ($Clean) { Remove-Item -Recurse -Force build -ErrorAction SilentlyContinue } & make.exe CHIP=bl616 BOARD=bl616dk if ($LASTEXITCODE) { throw "build failed ($LASTEXITCODE)" } $bin = Get-Item build\build_out\tang25k_debugger_bl616.bin Write-Host ("OK: {0} ({1} bytes)" -f $bin.FullName, $bin.Length) -ForegroundColor Green } finally { Pop-Location }