This section contains articles that help you configure your TouchGFX application
- Color Depth discusses how to configure your TouchGFX application to output pixel data of a particular color depth to a frame buffer and what to consider when choosing color depth. It touches on how parts of the entire application (BSP, TouchGFX Framework, Application assets) must be configured in unison to successfully run a TouchGFX application on your hardware.
- Display Orientation discusses how to configure TouchGFX to render frames to a framebuffer in a rotated format.
- Placing Assets in Flash Memory discusses how to easily place various assets in different parts of memory.
- Single- and Double-Buffering discusses single buffering versus double buffering, and how to configure each with the benefits they offer.
- Performance Measurement discusses how to configure your application for measuring MCU load and measuring key signals exposed by TouchGFX (e.g. render-time, VSYNC).
- Additional Cache (Animations, Canvas, Dynamic bitmaps)
- Measuring Performance discusses how to configure your application if you want to measure performance using an oscilloscope via exposed framework signals, or if you want to calculate a percentage based MCU load.
Generally, there are a two ways of configuring the assets (images and texts) of your application. By default the TouchGFX Designer maintains and updates GNU Makefiles to handle (compile) assets, though a solution file for Visual Studio is also provided.
Before compiling the actual application, the images and texts are converted to c++ code by the included image and text converters. This pre-build processing of assets happens in both simulator and target versions of the Makefiles provided as well as the Microsoft Visual Studio projects.
The configuration file is included in the Makefile, and with comments stripped out, the contents is similar to the following.
touchgfx_path := ../../../touchgfx user_cflags := -DUSE_BPP=16 alpha_dither := yes
dither_algorithm := 2 opaque_image_format := RGB565 non_opaque_image_format := ARGB8888 screen_orientation := text_data_format := A4 remap_identical_texts := yes
Microsoft Visual Studio
Properties can be edited the
Property Manager for your version of MSVS. A Property group called
UserMacros is defined in the
.props file used by the Visual Studio project for the application, mirroring the settings from the make configuration above.
Word of Warning
The TouchGFX Designer will update these settings automatically, so manually changing these settings while also using the TouchGFX Designer, may result in configuration customizations being lost.
Also, make sure that the two configuration files for gcc and msvs are kept in synchronization.
Finally, msvs does not detect a change of settings, DitherAlgorithm for example, and a complete rebuild is required for this to take effect. The gcc Makefile has a dependency on these settings and will rebuild the necessary assets.