TI中文支持网
TI专业的中文技术问题搜集分享网站

CCS5 中printf输出窗口 如何设置

原先程序中printf("hello !")在simulator中运行时能在输出窗口中产生,后来不知怎原因运行时看不到输出,而其它一切正常。

输出窗口只有:(1)CDT Global Build Console与(2)CDT Build Console(工程名)两个选项

 

noaming:

在程序中用printf可能会出很多问题,建议你使用BIOS的LOG_printf:

Problems with printf()

It runs often for 1000s of cycles in order to do the string formatting (e.g. displaying an integer as ascii text).
It causes CCS to do a "silent halt". That is, there is a breakpoint that gets hit during calls to printf. CCS responds by reading out the printed message and then starting the DSP running again.

These issues coupled together typically cause severe problems with real-time performance, but you can easily avoid these issues by using LOG_printf instead.

King Wang1:

添加flush()函数在printf之后,就能看到输出了。

atower geng:

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).

赞(0)
未经允许不得转载:TI中文支持网 » CCS5 中printf输出窗口 如何设置
分享到: 更多 (0)