STM32CubdeIDE printing messages to UART only when in DEBUG mode
Hello. I would like to print certain messages to UART only in DEBUG mode. These prints will not be necessary in release mode.
I have tried the following:
#ifdef DEBUG
printf("hello from debug \n");
#endifAnd then I have built the project for both release and debug but the message is printed in both cases. How can I only get message to print in debug mode and not in release mode?