Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English · العربية · Español · Français · 日本語 · 한국어 · Tiếng Việt · 中文 (简体) · 中文(繁體) · Deutsch · Русский

LazyingArt banner

stm32dev

STM32H7 touch-screen board notes, ST-Link/OpenOCD scripts, and persistent framebuffer patch source.

Website Target Debug Sponsor

stm32dev is a practical workspace for a connected STM32H74/H75 touch-screen board. It records the wiring, host setup, ST-Link control commands, flash backup/restore workflow, minimal firmware scaffold, and the assembly source for a persistent RGB565 framebuffer hook.

This public repository intentionally excludes generated binaries, flash dumps, local build output, and downloaded tool archives. Those files are hardware-specific and can be recreated or kept locally when needed.

Display Preview

STM32H7 touch-screen board showing the persistent Trio framebuffer image

Contents

Path Purpose
scripts/ Probe, OpenOCD, flash backup/restore, explicit binary flash, and serial-listen helpers.
docs/wiring.md SWD, UART, power, and Type-C notes for the board.
config/49-stm32-stlink-local.rules Local udev rules for ST-Link permissions and password-prompt avoidance.
firmware/minimal/ Minimal Cortex-M7 STM32H7 firmware scaffold for toolchain validation.
firmware/persistent_trio/ Thumb assembly hook and linker scripts used for the persistent display patch.
references/stm32-touch-board-session.md Session log with target identification, commands, addresses, cache notes, and restore path.

Quick Start

Probe the board:

./scripts/probe.sh

Start OpenOCD:

./scripts/openocd.sh

Back up flash locally:

./scripts/backup_flash.sh

Restore a local firmware backup:

./scripts/restore_flash.sh backups/stm32h7_current_flash_2026-06-19.bin

Build the minimal firmware scaffold:

make -C firmware/minimal

Persistent Display Patch

The board was identified as an STM32H74/H75 target with a 1024x600 RGB565 LTDC framebuffer at 0xC0000000. The persistent image experiment stores RGB565 data in unused flash regions and hooks a firmware delay routine so the display framebuffer is restored after boot.

The final working hook:

  • returns to 0x08001325, preserving Thumb mode;
  • checks that LTDC layer 1 points at 0xC0000000;
  • invalidates sample D-cache lines before checking SDRAM-visible pixels;
  • copies two flash image segments into SDRAM when the framebuffer has been cleared;
  • cleans the full framebuffer D-cache range so LTDC can read the CPU-written image.

The detailed addresses and verification hashes are in references/stm32-touch-board-session.md.

Public Release Notes

The public repo keeps source and documentation only. These local paths are ignored:

  • backups/
  • build/
  • **/build/
  • *.bin, *.elf, *.map, *.o, *.d, *.log
  • downloaded or extracted xPack tool directories under tools/

Do not flash test firmware unless overwriting the currently installed touch-screen firmware is intentional.

Validation

Commands used during development:

st-info --probe
openocd -f interface/stlink.cfg -f target/stm32h7x.cfg -c 'adapter speed 1000' -c 'init' -c 'targets' -c 'shutdown'
make -C firmware/minimal

NAND Diagnostic UI Language

See the complete Chinese guide for the NAND pin map, read-only diagnostic GUI, board memory hierarchy, speed comparison, and OS/micro-ROS usage: NAND diagnostic and board memory architecture.

The board's 8 MiB W25Q64 QSPI NOR is also hardware-verified. See the read-only QSPI detection record.

The read-only NAND diagnostic boots in Chinese (zh-CN) and keeps a complete English fallback. Text is selected through stable translation IDs, while the compact 24 x 24 Chinese glyph set is embedded in firmware; no SD card or external font file is required.

With ST-Link connected, switch the live display without rebuilding or resetting:

.\firmware\stm32_sensor_head_lcd\tools\set-nand-diag-language.ps1 zh
.\firmware\stm32_sensor_head_lcd\tools\set-nand-diag-language.ps1 en

If the board UART is physically routed to the host, LANG ZH and LANG EN at 115200 baud are also accepted. Resetting the board restores the default Chinese UI.

To regenerate the embedded font after adding Chinese translations:

.\firmware\stm32_sensor_head_lcd\tools\generate_nand_diag_cn_font.ps1

Citation

If you use stm32dev in research or documentation, cite this repository. GitHub reads CITATION.cff and shows a Cite this repository panel on the repo page.

@software{chen_stm32dev_2026,
  author = {Chen, Lachlan},
  title = {stm32dev: STM32H7 Touch-Screen Board Development Workspace},
  year = {2026},
  url = {https://github.com/lachlanchen/stm32dev}
}

Status

This is a hardware-session workspace, not a vendor board support package. It is useful as a reproducible record for ST-Link/OpenOCD control, framebuffer experiments, and STM32H7 cache-aware display patching.

Support

Donate PayPal Stripe
Donate PayPal Stripe

About

STM32H7 touch-screen board workspace with ST-Link/OpenOCD scripts, wiring notes, framebuffer rendering, and cache-aware persistent display patch source

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages