Skip to main content

Upgrading Project

TouchGFX Generator parameters are stored in .ioc files (STM32CubeMX project). When a new version of TouchGFX Generator is released, the parameters of the old version may be incompatible with the new version and may require migration. This section describes the steps required to successfully migrate and update a project in STM32CubeMX.

Since STM32CubeMX does not support upgrading between X-CUBE versions, the upgrade is automatically performed by TouchGFX Designer when Generate Code is pressed, due to the following command in the PostGenerateTargetCommand section of the .touchgfx file.

.touchgfx
"PostGenerateTargetCommand" : "touchgfx update_project --project-file=../upgrade.ioc --platform=m7"

The command will read the .ioc file and update the parameters to fit the current version of X-CUBE-TOUCHGFX. Below is an example of running the script (X-CUBE-TOUCHGFX 4.14.0) by hand on an .ioc file created with X-CUBE-TOUCHGFX 4.13.0.

Upgrade example using STM32F746 DISCO TouchGFX Board Setup from 4.13.0 to 4.14.0
$ touchgfx update_project --project-file=../STM32F746G_DISCO.ioc
TouchGFX Generator 4.13.0 found
Creating backup of ../STM32F746G_DISCO.ioc as ../backup_STM32F746G_DISCO.ioc
Performing upgrade 4.13.0 -> 4.14.0 ... OK

Opening the updated project with STM32CubeMX prompts the user to install the version of X-CUBE-TOUCHGFX that is represented by the .ioc file (if not already installed). Clicking Download now will download and install the new version of X-CUBE-TOUCHGFX.

Additional Software Component Missing: TouchGFX Generator 4.14.0

All configurations in TouchGFX Generator will be kept during the upgrade procedure, and a backup of the .ioc file will be placed beside the original on prepended with backup_.

To use the new features provided by TouchGFX Generator, Generate Code must be performed in STM32CubeMX.
Caution
If upgrading X-CUBE-TOUCHGFX through STM32CubeMX for an existing TouchGFX Project and the upgrade process is not run by TouchGFX Designer, TouchGFX Generator parameters will be reset to default since they are applicable to a different version.