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.

cg_xml with nofloat printf support

I am using TI ARM compiler v5.0.5 (also tried with v5.1.3) for an LM3S9D96.  The call_graph.exe cg_xml tool does not seem to be able to calculate worst case stack when noflat printf support is used.  It handles full printf just fine, but with nofloat, I get a call graph leaf where _printfi : wcs = ??? and a note at the bottom of the output about an indirect function call in _printfi_nofloat.  I presume these are actually the same function, but for some reason the XML being generated doesn't reflect this.

I tried adding a line in the arm_rts_indirect.txt file like:

_printfi_nofloat : _printfi

but then call_graph.exe complains about _printfi_nofloat not being found.

Does anyone know a fix or workaround?  Thanks!

  • As a workaround, I have rebuilt the rts library and modified _printfi.c so that it defines _PRINTFI as _printfi_nofloat instead of _printfi.  Apparently when you pass in the nofloat option to the compiler, it does some trickery (or ignores some warnings about implicit function definitions) to call the right function, which the cg_xml call_graph tool does not handle properly. This means my build is actually specifying the full option, but the nofloat function is being linked in.  Just one more special case to document...