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.

TM4C printf() project in CCSv6 doesn't FULLY work



I built a TM4C "printf" project using Tiva-C launchpad. Strange enough, the printf() without "%d" works OK and I can see the text in console, while any printf() with "%d" or whatever "%*", the console just stops at previous character before the %.

For ex:

 printf("\n\tHello world\n");    //works OK, console shows "Hello world"
 

printf("\n\tPrintf Test using Ti CCSv6"); // works OK, console shows "Printf Test using Ti CCSv6"
 
printf("cc = %c %d %#x\n",cc,cc,cc);    // Not working, console just stop at "cc= "

I tried to set both the heap & stack size to 2048 in CCS linker option, but no luck.

I can attach complete CCS v6 project files here, but don't know how to do it.

Looking forward to any solution and/or hint to fix this issue. Thanks in advance.

ps:   If case anyone wonders, UART initialization and  baud rate is not the issue.,

Eric

  • Hi Eric,

    Go to CCS Project Properties->Build->ARM Compiler->Advanced Options->Library Function Assumptions and set level of printf/scanf to "full"

    At CCS Project Properties->Debug make sure that "Enable CIO Function use" is selected.

    But, I suggest you consider using UARTprintf() instead.

    - kel
  • Hello Markel

    A CCS Console would be rather useful on RTOS development.

    Regards
    Amit
  • Hi, Markel:
    Thanks for the reply. I follow your instructions but still no luck. console still hangs at the first %. Tried your other suggestion to use UARTprintf, everything works now.
    Funny thing is, the "level of printf/scanf support" option doesn't appear in every CCS project. In fact, it just appears in this printf() test project, while disappear in my other CCS projects. Don't know how it comes out.
    Anyway, my issue resolved with UARTprintf. Really appreciated.
    Eric
  • My mistake, the "level of printf/scanf support" does appear in every project, but in different order. In some projects, it's at the top of the 4 options, while at the bottom in other projects. First time I've ever seen a compiler option so dynamically appears. Amazing !!
    Eric
  • Eric Chen49 said:
    My mistake, the "level of printf/scanf support" does appear in every project, but in different order. In some projects, it's at the top of the 4 options, while at the bottom in other projects.

    That has confused me before. I think it can happen if the projects use different versions of the compiler, since CCS auto-populates the available compiler / linker options reported by the version of the compiler in use by the project.

  • Indeed. There are some compiler options & dialogues (predefined  symbol and include path,  for ex ) vary between existing example projects (older version CCS) and the new one created in CCS v6.  It surely doesn't matter the result if you're aware of this, but might confuse CCS newbies like me. was expecting CCS to be more "professional", or consistent , to be exact.