Is there a lightweight version of sprint() for the FX3 SDK? - KBA90398

Version: *A

 

Question:

The version of sprint() in the standard C library provided with the FX3 SDK needs 32KB of SRAM space. Is there a lightweight version of this function that is memory efficient? 

 

Answer:

Yes. In case of FX3 SDK version 1.3, use the function CyU3PDebugStringPrint(). This function has the same call signature of the snprintf() function and has smaller memory footprint.

For older versions of the SDK (version 1.2.3 or lower), use the function given in the attached file. Its structure is similar to the sprint (not snprintf) function and can be modified as needed.