← 返回
开发者工具 中文

Framebuffer Dump

Dump the current STM32 LCD framebuffer via J-Link and convert it to PNG for visual comparison with Figma. Use when user asks to export, snapshot, dump, or ca...
通过 J-Link 导出当前 STM32 LCD 帧缓冲并转换为 PNG,以便与 Figma 进行视觉对比。当用户请求导出、快照、转储或抓取屏幕时使用。
ylongw
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 530
下载
💾 47
安装
1
版本
#embedded#jlink#latest#stm32

概述

Framebuffer Dump (J-Link → PNG)

Export the actual on-device rendered frame directly from SDRAM framebuffer and convert to PNG.

Default parameters (PRO2)

  • Device: STM32H747XI_M7
  • FB base: 0xD0000000
  • Resolution: 604x1024
  • Pixel format: RGB888 (3 bytes/pixel)
  • Dump size: 60410243 = 1,855,488 (0x1C5000)

One-shot workflow

1) Create J-Link command file

Use scripts/dump_fb.jlink.template and replace placeholders:

  • {{DEVICE}}
  • {{SPEED_KHZ}} (e.g. 12000)
  • {{OUT_BIN}} (absolute path)
  • {{FB_ADDR}} (e.g. 0xD0000000)
  • {{FB_SIZE}} (e.g. 0x1C5000)

2) Dump raw framebuffer

JLinkExe -NoGui 1 -CommandFile /tmp/jlink_dump_fb.jlink > /tmp/jlink_dump_fb.log 2>&1

3) Convert raw to PNG

python3 scripts/dump_fb.py \
  --in /path/to/fb_dump.bin \
  --out /path/to/fb_dump_604x1024.png \
  --width 604 --height 1024 --stride 3

Troubleshooting

  • If output bin is 0 bytes: check J-Link connection / path permissions.
  • If colors look wrong: verify pixel format is RGB888 (not BGR / RGB565).
  • If image shifted/corrupt: verify width/height match current display mode.
  • If command hangs too long: make sure dump size is correct (0x1C5000 for 604x1024 RGB888).

Notes

  • This method captures real framebuffer pixels (no camera distortion).
  • Best for Figma-vs-device pixel comparison and regression snapshots.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 23:50 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 323,933
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,758
productivity

Embedded Code Review Expert

ylongw
针对嵌入式/固件项目的专家代码审查,采用双模型交叉审查(Claude + Codex via ACP),检测内存安全、中断危险、RTOS陷阱...
★ 1 📥 1,112