更新至新的TouchGFX版本
When a TouchGFX application is created, the .touchgfx project file will have the same version as the TouchGFX Designer/X-CUBE-TOUCHGFX used to create it. 但是,這並不意味著只能使用TouchGFX的特定版本繼續開發應用。
TouchGFX在設計上向後相容,在大多數情況下,它需要一個極簡單的流程使舊版本應用能夠用TouchGFX新版本操作。
您只需打開新安裝的TouchGFX Designer版本,並嘗試通過最近使用的應用或“打開”對話方塊打開舊版本應用。您將看到下面的彈窗:
Caution
按下“Yes”按鈕,更新器將啟動。完成更新後,將在TouchGFX Designer中照常打開應用,現在可以使用新版本。
在極少數情況下,您必須對應用進行一些手動修改,以使應用完全更新至新的TouchGFX版本。如果您對將應用更新至新版本還有疑問,請參閱“已知問題”部分。
更新TouchGFX Generator
When you generate code in TouchGFX Designer for a migrated project, TouchGFX updates the TouchGFX version in the project's .ioc file automatically. TouchGFX Designer cannot, however, trigger STM32CubeMX to regenerate code. Since code generation in STM32CubeMX is often required; open the .ioc file in STM32CubeMX, confirm the X-CUBE-TOUCHGFX package shows the intended version, and then generate code.
Before opening the .ioc file, ensure that the new X-CUBE-TOUCHGFX package is installed in STM32CubeMX. You can do this in one of two ways:
In STM32CubeMX go to
Help→Manage embedded software packages→STMicroelectronics→X-CUBE-TOUCHGFX. Click the refresh button to fetch the latest packages, select the package, and clickInstall.If the release is very new and not yet available from the STM32CubeMX server, download the
STMicroelectronics.X-CUBE-TOUCHGFX.x.x.x.zippackage from st.com. In STM32CubeMX openHelp→Manage embedded software packages→From Local..., select the downloaded ZIP, and clickOpen.
After either procedure the package will be installed in STM32CubeMX. Then open the .ioc file, verify that X-CUBE-TOUCHGFX has been migrated to the new version, validate the configuration, and generate code.
Note
- You can update the TouchGFX Generator in STM32CubeMX before updating the .touchgfx file, but the recommended order is to update the .touchgfx file first.
- For more info on how to install X-CUBE-TOUCHGFX in STM32CubeMX see Installing TouchGFX Generator in STM32CubeMX.
Caution
- The migration is a two-step process that requires code generation from both STM32CubeMX and TouchGFX Designer.
TouchGFX/targetcode generated by the TouchGFX Generator is written to disk only after you press the Generate Code button in STM32CubeMX.

