BG95-M3 printing double and float problem

Hi Community

I am trying to print double and float using stdlib, and I got printed “%f is unsupported” or %g is unsupprted" instead. I am using SDK 1.1.0 and llvm compiler given by local supplier.

float temp=32.25;
sprintf(buffer,"“temp”:%f",temp);
“temp”: %f is unsupported

I’m running into this problem too. I’ve seen this on other systems. It seems they left out floating point from certain functions because they are such large memory hogs. I recall that under one system I had to use a different syslib library that included %f%g on an Atmel
chip. I’m assuming that’s the same thing here, however there’s no info about how to “pay the price” and use %f/%g.

on GCC, printf and standart libraries work fine…

include std lib in builder ( glibc )
implement missing _write_r… etc
implement malloc/free
redirect uart to STDOUT

Thanks for reply, I’m using LLVM. I have found an implementation of snprint and vsnprintf from this guy, It works fine now.

1 Like

That was easy, ported the code over to my Quectel BG96 proc, works like a charm! Thanks again @m_alperen_sener!

Hello,

I am also facing float number printing problem with BC600K module and I do not found any solution here. can anybody share solution for it.

Thanks in advance,
Mukesh Prajapati