[LVGL] NXP-Guider 逆向工程

本次在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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值