以下是TI的论坛截取下来的:
问题1:
1、What can be the reason for not getting System_printf output on the Console (SYS/BIOS 6.32.3.43)?
2、What is the full version number of CCS that you are using? Also note
that you will not see the System_printf output right away. It will only
appear when the buffer is flushed (BIOS_exit)
3、Depending on which version of SYS/BIOS you are using, you may not
see the System_printf's come out on the console due to how System is
configured. If you want to have System_printf output go to the same
place as printf, add the following three lines to your .cfg file and
re-build:
var System = xdc.useModule('xdc.runtime.System');
var SysStd = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;
If you don't do this, the output will go to a circular buffer in
memory. You can examine that buffer using the ROV tool (use the menu:
Tools->ROV while in the debugger).注意:需要把系统配置的System.SupportProxy = SysMin;语句屏蔽掉
问题2:
4、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.
5、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)