cancel
Showing results for 
Search instead for 
Did you mean: 

Two touchgfx designs in single project

justin11
Senior

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.

8 REPLIES 8
MM..1
Chief III

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

justin11
Senior

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"

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

Mohammad MORADI
ST Software Developer | TouchGFX

Hello @justin11 ,

Did you manage to create the project you wanted?

Mohammad MORADI
ST Software Developer | TouchGFX

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.

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 .

 

Mohammad MORADI
ST Software Developer | TouchGFX

thanks for this, is this available in the 4.20.0 version of touch gfx. im a bit reluctant to upgrade at the moment as it seems so closly tied into cubeide

Yes, that's why I mentioned it

Mohammad MORADI
ST Software Developer | TouchGFX