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.

TMS320F28388D: Compiler v21.6.0.LTS does not printf correctly

Part Number: TMS320F28388D

Hi,

After switching to 21.6.0.LTS my application stopped to print correctly anything except %d. Formats like "%.*f, ", FLT_DECIMAL_DIG, ...",  "%ld",...,  "%u,... " simply don't work with the sprintf function.

The compiler doesn't issue any errors or warnings. Explicitly defining  --printf_support=full doesn't help.  Switching back to the 20.2.5.LTS without any other properties changes completely solves the problem.

Is it a known issue, or I just missed something? Meanwhile I returned to work with 20.2.5.LTS, but maybe there is a way to make the new version of the compiler to work correctly? .

Thanks.

  • Compiler release testing includes extensive tests of the printf functions.  Please see if one the Tips for using printf fixes the problem.

    Thanks and regards,

    -George

  • Hi George,

    Thank you for your prompt answer.

    I have no doubt that the new compiler release passed extensive tests. But may be some use cases were still missed?

    I followed your link, but since it is all about the *sprintf function no I/O interfaces were involved. I checked my stack, and it was far from being full. As for the heap, it is the only "unusual" thing in the project. I placed it in the external SDRAM (EMIF) (which required some modification in the memory.c file). Anyway, the malloc / free functions called from the project code work properly.

    I noticed that there is some significant difference between 21.6.0.LTS and 20.2.5.LTS in the library source code in its part related to the formatted printing. Just out of curiosity I included the _printfi.c file from the "old" compiler library source into my project. And with compiler version set to 21.6.0.LTS it started to work correctly !

    I still do not exclude that I am missing something. But I think the issue is worth additional checking.

    Regards,

    Michael.

  • The only way I see forward is for me to reproduce the problem.  I'd appreciate if you would create a small CCS project, ideally with one sprintf call in it, that works correctly under version 20.2.5.LTS but fails under version 21.6.0.LTS. To zip up the project, please follow the directions in the article Sharing projects.  Attach the zip file to your next post.

    Thanks and regards,

    -George