2024-11-04 05:45 PM
I have a bunch of debugMsg() calls throughout my code. Is there a way to automatically strip those out during a build?
2024-11-05 04:58 PM - edited 2024-11-05 05:00 PM
The usual way is to have something like:
#if defined DEBUG
#define debugMsg(x) output_stuff(x)
#else
#define debugMsg(x)
#endif
thus debugMsg() effectively "disappears" in non-DEBUG builds.
This is general C practice - not specific to STM32 or CubeIDE.