2026-08-26 07:26:58 +08:00
|
|
|
#Requires -Version 5.1
|
|
|
|
|
<#
|
|
|
|
|
.SYNOPSIS
|
2026-08-26 07:28:03 +08:00
|
|
|
Check YNGJ-GT1-M AT32F403ARCT7 development environment.
|
2026-08-26 07:26:58 +08:00
|
|
|
#>
|
|
|
|
|
|
|
|
|
|
$ErrorActionPreference = "SilentlyContinue"
|
2026-08-26 07:27:15 +08:00
|
|
|
$projectRoot = Split-Path $PSScriptRoot -Parent
|
2026-08-26 07:26:58 +08:00
|
|
|
|
2026-08-26 07:28:03 +08:00
|
|
|
Write-Host "=== YNGJ-GT1-M Dev Environment Check ===" -ForegroundColor Cyan
|
|
|
|
|
Write-Host "Project: $projectRoot`n"
|
2026-08-26 07:26:58 +08:00
|
|
|
|
|
|
|
|
function Test-Command($name, $cmd) {
|
|
|
|
|
$found = Get-Command $cmd -ErrorAction SilentlyContinue
|
|
|
|
|
if ($found) {
|
|
|
|
|
Write-Host "[OK] $name -> $($found.Source)" -ForegroundColor Green
|
|
|
|
|
return $true
|
|
|
|
|
} else {
|
2026-08-26 07:28:03 +08:00
|
|
|
Write-Host "[MISS] $name" -ForegroundColor Red
|
2026-08-26 07:26:58 +08:00
|
|
|
return $false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Test-Command "Git" "git" | Out-Null
|
|
|
|
|
|
|
|
|
|
$jlink = Test-Command "J-Link" "JLink"
|
|
|
|
|
if (-not $jlink) {
|
2026-08-26 07:28:03 +08:00
|
|
|
Write-Host " Install: winget install NordicSemiconductor.JLink" -ForegroundColor Yellow
|
|
|
|
|
Write-Host " Or download: https://www.segger.com/downloads/jlink/" -ForegroundColor Yellow
|
2026-08-26 07:26:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$iarPaths = @(
|
|
|
|
|
"C:\Program Files\IAR Systems",
|
|
|
|
|
"C:\Program Files (x86)\IAR Systems",
|
|
|
|
|
"F:\IAR_WorkBench"
|
|
|
|
|
)
|
|
|
|
|
$iarFound = $false
|
|
|
|
|
foreach ($base in $iarPaths) {
|
|
|
|
|
if (Test-Path $base) {
|
|
|
|
|
$iarBuild = Get-ChildItem -Path $base -Recurse -Filter "IarBuild.exe" -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
|
|
|
$iarIde = Get-ChildItem -Path $base -Recurse -Filter "IarIdePm.exe" -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
|
|
|
if ($iarBuild) {
|
|
|
|
|
Write-Host "[OK] IAR Build -> $($iarBuild.FullName)" -ForegroundColor Green
|
|
|
|
|
$iarFound = $true
|
|
|
|
|
}
|
|
|
|
|
if ($iarIde) {
|
|
|
|
|
Write-Host "[OK] IAR IDE -> $($iarIde.FullName)" -ForegroundColor Green
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (-not $iarFound) {
|
2026-08-26 07:28:03 +08:00
|
|
|
Write-Host "[MISS] IAR Embedded Workbench for ARM" -ForegroundColor Red
|
|
|
|
|
Write-Host " Download: https://www.iar.com/embedded-development-tools/free-trials" -ForegroundColor Yellow
|
2026-08-26 07:26:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$at32Pack = $false
|
|
|
|
|
foreach ($base in $iarPaths) {
|
|
|
|
|
$ddf = Get-ChildItem -Path $base -Recurse -Filter "AT32F403AxC*.ddf" -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
|
|
|
if ($ddf) {
|
|
|
|
|
Write-Host "[OK] AT32 Device Pack -> $($ddf.DirectoryName)" -ForegroundColor Green
|
|
|
|
|
$at32Pack = $true
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (-not $at32Pack -and $iarFound) {
|
2026-08-26 07:28:03 +08:00
|
|
|
Write-Host "[MISS] AT32 IAR Device Pack (ArteryTek)" -ForegroundColor Red
|
|
|
|
|
Write-Host " Download: https://www.arterytek.com/cn/product/AT32F403A.jsp" -ForegroundColor Yellow
|
2026-08-26 07:26:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Write-Host ""
|
|
|
|
|
if (Test-Path "$projectRoot\project\IAR_V7.4\YNGJ-GT1-M.eww") {
|
2026-08-26 07:28:03 +08:00
|
|
|
Write-Host "[OK] Main project YNGJ-GT1-M.eww" -ForegroundColor Green
|
2026-08-26 07:26:58 +08:00
|
|
|
} else {
|
2026-08-26 07:28:03 +08:00
|
|
|
Write-Host "[MISS] Main project file" -ForegroundColor Red
|
2026-08-26 07:26:58 +08:00
|
|
|
}
|
|
|
|
|
|
2026-08-26 07:28:03 +08:00
|
|
|
Write-Host ""
|
|
|
|
|
Write-Host "See DEVELOPMENT_SETUP.md for full setup guide." -ForegroundColor Cyan
|