Skip to main content
PBU
Associate III
Oct 9, 2019 7:14 AM UTC
Question

Avoiding snprintf

Is it possible to avoid using snprintf in TouchGFX. Is there any alternate method available to copy values in the buffer and display it without using snprintf.

This topic has been closed for replies.

6 replies

Martin KJELDSEN
Principal III
Oct 9, 2019 7:27 AM UTC

I'm assuming you mean Unicode::snprintf() (which is a TouchGFX function). Why don't you want to use it?

/Martin

PBU
PBUAuthor
Associate III
Oct 9, 2019 7:42 AM UTC

Hi Martin,

Yes Unicode::snprintf(). I don't want to use that because snprintf uses dynamic memory allocation. There might be changes for creating memory fragmentation right? also due to performance issues.

Bob Bailey
Senior
Dec 6, 2019 3:37 AM UTC

did you ever get an answer? I have a similar question. For other embedded applications with limited processor power I used a simple int-to-string function. I was displaying a lot of fast-changing numeric data and the library functions were too inefficient and big.

PBU
PBUAuthor
Associate III
Dec 6, 2019 4:52 AM UTC

No, I didn't get an answer yet.