- src/: прошивка встроенного отладчика BL616 — составное USB-устройство 1209:C0CA: DirtyJTAG v3 (WinUSB через MS OS 2.0) + CDC-ACM UART к FPGA B3/C3; UART до 20 Мбод на DMA, JTAG до 30 МГц через аппаратный SPI; - bin/: загрузчик Sipeed (0x0) и штатная прошивка 2025030317 для отката; - gui/: TangProgrammer.exe (C# WinForms, .NET Framework 4) — загрузка FPGA в SRAM и во флеш-память, копия и стирание флеш-памяти FPGA, прошивка моста; светлая и тёмная тема; - scripts/: setup, build, flash, build_gui, make_portable, а также make_release и publish_release для релизов Gitea; - fpga_test/, tests/: тестовые проекты Gowin (loopback, stream) и тесты UART на Python; - tools/openFPGALoader/: openFPGALoader 1.1.1 для Windows x64. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
1.3 KiB
PowerShell
26 lines
1.3 KiB
PowerShell
# Build TangProgrammer.exe (the GUI for openFPGALoader and the bridge firmware)
|
|
# with the C# compiler that comes with Windows (.NET Framework 4.x): nothing
|
|
# has to be installed.
|
|
#
|
|
# .\scripts\build_gui.ps1 -> TangProgrammer.exe in the project root
|
|
# .\scripts\build_gui.ps1 -Out some.exe -> elsewhere
|
|
param([string]$Out)
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
$root = Split-Path $PSScriptRoot -Parent
|
|
$src = Join-Path $root 'gui'
|
|
if (-not $Out) { $Out = Join-Path $root 'TangProgrammer.exe' }
|
|
$csc = Join-Path $env:WINDIR 'Microsoft.NET\Framework64\v4.0.30319\csc.exe'
|
|
if (-not (Test-Path $csc)) {
|
|
$csc = Join-Path $env:WINDIR 'Microsoft.NET\Framework\v4.0.30319\csc.exe'
|
|
}
|
|
if (-not (Test-Path $csc)) { throw '.NET Framework 4 C# compiler (csc.exe) not found' }
|
|
|
|
$sources = Get-ChildItem (Join-Path $src '*.cs') | ForEach-Object { $_.FullName }
|
|
& $csc /nologo /target:winexe /optimize+ /codepage:65001 "/out:$Out" `
|
|
"/win32icon:$src\app.ico" "/win32manifest:$src\app.manifest" "/resource:$src\app.ico,TangProgrammer.app.ico" `
|
|
/r:System.dll /r:System.Drawing.dll /r:System.Windows.Forms.dll /r:System.Management.dll `
|
|
$sources
|
|
if ($LASTEXITCODE) { throw "csc failed ($LASTEXITCODE) - is $Out running?" }
|
|
Write-Host "OK: $Out" -ForegroundColor Green
|