Skip to main content
Marco.R
Senior
December 18, 2019
Solved

How to add Preprocessor definition to TouchGFX Designer?

  • December 18, 2019
  • 3 replies
  • 1066 views

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.
Best answer by Martin KJELDSEN

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

3 replies

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
December 18, 2019

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
December 18, 2019

​Perfect. Thank you

Martin KJELDSEN
Principal III
December 18, 2019

Welcome! :)

SMour.1
Associate III
June 29, 2021

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?