- DB720Flasher: WPF .NET 9 GUI 플래셔 - 멀티모델 프로파일(flash.json + 빌트인 DB720/DB402S/DB400S/DB400Q/DB300eM) - 포트 자동감지(JTAG 우선, 유령 포트 자동 회피), esptool v5 동봉 - flash_app.ps1 / flash_full.ps1 / list_ports.ps1: 기존 PowerShell 키트 - profiles/: 모델별 flash.json 템플릿 - firmware/flash.json: DB720 모델 설정 (서명 실펌웨어 .bin 은 repo 제외) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
180 lines
9.4 KiB
XML
180 lines
9.4 KiB
XML
<Window x:Class="DB720Flasher.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="펌웨어 플래시 도구" Height="660" Width="960"
|
|
MinHeight="560" MinWidth="860"
|
|
Background="{StaticResource Bg}" FontFamily="Segoe UI"
|
|
TextOptions.TextFormattingMode="Display">
|
|
|
|
<Window.Resources>
|
|
<Style x:Key="Card" TargetType="Border">
|
|
<Setter Property="Background" Value="{StaticResource Surface}" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource Border}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="CornerRadius" Value="10" />
|
|
<Setter Property="Padding" Value="16" />
|
|
</Style>
|
|
<Style x:Key="Hint" TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="{StaticResource TextSubtle}" />
|
|
<Setter Property="FontSize" Value="12" />
|
|
<Setter Property="TextWrapping" Value="Wrap" />
|
|
</Style>
|
|
<Style x:Key="FieldLabel" TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="{StaticResource TextSubtle}" />
|
|
<Setter Property="FontSize" Value="11" />
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
<Setter Property="Margin" Value="2,0,0,4" />
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 헤더 -->
|
|
<Border Grid.Row="0" Background="{StaticResource SurfaceAlt}" Padding="18,12">
|
|
<DockPanel>
|
|
<TextBlock DockPanel.Dock="Left" Text="펌웨어 플래시 도구" Foreground="{StaticResource Text}"
|
|
FontSize="18" FontWeight="Bold" VerticalAlignment="Center" />
|
|
<TextBlock x:Name="txtEsptool" Text="esptool 확인 중…" Foreground="{StaticResource TextSubtle}"
|
|
FontSize="11" VerticalAlignment="Center" HorizontalAlignment="Right"
|
|
TextTrimming="CharacterEllipsis" MaxWidth="460" />
|
|
</DockPanel>
|
|
</Border>
|
|
|
|
<!-- 본문: 좌(설정) / 우(실행+로그) -->
|
|
<Grid Grid.Row="1" Margin="16">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="350" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- ===== 좌: 설정 ===== -->
|
|
<Border Grid.Column="0" Style="{StaticResource Card}">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<StackPanel>
|
|
|
|
<TextBlock Style="{StaticResource FieldLabel}" Text="펌웨어 폴더" />
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox x:Name="txtFwFolder" Grid.Column="0" IsReadOnly="True" Text="(탐색 중…)" />
|
|
<Button x:Name="btnBrowse" Grid.Column="1" Content="폴더…" Margin="6,0,0,0" Click="OnBrowseClick" />
|
|
</Grid>
|
|
|
|
<TextBlock Style="{StaticResource FieldLabel}" Text="앱" Margin="2,12,0,4" />
|
|
<ComboBox x:Name="cboApps" />
|
|
|
|
<TextBlock Style="{StaticResource FieldLabel}" Text="모델" Margin="2,12,0,4" />
|
|
<ComboBox x:Name="cboModel" />
|
|
<TextBlock x:Name="txtProfile" Style="{StaticResource Hint}" FontSize="11" Margin="2,4,0,0" />
|
|
|
|
<Grid Margin="0,12,0,4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Style="{StaticResource FieldLabel}" Text="포트" VerticalAlignment="Bottom" Margin="2,0,0,0" />
|
|
<Button x:Name="btnRefresh" Grid.Column="1" Content="↻ 새로고침" Click="OnRefreshClick"
|
|
MinHeight="24" Padding="8,0" FontSize="11" />
|
|
</Grid>
|
|
<ComboBox x:Name="cboPorts" />
|
|
<TextBlock x:Name="txtPortStatus" Margin="2,6,0,0" FontSize="12" Foreground="{StaticResource Warn}"
|
|
TextWrapping="Wrap" Text="포트 검색 중…" />
|
|
<TextBlock x:Name="txtConsoleWarn" Style="{StaticResource Hint}" Margin="2,4,0,0"
|
|
Foreground="{StaticResource Warn}" Visibility="Collapsed" />
|
|
|
|
<TextBlock Style="{StaticResource FieldLabel}" Text="플래시 모드" Margin="2,14,0,4" />
|
|
<StackPanel Orientation="Horizontal">
|
|
<RadioButton x:Name="rbAppOnly" GroupName="mode" Content="앱만" IsChecked="True"
|
|
Checked="OnModeChanged" Margin="0,0,16,0" />
|
|
<RadioButton x:Name="rbStandard" GroupName="mode" Content="표준" Checked="OnModeChanged" Margin="0,0,16,0" />
|
|
<RadioButton x:Name="rbFull" GroupName="mode" Content="전체" Checked="OnModeChanged" />
|
|
</StackPanel>
|
|
<TextBlock Style="{StaticResource Hint}" FontSize="11" Margin="2,6,0,0"
|
|
Text="앱만=부트로더 안 건드림(안전) · 표준=부트로더 빼고 전부 · 전체=부트로더까지(eFuse 위험)" />
|
|
<CheckBox x:Name="chkForce" Margin="0,10,0,0" FontSize="12"
|
|
Content="--force (secure 보드 부트로더 거부 시)" />
|
|
|
|
<!-- eFuse 경고(전체 선택 시) — 컴팩트, 전체 설명은 툴팁 -->
|
|
<Border x:Name="pnlEfuse" Visibility="Collapsed" Margin="0,10,0,0"
|
|
Background="{StaticResource DangerDim}" BorderBrush="{StaticResource Danger}"
|
|
BorderThickness="1" CornerRadius="6" Padding="10">
|
|
<Border.ToolTip>
|
|
<ToolTip MaxWidth="360">
|
|
<TextBlock TextWrapping="Wrap" Text="전체 플래시는 부트로더를 다시 씁니다. secure boot eFuse가 아직 안 구워진 보드는 첫 부팅에 영구로 구워집니다(되돌릴 수 없음). 이미 구워진 보드는 부트로더(0x8000 아래) 쓰기를 거부하는데(정상) — 그땐 '표준'이나 '앱만'으로. 부트로더를 꼭 다시 써야 하면 --force가 필요할 수 있습니다." />
|
|
</ToolTip>
|
|
</Border.ToolTip>
|
|
<StackPanel>
|
|
<TextBlock Foreground="{StaticResource Danger}" FontWeight="Bold" FontSize="12" TextWrapping="Wrap"
|
|
Text="⚠ 부트로더 재작성 · eFuse 영구 굽힘 위험(비가역)" />
|
|
<CheckBox x:Name="chkEfuseAck" Margin="0,8,0,0" FontSize="12" Foreground="{StaticResource Danger}"
|
|
Checked="OnModeChanged" Unchecked="OnModeChanged"
|
|
Content="위험을 이해했습니다(첫 굽기/복구)" />
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Border>
|
|
|
|
<!-- ===== 우: 실행 + 로그 ===== -->
|
|
<Border Grid.Column="1" Style="{StaticResource Card}" Margin="12,0,0,0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 액션 행 -->
|
|
<Grid Grid.Row="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button x:Name="btnFlash" Grid.Column="0" Style="{StaticResource PrimaryButton}"
|
|
Height="46" FontSize="15" Content="플래시 시작" Click="OnFlashClick" />
|
|
<Button x:Name="btnTest" Grid.Column="1" Content="포트 점검" Margin="8,0,0,0" Height="46" Click="OnTestClick" />
|
|
<Button x:Name="btnStop" Grid.Column="2" Content="중지" Margin="8,0,0,0" Height="46" Width="80"
|
|
IsEnabled="False" Click="OnStopClick" />
|
|
</Grid>
|
|
|
|
<!-- 진행바 -->
|
|
<ProgressBar x:Name="barProgress" Grid.Row="1" Height="10" Margin="0,14,0,0" Minimum="0" Maximum="1" />
|
|
<Grid Grid.Row="2" Margin="0,6,0,0">
|
|
<TextBlock x:Name="txtStep" Style="{StaticResource Hint}" HorizontalAlignment="Left" />
|
|
<TextBlock x:Name="txtPercent" Style="{StaticResource Hint}" HorizontalAlignment="Right" Text="0%" />
|
|
</Grid>
|
|
|
|
<!-- 다운로드 모드 안내 strip -->
|
|
<Border Grid.Row="3" Margin="0,12,0,0" Background="{StaticResource SurfaceAlt}" CornerRadius="6" Padding="10,7">
|
|
<TextBlock x:Name="txtDlMode" Style="{StaticResource Hint}" Foreground="{StaticResource Text}" />
|
|
</Border>
|
|
|
|
<!-- 로그(채움) -->
|
|
<TextBox x:Name="txtLog" Grid.Row="4" Margin="0,12,0,0" IsReadOnly="True"
|
|
FontFamily="Consolas" FontSize="12" Background="#FF15161A"
|
|
Foreground="#FFCFD3D8" BorderBrush="{StaticResource Border}"
|
|
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
|
TextWrapping="NoWrap" VerticalContentAlignment="Top" />
|
|
|
|
<!-- 결과 배너 -->
|
|
<Border x:Name="pnlResult" Grid.Row="5" Visibility="Collapsed" Margin="0,12,0,0"
|
|
CornerRadius="8" Padding="14" BorderThickness="1">
|
|
<TextBlock x:Name="txtResult" TextWrapping="Wrap" FontSize="13" />
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|