This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
The C compiler manual for CCS states that only a skeleton version of sprintf is available and it is only used for a Time function. I tried converting float to string using sprint and it seemed to compile, except that it tried to load .sysmen, located in M0SARAM, but could allocate enough space. I am using the TMS320F28015, so it does not have a huge amount of RAM. Questions:
Is sprintf supported in latest version of CCS compiler for float to string operation?
If so, is the loading of .sysmem for code or buffer space? If it is trying to load code in .sysmem, can I re-direct it to load into FLASH?
Lee
This wiki article will help http://tiexpressdsp.com/index.php/Tips_for_using_printf#How_to_use_printf_in_a_project . The .sysmem section is where malloc and friends allocate memory. Thus, it cannot be in flash.
Thanks and regards,
-George
A call to sprintf() shouldn't trigger a call to malloc(), but older versions of the compiler did have such a call. Newer versions of the compiler (4.3.0 and later) restructured the core C I/O routines and eliminated this call. Today, if I compile a program which calls sprintf() but no other C I/O, the memory allocation functions don't even appear in the executable.