Bare-metal Rust MiniOS for the shared STM32F407ZG + 320x240 ILI9341 resistive-touch TFT board.
This project turns the board into a small touch-first desktop shell with multiple apps, arcade-style games, diagnostics, persistence, and a portable firmware release flow.
FinalProject_RustMiniOS is built around a lightweight embedded shell that boots into a launcher and hosts:
Albumwith embedded media and an optional Mac companion modeGame CenterwithStation Hunter,Tap Rush,Pseudo Racer,Graphics Lab, andDungeon CorePixel PaintSettings,Diagnostics,About,Benchmark, and touch calibration tools
The repo is meant to show that a single STM32 board can run a polished, real-time Rust UI/game system instead of just isolated demos.
- desktop-style MiniOS shell with bilingual UI and theme switching
- persistent settings and app save data stored in a reserved flash sector
- optional
Mac companionmedia pipeline overUSART3 - multiple game loops on real hardware, including 2D action and 3D raycasting
- benchmark / performance console for board-side diagnostics
- host-side checks plus a portable firmware bundle for same-board deployment
| Item | Value |
|---|---|
| MCU | STM32F407ZG |
| Display | 320x240 ILI9341 |
| LCD bus | FSMC / 8080-style parallel |
| Touch | Single-point resistive touch |
| Rust target | thumbv7em-none-eabihf |
src/: firmware source, MiniOS shell, app modules, storage, rendering, and board integrationc_support/: reused STM32 clock / TFT support code through FFIassets/: textures, converted media, and reference assetstools/: preprocessing, flashing, bundle, and toolchain helper scriptshost_checks/: host-side tests for storage, registry, and media invariantsmac_companion/: optional desktop serial host for Album media streamingdocs/: public-facing setup notes that external users may needresearch/: internal notes, architecture writeups, validation checklists, demo materials, and preview prototypes that are not required to build the firmware
cargo build --releasecargo run --releasecargo run --release uses flash.sh, which prefers probe-rs when available and falls back to openocd.
Force a flashing backend explicitly:
MINIOS_FLASH_TOOL=probe-rs cargo run --release
MINIOS_FLASH_TOOL=openocd cargo run --releaseTo create a ready-to-share firmware package for anyone with the same board:
./tools/make-release-bundle.shThis produces:
dist/finalproject_rustminios-v0.1.0-stm32f407zg/dist/finalproject_rustminios-v0.1.0-stm32f407zg.zip
The bundle includes .elf, .bin, .hex, flash scripts, and QUICKSTART.md.
Test media lives under:
assets/test_media/imagesassets/test_media/gifs
Run:
./tools/process_test_media.shThe public repo only tracks redistributable sample stills plus the generated firmware/manifests needed for builds. Source GIFs and local preview outputs stay gitignored so personal or non-redistributable media does not get published by accident.
The default firmware build embeds Album stills and motion clips. To build the lighter companion mode instead:
MINIOS_EMBED_ALBUM=0 cargo build --releaseMore details: docs/mac-companion.md
The tracked media is limited to redistributable CC0 samples and deterministic derived firmware assets. Personal media, local build output, signing material, device credentials, and development environment files remain ignored.
See THIRD_PARTY_NOTICES.md, SECURITY.md, and LICENSE.md before redistributing any part of the project.
Run the host-side checks with:
(cd host_checks && cargo test)Useful runtime notes:
Internal design and presentation materials are kept under research/.
The helper scripts first try system tools on PATH, then fall back to PlatformIO-managed packages under ~/.platformio/packages.
Override tool locations manually if needed:
export PLATFORMIO_PACKAGES_DIR=/your/path/to/.platformio/packages
export MINIOS_ARM_GCC=/path/to/arm-none-eabi-gcc
export MINIOS_ARM_OBJCOPY=/path/to/arm-none-eabi-objcopy
export MINIOS_ARM_SIZE=/path/to/arm-none-eabi-size
export MINIOS_ARM_NM=/path/to/arm-none-eabi-nm
export MINIOS_OPENOCD=/path/to/openocd
export OPENOCD_SCRIPTS=/path/to/openocd/scriptsOfficial probe-rs docs:
touchis resistive single-touch, not true multi-touch- Chinese glyph data is generated into
src/font_zh.rs - build-time media registration is generated from
assets/test_media/converted - this repository is intentionally separate from the legacy C-based
FinalProject_MiniOS