全部博文(333)
分类: 嵌入式
2012-11-05 15:07:51
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;语句屏蔽掉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)