Skip to main content
Marco.R
Senior
Solved

How to add Preprocessor definition to TouchGFX Designer?

Hi @Martin KJELDSEN​ 

Is it possible to add a preprocessor definition​ to the TouchGFX Designer? In Visual Studio it is very easy, but when I try to run the application in the designer it fails. How can I add a Preprocessor definition to the Designer (like SIMULATOR).

Marco

This topic has been closed for replies.
Martin KJELDSEN
Martin KJELDSENBest answer
Principal III

Hi Marco,

Sure, The designer uses Makefiles and gcc. Concretely, the makefiles use the config located in config/gcc/app.mk:

# Optional additional compiler flags
user_cflags := -DMYFLAG=2

/Martin

4 replies

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III

Hi Marco,

Sure, The designer uses Makefiles and gcc. Concretely, the makefiles use the config located in config/gcc/app.mk:

# Optional additional compiler flags
user_cflags := -DMYFLAG=2

/Martin

Marco.R
Marco.RAuthor
Senior

​Perfect. Thank you

Martin KJELDSEN
Principal III

Welcome! :)

SMour.1
Associate III

Actually that solution is not that perfect because once in a while you have to suffer the auto generation on this file.

Are there any alternatives?