Skip to main content
Marco.R
Senior
Dec 18, 2019 11:46 AM UTC
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
Dec 18, 2019 12:13 PM UTC

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
Dec 18, 2019 12:13 PM UTC

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
Dec 18, 2019 12:31 PM UTC

​Perfect. Thank you

Martin KJELDSEN
Principal III
Dec 18, 2019 1:10 PM UTC

Welcome! :)

SMour.1
Associate III
Jun 29, 2021 6:30 AM UTC

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?