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 System_printf() function in CCS V5

Hi,

   I am running the exampling "Hello" in CCS v5, in which the function "System_printf" should have print a "hello world" in the console, but it didn't.

When I use the  function "printf" instead of  "System_printf", it successfully prints "hello world" in the console, so i am wondering why the function "System_printf" didn't.

Thank you!

  • System_printf buffers until an event such as the buffer becoming full or the program terminating. I believe printf is actually implemented as a trick on the emulators to momentarily halt execution and print the message.  Since most developers don't normally put printf statements in the middle of a high performance kernel, any fluctuation in timing shouldn't be important.

    Summary: System_printf actually writes to a buffer that doesn't get printed immediately. printf outputs immediately, but may only work on an emulator (it might get compiled into System_printf in other scenerios, but I do not know that much)