Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2628719
  • 博文数量: 333
  • 博客积分: 4817
  • 博客等级: 上校
  • 技术积分: 4413
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-28 10:51
文章分类

全部博文(333)

文章存档

2017年(20)

2016年(57)

2015年(27)

2014年(20)

2013年(21)

2012年(164)

2011年(24)

分类: 嵌入式

2012-11-05 15:07:51

以下是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)

阅读(5297) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~