Skip to main content

Known Issues

This article lists the issues that are known to be present in all TouchGFX versions, along with potential workarounds. Also, if there are any specific upgrade steps you need to perform to upgrade TouchGFX to a certain version, these will be mentioned. Note that if your current version is several releases old, you need to perform the upgrade steps for all the releases up to the new one.

TouchGFX 4.20.0

Painter interface changed

The method AbstractPainter::render() has been replaced by AbstractPainter::paint for performance reasons.
If you have implemented your own painter classes you need to adapt to this new interface. Read more in the article on Canvas Widgets.

Painter implementation moved to generated files

In TouchGFX 4.20 the software routines that paint circles, lines, and other shapes have been moved from the framework code to the code generated by CubeMX. This means that you have to regenerate code in CubeMX after upgrading a project from TouchGFX 4.19.1 (or earlier) to TouchGFX 4.20. The reason for this change is to be able to use the graphics accelerator, DMA2D, when drawing circles and lines.

Instructions

Find and open the .ioc file in the project root folder:

Project IOC file

Select TouchGFX 4.20 in the Software Packs Component Selector (alt-O):

Selecting TouchGFX 4.20

Close this dialog and press "Generate Code" in upper right corner. Now go to the TouchGFX Designer and regenerate code (F4).

Linker errors

If you don't regenerate the code you will get linker errors if your project uses e.g. the Circle widget. The errors looks like this (here for 16bpp):

Linking TouchGFX/build/bin/target.elf
Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc\libtouchgfx.a(PainterRGB565.o): In function `touchgfx::PainterRGB565::paint(unsigned char*, short, short, short, short, unsigned char) const':
(.text._ZNK8touchgfx13PainterRGB5655paintEPhssssh+0x1a): undefined reference to `touchgfx::paint::rgb565::lineFromColor(unsigned short*, unsigned int, unsigned long, unsigned char, unsigned long)'
Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc\libtouchgfx.a(PainterRGB565.o): In function `touchgfx::PainterRGB565::tearDown() const':
(.text._ZNK8touchgfx13PainterRGB5658tearDownEv+0x0): undefined reference to `touchgfx::paint::rgb565::tearDown()'
collect2.exe: error: ld returned 1 exit status

For 24bpp:

Linking TouchGFX/build/bin/target.elf
Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc\libtouchgfx.a(PainterRGB888.o): In function `touchgfx::PainterRGB888::paint(unsigned char*, short, short, short, short, unsigned char) const':
(.text._ZNK8touchgfx13PainterRGB8885paintEPhssssh+0x18): undefined reference to `touchgfx::paint::rgb888::lineFromColor(unsigned char*, unsigned int, unsigned long, unsigned char)'
Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc\libtouchgfx.a(PainterRGB888.o): In function `touchgfx::PainterRGB888::tearDown() const':
(.text._ZNK8touchgfx13PainterRGB8888tearDownEv+0x0): undefined reference to `touchgfx::paint::rgb888::tearDown()'
collect2.exe: error: ld returned 1 exit status

The missing functions are generated into TouchGFX/target/generated/STM32DMA.cpp, when you regenerate code in CubeMX.

If your controller does not have DMA2D (or it is not enabled), CubeMX will include the software routines that was used in TouchGFX 4.19.1 and previous versions.

If you for some reason cannot regenerate code in CubeMX, you can manually add the missing functions by inserting the following includes in a .cpp file in your application:

#include <touchgfx/hal/Paint.hpp>
#include <touchgfx/hal/PaintRGB565Impl.hpp> // 16bpp painting routines
#include <touchgfx/hal/PaintRGB888Impl.hpp> // 24bpp painting routines

Debugging STM32G0 with Keil

TouchGFX projects for STM32G0 boards with the X-NUCLEO-GFX01M1/2 display modules uses the address range from 0x90000000 for data in the external SPI flash. This breaks the Keil debugger as it tries to access these addresses when starting a debug session. Keil gives the error "Cannot access target. Shutting down debug session."

Starting a debug session in Keil

The solution is to create a init script for the debugger, with the text:

load STM32G071_NUCLEO\STM32G071_NUCLEO.axf NOCODE
g,main

The NOCODE option tells Keil to not load the code. This removes the access problem.

Debug initialization script for Keil

And select the file in the debug configuration dialogue:

Debug configuration for Keil

Compiling STM32U5 and STM32L5 projects with Keil

Keil projects created with CubeMx are missing the DSP extension tag in the project file. This gives linker error when linking with the TouchGFX library, which has the DSP extension tag set. The linker errors will be like:

STM32U575ZI_NUCLEO\STM32U575ZI_NUCLEO.axf: Error: L6366E: abstractpartition.o attributes are not compatible with the provided attributes.
Object abstractpartition.o contains Build Attributes that are incompatible with the provided attributes.
Tag_DSP_extension = This code was permitted to use Thumb DSP functions as an optional architecture extension above the base architecture as indicated by Tag_CPU_arch (=1)

The solution is to add the DSP tag in your .uvprojx project file (in the /Project/Targets/Target/TargetOption/TargetCommonOption/Cpu XML-element):

<Targets>
<Target>
<TargetName>STM32U575ZI_NUCLEO</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6120000::V6.12::.\ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>STM32U575ZITx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32U5xx_DFP.2.0.0</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000-0x200BFFFF) IROM(0x08000000-0x81FFFFF) CLOCK(8000000) FPU3(SFPU) CPUTYPE("Cortex-M33") ELITTLE TZ DSP</Cpu>
<FlashUtilSpec></FlashUtilSpec>

LOGONSERVER environment variable

We have observed on a few computers that the TouchGFX is very slow (e.g. "Run simulator" does nothing for 30 seconds). It may help to set the environment variable LOGONSERVER to an empty value.

In bash, the command is:

export LOGONSERVER=

TouchGFX 4.19.0

New way of working with typographies

From TouchGFX 4.18.1 to TouchGFX 4.19.0 the use of typographies has changed. A typography now has a default setting and zero or more language specific settings.

Read more about this in the Designer Guide

Text specific direction and typography is no longer an option, these options are moved to the new default and language specific settings. This new functionality affects the generated code in projects that used this feature. The Text Converter will generate a font id for the default setting and one for each language specific setting. A font id generated from a language specific setting will be named automatically, see example below.

Setting direction and typography for a specific text in TouchGFX 4.18

Example: Auto generated font ids

  • Default typography id: HEADLINE
  • Language specific setting: JPN

This will generate two font ids in generated/fonts/include/fonts/ApplicationFontProvider.hpp:

struct TypographyFontIndex
{
static const touchgfx::FontId HEADLINE = 0;
static const touchgfx::FontId HEADLINE_AUTO_GENERATED_FOR_JPN = 1;
};

Auto generated typographies when upgrading to 4.19.0

As mentioned, the text specific direction and typography is no longer an option. As a result of this change in functionality, new typographies with default and language specific settings might be generated, when upgrading older versions. You can identify these auto generated typographies by their id. Either the text direction is used as suffix or a letter in the range A-Z:

  • Headline_LTR
  • PosterText_RTL
  • Title_A
  • ButtonText_B

Referencing font ids in user code

If you are referencing font ids in the user code, these might need to be updated. In cases where font ids are not referenced by symbol but by value, there is a risk of errors, as the font ids can change during an upgrade. It is recommended to always reference font ids by symbol, i.e. use TypographyFontIndex::HEADLINE instead of 0.

Using LibJPEG with ARMCLANG

ARMCLANG projects where the LibJPEG middlewares is selected in CubeMX cannot run. ARMCLANG enables semi-hosting because LibJPEG refers to the libc file functions (e.g. fopen).
Semi-hosting makes the application wait for a connection to a semi-hosting-aware debugger during startup.
One way to resolve this issue is to remove references to fopen in LibJPEG by undefining JFILE in two files: LibJPEG/source/jdatasrc.c and LibJPEG/source/jdatadst.c:

LibJPEG/source/jdatasrc.c
#include "jerror.h"

#undef JFILE

/* Expanded data source object for stdio input */
#ifdef JFILE
LibJPEG/source/jdatadst.c
#include "jerror.h"

#undef JFILE

#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */

MJPEG Video on H750B Discovery

The H750B Discovery board uses hardware decoding of YCbCr video data. A bug in the code supplied with TouchGFX for this board causes visible artifacts for some videos.
A solution is to change to software decoding. In some cases it is also possible to remove the problem by changing the width of the video a few pixels.

ThreadX assembler files

The ThreadX assembler files for Keil IDE is using the new ARMCLANG V6 assembler syntax. The startup.s files supplied in some firmware packs is using the syntax of the older ARMCC assembler. This means that you have to generally set your project to use the ARMCLANG V6 assembler, and then override this for the startup_stm32xxx.s:

Deselecting ARMCLANG V6 assembler for startup.s

TouchGFX 4.18.0

Issues with CubeMX 6.1.0 and CubeProgrammer 2.6

As of version CubeMX 6.1.0 EWARM projects generated by CubeMX do not work with X-CUBE-TOUCHGFX because of a wrong setting for "C/C++ Compiler" / "Language" option which was changed from "Auto" to "C++" causing compilation errors. This issue will be fixed in CubeMX 6.1.1. In the mean time, changing the option back to "Auto", manually, will solve compilation issues but will be reverted upon code generation from CubeMX.

A bug in CubeProgrammer 2.6 related to how external loaders (.stldr) are referenced breaks Makefiles for all existing Application Templates (AT) and also prevents the "Run Target" feature in TouchGFX Designer from functioning correctly. This issue also extends to user projects based on current versions of the ATs. Application templates will receive an update to compensate for this bug and will work for both CubeProgrammer 2.5 and 2.6. If you've got a project based on an AT that does not work with CubeProgrammer 2.6, you can make the following modifications to add support. Users must execute STM32CubeProgrammer_CLI.exe from within the bin folder when making a reference to an external loader. Generally, speaking:

  • cd into the bin folder of the STM32CubeProgrammer installation folder.
  • Execute the command to program the connected target with a relative reference to the .stldr file.
@cd "$(st_stm32cube_programmer_bin_path)" && ./$(stm_stm32cube_programmer_exe) -c port=SWD -d $(application_path)/$(binary_output_path)/target.hex -el $(stm32cubeLoader_relative_path) -hardRst
Note
The CubeProgrammer bug is solved in version 2.10.

New .touchgfx format

From TouchGFX 4.17.0 to TouchGFX 4.18.0 the content of the .touchfgx file has been changed significantly in two major areas. This may result in a vastly updated .touchfgx file, simply by opening and saving a .touchgfx project file using the TouchGFX Designer. The main changes are in the following areas:

Default values are not written to .touchgfx

Widget parameters that have a default value e.g. as a box offset of X=0, Y=0 or the color black (red=0, green=0, blue=0) were previously written to the .touchgfx file, but in TouchGFX version 4.18.0 these values are not written. This may result in slightly smaller .touchgfx files.

Removed TextEntries block

SingleUseId's have been renamed to contain random numbers and letters instead of sequential numbers to ease merging of a project with several active developers, as new single use text id's do not get the same id. Also, the "TextEntries" section in the .touchgfx has been removed, which may result in a vastly reduced .touchgfx file size.

LCD16bpp::fillRect and LCD16bpp::drawGlyph

The fillRect and drawGlyph functions in LCD16bpp now pass the full 24bit color to the DMA, instead of the reduced 16bit (RGB565) color. This may result in wrong colors on the hardware (not the simulator) and can be fixed by regenerating the DMA classes from CubeMX.

Makefile and xlsx

TouchGFX 4.18.0 uses a new .xml format for storing texts and translations instead of the old .xlsx format previously used. This means that all references of "texts.xlsx" in Makefiles and visual studio projects should be changed to "texts.xml". The TextConvert tool will recognise this, even if the old texts.xlsx file exist and the texts.xml does not, and convert texts.xlsx to texts.xml for all future uses.

To see a new, working Makefile, simply create a new (blank) project using TouchGFX Designer and consult the generated Makefile located in folder generated/simulator/gcc/Makefile.

Font size limit in texts.xsd

The texts.xsd which is used by the designer to validate the texts.xml has a limit on the font size of 255. If you have font sizes greater than 255, you will see an error message in the designer like this:

Error message - Font size limit

The workaround is to close the project, change the Typographies Size attribute from xs:unsignedByte to xs:unsignedInt in the texts.xsd and reopen the project.

SDL2 linker error on Linux

The SDL2 libraries used by the simulator are now only included for Windows users. Linux users must install the SDL2 libraries themselves. This is a task that has to be carried out only once, and for ubuntu the command is

sudo apt install libsdl2-dev libsdl2-image-dev

to install libsdl2 and libsdl2-image including header files for development

TouchGFX 4.17.0

Painters no longer support setAlpha()

For performance reasons, Painters used by the Canvas Widget Renderer (CWR) no longer support alpha. The effect can still be achieved by setting the alpha on the Canvas Widget that has the Painter. In general code can be changed from looking something like this:

painter.setColor(Color::getColorFromRGB(0xFF, 0x00, 0x00));
painter.setAlpha(128);
circle.setPainter(painter);

to something like this:

painter.setColor(Color::getColorFromRGB(0xFF, 0x00, 0x00));
circle.setPainter(painter);
circle.setAlpha(128);

If alpha was previously applied to both the Painter and the Canvas Widget, these two alpha values can be multiplied and then divided by 255, as follows:

painter.setColor(Color::getColorFromRGB(0xFF, 0x00, 0x00));
painter.setAlpha(painterAlpha);
circle.setPainter(painter);
circle.setAlpha(circleAlpha);

becomes

painter.setColor(Color::getColorFromRGB(0xFF, 0x00, 0x00));
circle.setPainter(painter);
circle.setAlpha((painterAlpha * circleAlpha) / 255);

or use LCD::div255() instead of dividing with 255.

Using the HAL class

Prior to version 4.17.0, the header file touchgfx/hal/HAL.hpp would be included by several files in the TouchGFX framework that did not use HAL at all. These unnecessary references have been cleaned up, and this may result in user code that will not compile because HAL is not known to the compiler. To fix this, simply include the HAL header file as follows:

#include <touchgfx/hal/HAL.hpp>

Alternatively, the Screen class has two new functions getScreenWidth() and getScreenHeight() to give the screen size. This the recommended way to get the size of the screen and can be called directly from any subclass of Screen, such as e.g. Screen1View.cpp.

FMC Display Interface in TouchGFX Generator

When using the new FMC Display Interface in TouchGFX Generator the memory offset for FMC banks will not be correct (zero) when generating with CubeMX 6.2.1. This will be corrected in CubeMX 6.3.0 and upon release the minimum required version for X-CUBE-TouchGFX will be bumped to 6.3.0 rather than the current 6.2.1. Until then, users can enter the correct FMC BANK Memory addresses inside TouchGFXGeneratedHAL.cpp (will be overwritten upon re-generation). E.g.

#define FMC_BANK1_REG ((uint16_t *) 0x60000000)
#define FMC_BANK1_MEM ((uint16_t *) 0x60000002)

Users may also redefine them in TouchGFXHAL.cpp entirely.

L8 images in 16- 24- or 32bpp configurations

A call to OSWrappers::taskYield() was mistakenly introduced to STM32DMA classes when loading CLUT for L8 images. To fix this, users can do the following:

  1. Navigate to your Users/<user name>/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-TOUCHGFX/4.17.0/CubeMX/templates/Target folder.
  2. Open the appropriate dma_Xbpp_implementation_tmp.ftl file based on your bit depth
  3. Delete or comment the call to OSWrappers::taskYield() call in the while ((READ_REG(DMA2D->FGPFCCR) & DMA2D_FGPFCCR_START) != 0U) loop, and regenerate code from STM32CubeMX to generate code using this modified template.
while ((READ_REG(DMA2D->FGPFCCR) & DMA2D_FGPFCCR_START) != 0U)
{
// OSWrappers::taskYield();
}

TouchGFX 4.15.0

MCU support

While Cortex-M33 is fully supported by TouchGFX, "Software Packs" (TouchGFX Generator, among others) cannot be enabled in the current verison of CubeMX (v6.0.1) for multi-context MCUs until support is added in CubeMX. Disabling "Trust Zone" for Cortex-M33 based MCUs, thus limiting the MCU to a single context, will allow you to enable TouchGFX Generator. TrustZone should be enabled manually in User Code sections.

TouchGFX 4.14.0

ARMCLANG Support

While TouchGFX now provides an ARMCLANG (ARM compiler v6.x) library for Cortex-M0, Cortex-M4f, Cortex-M7 and Cortex-M33, CubeMX is not able to generate projects that enable the ARMCLANG compiler (ARM Compiler v6.x). This requires users who wish to use the compiler in their projects to select the compiler manually from the project options in Keil uVision.

If configuring the FreeRTOS middleware from within CubeMX, any generated project using ARMCC (ARM compiler v5.x) will have FreeRTOS portable files that are not compatible with ARMCLANG; And these have to be replaced manually. Whenever "Generate code" is run from within CubeMX any manual changes will be overwritten and it would be wise to keep the project under version control (git, etc.) to undo these particular changes.

In summary. Since CubeMX can only generate ARM Compiler v5.x compiler projects, users have to modify the following every time code is generated from CubeMX unless they keep their project under version control.

  1. Select ARM Compiler v6.x in project options.
  2. Link with the ARMCLANG library instead of the ARMCC library (configured by CubeMX).
  3. If configuring FreeRTOS from within CubeMX, then the FreeRTOS portable files should be taken from the portable/GCC folder rather than portable/RVDS (default for ARM Compiler v5.x) in order to be compatible with ARM Compiler v6.x.

Workflow

The following workflow describes how to use v6.x ARM Compiler from Keil uVision with CubeMX generated projects and a TouchGFX ARMCLANG library.

  1. Select ARMCLANG (v. 6.x) in Keil uVision.

ARMCLANG Support

  1. If you're configuring FreeRTOS from CubeMX, CubeMX will generate the wrong portable files and configure your project to use those. You have to manually replace these with the ones (from https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/6199b72fbf57a7c5b3d7b195a3bd1446779314cd/portable/GCC (port.c and portmacro.h) or download a FreeRTOS release and find the files in there.

    Replace port.c:

    port.c

    Change your include path settings to include portmacro.h from the portable/GCC folder (in this case for Cortex-M7):

    Portable include path

  2. TouchGFX designer Post-Generate step during "Generate Code" will automatically insert the correct library based on the compiler version you've chosen.

TouchGFX 4.13.0

Bugs

Font Converter

The FontConverter tool would generate glyph pixel data for unicodes that were a part of a rule in the font, regardless of that glyph being used in an actual text in the application. This led to several megabytes, potentially, of additional glyph pixel data. New FontConverter tools (windows and linux) that no longer generate pixel data for glyphs that aren't in use by the application can be found here:

Extracting this file at the root of your 4.13.0 installation will update the fontconverter binaries inside

touchgfx\framework\tools

Additional Compiler Support

A library built with ARMCLANG compiler (v6.12) can be found here:

Extracting this file at the root of your 4.13.0 installation will place the library touchgfx_core_clang.lib inside.

touchgfx\lib\core\cortex_m7\Keil

Backwards Compatibility

Deprecated Features

The following deprecated features have been removed. If you have referenced them in your code, you may need to rewrite parts of your application:

  • Definition of deprecated TRANSPARENT_COL
  • Drawable::getType()
  • HAL::blitSetTransparencyKey()
  • HAL::registerTextCache()
  • HAL::cacheTextString()

TextureMapper is Disabled by Default

The TextureMapper is disabled by default to reduce the code space used by TouchGFX. TouchGFX designer will insert code to enable texture mapper in all new project.

If you are migrating an old project to TouchGFX 4.13 and you are updating to TouchGFX 4.13 this is handled by TouchGFX Designer.

If you are updating manually then you need to insert code to enable the TextureMapper. Otherwise any TextureMapper will not draw on the screen.

Read more here: Configuring TouchGFX Features.

HAL SDL1 incompatible

Two functions were moved from the TouchGFX library code to the HALSDL2.cpp. This makes no difference for applications that uses the HALSDL2.cpp as HAL for the Windows simulator.

If you have a old application (before TouchGFX 4.8.0) your simulator is maybe using HALSDL (not 2). This simulator HAL is not included in TouchGFX anymore. The HALSDL is missing the two functions that were previously included in the TouchGFX library. You need to add them manually to HALSDL.cpp:

HALSDL.cpp
void simulator_enable_stdio();
void simulator_enable_stdio()
{
HWND consoleHwnd = GetConsoleWindow(); // Get handle of console window
if (!consoleHwnd) // No console window yet?
{
HWND activeHwnd = GetActiveWindow(); // Remember which window is active

AllocConsole(); // Allocate a new console
consoleHwnd = GetConsoleWindow(); // Get handle of console window

FILE* dummy;
freopen_s(&dummy, "CONIN$", "r", stdin); // Redirect stdin/stdout/stderr to the new console
freopen_s(&dummy, "CONOUT$", "w", stdout);
freopen_s(&dummy, "CONOUT$", "w", stderr);

SwitchToThisWindow(activeHwnd, true); // Switch back to the originally active window
}
if (consoleHwnd)
{
ShowWindow(consoleHwnd, SW_SHOW); // Show/hide it!
}
}
void simulator_printf(const char* format, va_list pArg);
void simulator_printf(const char* format, va_list pArg)
{
// Create a console window, if window is visible.
simulator_enable_stdio();
if (GetConsoleWindow()) // Only print if we have a console window
{
vprintf(format, pArg);
}
}

TouchGFX 4.12.3

Backwards compatibility

Screen transitions

Earlier versions are redrawing the entire screen after a screen transition is completed. This additional redraw caused performance issues on some slow platforms. If you require this redraw for some reason, you need to invalidate the relevant part of the screen, e.g. by calling container.invalidate() in the Screen::afterTransition() virtual of the Screen transitioned to.

Binary Fonts

The format of the binary fonts has changed because kerning data is now also included in the binary fonts. Binary font files needs to be regenerated, old files will not work correctly. Depending on how your Makefiles are setup, this is normally done by regenerating all assets (e.g. make -f simulator/gcc/Makefile clean assets).

TouchGFX 4.11.0

Backwards compatibility

In touchgfx/framework/include/touchgfx/lcd/LCD.hpp we have removed an include of the file touchgfx/hal/HAL.hpp that was inserted by mistake in an earlier version. This may give you a compile error in a file where you have included LCD.hpp and also make use of the HAL.hpp content. The solution is to also include touchgfx/framework/include/touchgfx/hal/HAL.hpp in your file.

TouchGFX 4.10.0

Upgrading from 4.9.x

From version 4.10.0 TouchGFX runs exclusively on STM32 MCUs.

You need to do the following if updating an old project.

Add the highlighted code below at application startup to inform TouchGFX that you are running on STM32 hardware. A suitable location is the end of the hw_init() function in BoardConfiguration.cpp

BoardConfiguration.cpp
void hw_init() {
...
//Enable CRC engine for STM32 Lock check
__HAL_RCC_CRC_CLK_ENABLE();
}

Backwards compatibility

Unused file \touchgfx\framework\include\touchgfx\canvas_widget_renderer\RGBA8.hpp removed.

Project Updater Issue

IAR and Keil project updaters invoked from TouchGFX Designer do not respect custom file level optimization set in the respective IDE.

TextArea and ChromART (DMA2D)

Rendering of TextAreas with ChromART (when TextArea is the top most element / last to be drawn) cause a premature unlocking of the framebuffer and subsequently a premature completion/transfer of the current frame to the display. Once endFrame() is called by TouchGFX all drawing operations, including DMA operations, should already be completed. Due to a breach of contract by TextArea in how to appropriately protect the framebuffer, DMA operations are allowed to continue even after returning from endFrame().

The contract for a widget is to either:

  1. Lock the framebuffer (returns a pointer to framebuffer).
  2. Draw something in the framebuffer. 
  3. Unlock the framebuffer.

Or to use DMA operations, in which case syncronization of the framebuffer is handled automatically.

TextArea, in 4.10.0, mixes the two procedures which can cause glitches if it is the top most element (last to be drawn) of the current screen. The bug can be fixed by manually guarding endFrame() with the following override of endFrame() (based on F4 HAL). It ensures that endFrame() does not return if ChromART operations are still being processed.  

void STM32F4HAL::endFrame()
{
if (dma.isDMARunning())
{
OSWrappers::tryTakeFrameBufferSemaphore();
}
HAL::endFrame();
}

TouchGFX 4.9.0

Upgrading from 4.8.0

With the introduction of Application Templates, which essentially separates board support packages from the core framework, we have removed a lot of low-level drivers and other files from the touchgfx folder in 4.9.0. These files are now provided by application templates instead. However, this means that you cannot upgrade to 4.9.0 by just replacing the touchgfx folder, since that would likely lead to some BSP files missing. Instead, the TouchGFX Designer is able to perform the upgrade automatically. The upgrade can be done in two different ways, and you will need to decide which one is most suitable for you.

Caution
Please make sure you have a backup of your project before upgrading

Method 1: retain original file structure

This method is done by simply opening your project in the new 4.9.0 Designer. TouchGFX Designer will prompt you whether you want to upgrade, and by clicking OK, TouchGFX Designer will apply the necessary changes. TouchGFX Designer will perform the following operations:

  1. Unpack the new reduced touchgfx folder into your application, and modify your TouchGFX path to match this
  2. Download and unpack all the files we have removed from the touchgfx folder, so that your project still compiles

This approach will leave pretty much everything as they used to be, so if the old file structure suits your project, this is the easiest choice. The main drawback is that you will not have the benefit of the image converter speedup (by working on image folders instead of individual files). But you can modify your makefile manually to use this approach though.

Method 2: import into new template

Using this method you can transition your project into the new template-based file organisation. To achieve this, you must first let the Designer upgrade your project using Method 1 above. Then, create a new project using the appropriate application template (simulator, or one matching your eval board). With this new project opened in the Designer, go to the top menu and click "Edit -> Import GUI". In the dialog box point out the .touchgfx file of your project. The Designer will then automatically import all the UI files, including assets, into the newly created project. If you have added additional code outside of the gui folder, you would need to manually copy those files over to the new project.

Method 3: Manual upgrade without Designer

If you are not using the Designer, you can perform the upgrade by:

  1. Replacing the touchgfx folder used by your project with the one from the 4.9.0 installation.
  2. Download this zip and unpack it into the touchgfx folder, restoring the removed files.