cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with app.mk using relative path to TouchGFX env folder

Jesper_MCI
Associate II

Hi

I just noticed that when building the Simulator using TouchGFXDesigner 4.24.1 the files
/config/gcc/app.mk
and
/config/msvs/Application.props

are updated with the relative path to the TouchGFX env folder, for instance:

# Location of the TouchGFX Environment
touchgfx_env := ../../../../../TouchGFX/4.24.1/env

If I try to overwrite these paths the files are just overwritten when I run the Simulator from TouchGFX Designer.


This is a problem when working on a project with multiple people that may have the project check out at different folder depths. I don't think the solution is to require that the project is checkout out at the same folder depth for everyone on the same project.
You can argue that it isn't a big problem as TouchGFX Designer updates the path for anyone creating the Simulator.
But it does create 'noise' in the repository.

Any suggestions on how to solve this ?

//Jesper

12 REPLIES 12

Hello Jesper,

 

If the files that cause the problem are changed when you click on "Generate code", they should usually not be included in Git.
Even if they are important for the whole project to work, they will be re-generated every time, so they won't be lost.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hi GaetanGodart

I agree.

Let me just start out by saying - it is a very minor thing that amidst a bunch of other confusions caused me to create my post. I would probably not had asked in the first place had I just waited a little..
The only issue there is is that any developer working with TouchGFX Designer may end up checking in changes to the app.mk file ( and the Application.props file ). No big deal for us anyway.


It is likely caused by lack of understanding on my behalf ( as it often is ). I am trying to learn.
And we may be doing something wrong on our end.

The file /config/gcc/app.mk holds some configuration settings. In our case it looks like this,

 

# Relative location of the TouchGFX framework from root of application
touchgfx_path := ../Middlewares/ST/touchgfx

# Location of the TouchGFX Environment
touchgfx_env := ../../../../../TouchGFX/4.24.1/env
# Optional additional compiler flags
user_cflags := -DUSE_BPP=16 -std=c++17 -DWIN32 -Wno-error

 

touchgfx_env and user_cflags are part of the app.mk file in EmptyApplication in the template folder of the installed TouchGFX.

The touchgfx_path is also part of our target.config file. I don't know if we added that path to this file at some point. And if it is even necessary to have here since it exists in target.config.
The other two settings differ from the template file. Obvious for the touchgfx_env and I think we must have changed the user_clags at some point.

It seems to me that user_cflags is so important that it should be in Git ( so that everyone builds with the same compiler flags ).

And that touchgfx_env should maybe not be in Git ?

I guess that's what my original question resolves into.

 

Hello @Jesper_MCI ,

 

The config folder is included in our gitignore file.

Maybe you can ask your colleagues if they have changed the content of app.mk but I think you said earlier that regenerating the TouchGFX Designer project modifies the app.mk file so more likely any change in the app.mk file is overwritten.

 

regards,

Gaetan Godart
Software engineer at ST (TouchGFX)