Skip to main content
PBU
Associate III
October 9, 2019
Question

Avoiding snprintf

  • October 9, 2019
  • 6 replies
  • 1342 views

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
October 9, 2019

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
October 9, 2019

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
December 6, 2019

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
December 6, 2019

No, I didn't get an answer yet.