2024-06-10 10:31 AM
I would like to show some texts on the display when running the "debug" build configuration, but not when code is compiled for the "release".
How to?
TouchGFX (4.23.1) generates the code and STM32CubeIDE (1.14.1) builds and flashes the project.
Solved! Go to Solution.
2024-06-11 05:16 AM
Hello,
Basically, whenever you have a touchgfx_printf("Whatever"); that you want to only show when debugging, you have to wrap it in the define like this :
#ifdef DEBUG
touchgfx_printf("Whatever");
#endif
Regards,
2024-06-10 10:42 AM
Check for the Preprocessor DEBUG symbol
#ifdef DEBUG
// write to display
#endif
2024-06-11 05:00 AM
Ok, thanks, perhaps I've to learn a bit more about the concept.
That means I've to do that in my own .c files an cannot do it directly inside the touchGFX designer?
2024-06-11 05:16 AM
Hello,
Basically, whenever you have a touchgfx_printf("Whatever"); that you want to only show when debugging, you have to wrap it in the define like this :
#ifdef DEBUG
touchgfx_printf("Whatever");
#endif
Regards,