Unable to print float values using PRINTF() in i.MX93EVK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to print float values using PRINTF() in i.MX93EVK

Jump to solution
655 Views
Vikas7Bal
Contributor II

I am working with an imx93evk sdk_2_16 (I am not sure how I generated it, will provide the generation steps in next post).

I observed that, the "PRINTF()" function is not able to print float values (it will only print textual content and remains blank in the place of float values)

I read in this query that, I need to enable some macros during project generation, but since my project is already generated, I couldn't regenerate it (there are many untracked changes which will be lost if I rebuild again)

So, is there a way where I can modify in the source code, so that I can achieve this. (I tried enabling the PRINT_FLOAT_ENABLE macro but yet it is not working)

This is the configuration, I currently have :
PRINT_FLOAT_ENABLE = 1
SDK_DEBUG_CONSOLE = 1

Thanks!

Labels (1)
0 Kudos
Reply
1 Solution
603 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

How did you modify your source code?

Please try to define these flags before fsl_debug_console.

// main.c
#define PRINTF_FLOAT_ENABLE 1
#define SDK_DEBUGCONSOLE 1

#include "fsl_debug_console.h"

 

If not work, then try to  modify LDFLAGS

-Wl,-u,_printf_float



Best Regards,
Zhiming

View solution in original post

0 Kudos
Reply
2 Replies
604 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

How did you modify your source code?

Please try to define these flags before fsl_debug_console.

// main.c
#define PRINTF_FLOAT_ENABLE 1
#define SDK_DEBUGCONSOLE 1

#include "fsl_debug_console.h"

 

If not work, then try to  modify LDFLAGS

-Wl,-u,_printf_float



Best Regards,
Zhiming

0 Kudos
Reply
544 Views
Vikas7Bal
Contributor II
Hi, Zhiming thanks for your quick response!

I have tried defining those flags before fsl_debug_console.h, but still no luck with it

However, I have tried -Wl,-u,_printf_float this linker flag and it started working!

Thanks!
0 Kudos
Reply