Skip to main content
justin11
Senior
May 17, 2024
Question

Two touchgfx designs in single project

  • May 17, 2024
  • 4 replies
  • 1810 views

Hi,
I am currently running two TouchGFX designs for a single CubeIDE project. effectlvly one design is Landscape and the other portrate. This is fine however, i am having to maintain them individually in different repos as i am unsure how to have both TouchGFX designs within the same CubeIDE porject.

Ideally what i would like is to be able to build both designs out as seperate binaries.

These screens use the same assets, nameing conventions etc. to link into the project Im just unsure about how to actually create this single build that i can manage in a single repo.

Hope someone will be able to asisst.

using TouchGFX 4.20.0 & cube IDE 1.9.0, i know these are older, but i don't really want to introduce many other aspects until i can combine these TouchGFX designs.

4 replies

MM..1
Chief III
May 17, 2024

I mean in Eclipse simple place both TouchGFX folders in project and exclude one from build for target configs

justin11
justin11Author
Senior
May 17, 2024

Hi,

I had considered this so i renamed the TouchGFX folder and then struggled to tie all the include files back together. It seemed like there were other ties / path names other than those in the cubeide "Paths & Symbols"

ST Employee
May 23, 2024

Hello @justin11 ,

There is a similar thread about managing files in an STM32CubeIDE project that I recommend checking out here. Additionally, consider examining a TouchGFX Board Setup with a dual-core configuration, such as the STM32H747I-Disco, as they have some shared files but distinct subprojects, allowing you to create separate binaries for each.

However, keep in mind that your common TouchGFX files should be gui and assets, the rest should be specific to each project. 

I hope this helps you, don't hesitate to ask more questions

ST Employee
June 18, 2024

Hello @justin11 ,

Did you manage to create the project you wanted?

justin11
justin11Author
Senior
June 18, 2024

Hi,

I sort of have. I have created a dedicated folder for each of the project and then created two build configurations within cubide.

This allows me to build a specified configuration that pulls in a different touchGFX design.

However, the issue i still have, is that i need to build the touchGFX design seperatly if i switch from one configuration to another before the cubeide builds correctly.

ST Employee
June 19, 2024

Glad to hear that you have made progress. 
Maybe this tip will help you even more: you can generate TouchGFX code through command-line. In your TouchGFX installation directory, tgfx.exe can be called to generate code using the command below:

C:\TouchGFX\4.24.0\designer\tgfx.exe generate -p [path to your project]\MyApplication.touchgfx 

You can see the documentation about it here .