Skip to content

Repository files navigation

DISCO Cockpit

Firmware CI

An embedded operations dashboard for the STM32F746G-DISCO, built with FreeRTOS, TouchGFX, LTDC/DMA2D, external SDRAM, ADC, RTC, SDMMC and FATFS.

DISCO Cockpit home screen

The project is designed as a useful firmware product rather than a collection of disconnected peripheral demos. It monitors its own RTOS, inspects an analog signal, browses removable storage and provides a responsive touch interface over a thread-safe data model.

Highlights

  • Live CPU load from the Cortex-M7 DWT cycle counter, sampled in 500 ms windows.
  • Per-task CPU share, state and minimum remaining stack, sorted by activity.
  • Heap usage, minimum-ever free heap, uptime, MCU temperature and measured VDD.
  • 1 ksample/s ADC3 oscilloscope with live/demo sources and voltage measurements.
  • Post-boot SD hot-plug, FATFS status, capacity meter and paginated file browser.
  • RTC clock editing, source selection and display brightness controls.
  • TouchGFX desktop simulator with deterministic demo telemetry.
  • Register-capturing fault handler for post-mortem debugging.

User interface

Screen Purpose
Home Live summaries for CPU/heap, scope source, storage and clock
System Monitor CPU, memory and thermal cards plus top active RTOS tasks
Live Scope Grid-based waveform, min/max/Vpp in volts and acquisition details
SD Browser Card health, capacity, file sizes, rescan and pagination
Settings Brightness, ADC source, RTC editing and device health summary

The UI is built from TouchGFX primitives, so it has no runtime dependency on bitmap assets and can be re-themed from UITheme.hpp.

Continuous integration

Every push and pull request runs a clean GNU Arm Embedded build on GitHub Actions. The workflow exposes compilation, ELF linking, image generation and memory reporting as separate steps, then publishes the ELF, HEX, BIN, map and size report as a downloadable artifact.

The same sequence can be run locally from the repository root:

make -C F746_HMI compile
make -C F746_HMI link
make -C F746_HMI artifacts
make -C F746_HMI size

UI gallery

Home System Monitor
Home dashboard System monitor
Live Scope SD File Browser
Live scope SD file browser
Settings
Settings and controls

Hardware

  • Board: STM32F746G-DISCO
  • MCU: STM32F746NGH6, Arm Cortex-M7 at 216 MHz
  • Display: 480 x 272 RGB565 through LTDC and DMA2D
  • Framebuffers: external SDRAM through FMC, starting at 0xC0000000
  • Touch: FT5336 capacitive controller on I2C3
  • Storage: post-boot microSD file browser through SDMMC1 and FATFS
  • Analog input: ADC3; internal temperature and VREFINT through ADC1

Quick start

  1. Open F746_HMI/F746_HMI.ioc or import the F746_HMI directory into STM32CubeIDE.
  2. Select the Debug configuration and build the project.
  3. Connect the board through its ST-LINK USB port.
  4. Flash and run. No external hardware is required for the demo waveform.
  5. Insert a FAT16/FAT32-formatted microSD card to exercise the file browser.

Verified build

The current Debug build completes with no compiler errors or warnings:

text: 279,158 bytes
data:     804 bytes
bss:  898,624 bytes (includes external-SDRAM framebuffers)

The generated firmware is available locally at F746_HMI/Debug/F746_HMI.elf. Build output is intentionally excluded from Git.

Architecture

The C service layer publishes immutable sections of one AppSnapshot. A mutex guards the snapshot while the TouchGFX Model copies it into the C++ MVP layer. Commands travel in the opposite direction through small non-blocking latches. Hardware workers never call GUI code, and GUI code never blocks on hardware I/O.

See ARCHITECTURE.md for design details and RESUME.md for portfolio wording and a demo checklist.

Repository layout

F746_HMI/
  Core/                 application services, board support and CubeMX code
  TouchGFX/gui/         hand-written MVP UI and reusable containers
  TouchGFX/generated/   generated fonts, texts and TouchGFX base classes
  TouchGFX/target/      display, touch and OS integration
  Middlewares/          FreeRTOS, FATFS, USB and TouchGFX target libraries
  Drivers/              STM32 HAL, CMSIS and FT5336 component driver
docs/images/            reproducible simulator screenshots
ARCHITECTURE.md
RESUME.md
SETUP_TOUCHGFX.md

Engineering notes

CPU percentages use 64-bit intermediate arithmetic. At 216 MHz, multiplying a half-second DWT delta by 100 overflows a 32-bit integer. The monitor establishes a baseline before reporting load, removes Idle from the top-task list and handles the DWT counter wrap with unsigned subtraction.

The SD volume is mounted by its own FreeRTOS worker after startup. Sector I/O uses an aligned polling buffer because directory browsing values determinism more than peak throughput and does not reserve DMA streams used by other peripherals.

Both the firmware and Windows TouchGFX simulator were validated after the UI redesign. The gallery uses the deterministic simulator fixture, so the images can be reproduced without a connected board.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages