Cannot use fprintf in MCUxpresso SDK

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

Cannot use fprintf in MCUxpresso SDK

309 Views
mjkimbravo
Contributor III

Hello,

I am wanting to print contents to a file using the C function "fprintf()," but it does not work. 

My device is QN9080 and I run some SDKs in MCUxpresso IDE. I set library/header to semihost config (already test every setting like Redlib, Newlib, NewlibNano in semihost). Some parts of my very simple code is below (send_data is a data which I want to write in .csv)

mjkimbravo_0-1716530499428.png

 

Here, .csv file is generated well, but code makes some errors at fprintf(); The error is...

 

mjkimbravo_1-1716530606595.png

mjkimbravo_2-1716530622711.png

Of course I include "stdio.h", "stdlib.h", and other kinds of headers. I also try to find a solution in "MCUXpresso IDE user guide.pdf" but it failed. I already found similar questions with me in NXP community, but those are not helpful for me.

Would you please help me?

 

Thanks,

 

 

 

0 Kudos
2 Replies

287 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

Hope you are doing well. I would recommend checking these posts:

 

Solved: semihosting fopen path - NXP Community

Solved: Re: Writing to a file (fprintf) in MCUXpresso IDE (11.3.1) - NXP Community

 

Hope this helps!

 

Regards,

Ricardo

0 Kudos

272 Views
mjkimbravo
Contributor III

Thank you for your reply.

As I mentioned in my main post, of course I already have read the posts you inform. But those are not helpful to me. I think my problem is a different kind of errors (something like I cannot use fprintf() itself). Would you please see the picture I uploaded in my main post and consider my problem?

Why this kind of errors happen?:

Can't find a source file at "/opt/jenkins/workspace/Libraries_ElevenNine/Redlib/redlib_clib/armv7e-m_fpu/.../src/fpprintf.c

 

Thanks,

0 Kudos