Many times I came across one issue while using Redlib in MXUXpresso IDE project. I like to provide some guidance here to match the proper solution that can help others.
Problem Statement :
printf or sprintf doesn't print anything or printing random characters while using Redlib library.
Reason :
When you are creating your project you may ask to choose the c/c++ library setting to select either of the c libray provided by IDE in Advanced project setting wizard.
If you have not checked the option "Redlib: Use floating point version of printf" (which will use the floating-point variant of printf) have tried to print the floating point value, You will end up with the problem mentioned above.
Solution :
You need to enable the floating support by modifying some preprocessor directives in "Defined symbols (-D)" wizard of your project. Path : Your Project > properties > C/C++ Build > Setiings > Tool Settings > MCU C Compiler > Preprocessor. These are:
That is it. Now you will have your expected prints for floating point values in your debugger console.