Skip to content

Part 1: TouchGFX

Kris Petrič edited this page Sep 18, 2024 · 13 revisions

Intro to TouchGFX

TouchGFX is a user-friendly graphical C++ tool for creating powerful embedded touch applications, made by STMicroelectronics.

It is primarily built for creating graphical applications with retained mode GUI and optimized only to redraw parts that were changed. We will create a game in which we will redraw the screen every frame, which is not the primary use case, however, I have chosen to use TouchGFX because it abstracts away a lot of boilerplate work.

Why TouchGFX?

When you create a new TouchGFX project, the necessary screen drivers, the HAL (Hardware Abstraction Layer), and the CubeMX project are all generated automatically. This includes setting up the required pin configurations and device clocks. Additionally, the TouchGFX Engine manages screen updates, user input events, and timing, so we don't need to handle these manually or write any assembly code.

TouchGFX also takes care of writing interrupt handlers and invoking event handlers, which we can override in our GUI to implement the desired behavior. This greatly reduces the amount of low-level code we need to write, which is also very dependent on the board chosen.

Alternatives

Clone this wiki locally