本次在AI辅助下逆向GUI-guider-v1.10.1-GA工程启发点与总结:
1.guider 生成的c文件工程里面已包含了lvgl8的源代码,sdl2的库
2.在工程中新增printf工程日志调试功能
3.生成build和run的脚本方便后续代码工作
4.在不影响原工程文件情况下,新增uart/net等通讯对接渠道
5.windows下采用mingw32的gcc来make file
6.有了build和run脚本后,就能在Guider调整UI布局,在VSCode修改逻辑代码
7.[最小SDL-LVGL仿真器源码] https://github.com/wabil-wsp/lvgl_sdl_simulator



=====仅参考的build.ps1,run.ps1=====
# LVGL Simulator Build Script
# Usage: .\build.ps1 [-Clean] [-j N]
param([switch]$Clean, [int]$j = 0)
$ErrorActionPreference = "Stop"
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$BuildDir = Join-Path $ScriptDir "build"
$MSYS2 = "E:\msys64\usr\bin\bash.exe"
if ($j -le 0) { $j = $env:NUMBER_OF_PROCESSORS }
$makeCmd = "make -j$j"
if ($Clean -and (Test-Path $BuildDir)) {
Write-Host ">>> Cleaning..." -ForegroundColor Yellow
Remove-Item -Recurse -Force $BuildDir
}
Write-Host ">>> Building ($j parallel)..." -ForegroundColor Cyan
& $MSYS2 -lc "export PATH=/mingw32/bin:/usr/bin:`$PATH ; cd /d/NXP/GUI-Guider-Projects/test001/lvgl-simulator ; $makeCmd 2>&1"
$exe = Join-Path $ScriptDir "build\bin\simulator.exe"
if (Test-Path $exe) {
Write-Host ">>> SUCCESS: $exe" -ForegroundColor Green
} else {
Write-Host ">>> FAILED" -ForegroundColor Red
exit 1
}
# ============================================================
# LVGL Simulator 运行脚本
# 用法: .\run.ps1
# ============================================================
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$exe = Join-Path $ScriptDir "build\bin\simulator.exe"
if (-not (Test-Path $exe)) {
Write-Host "[ERROR] simulator.exe not found: $exe" -ForegroundColor Red
Write-Host "Please run .\build.ps1 first to compile." -ForegroundColor Yellow
exit 1
}
Start-Process -FilePath $exe -WorkingDirectory (Join-Path $ScriptDir "build\bin")
Write-Host "simulator.exe launched!" -ForegroundColor Green
1043

被折叠的 条评论
为什么被折叠?



