Debug (printf) Viewer

http://www.keil.com/support/man/docs/uv4/uv4_db_dbg_serialwin.htm

Serial Window

The Serial window accepts serial input and output data streams. The window displays serial output data received from a simulated CPU, while characters typed into a serial window are input to the simulated CPU. This allows testing a UART interface prior to having the target hardware.

The Debug (printf) Viewer is a special serial window that can exchange data with the microcontoller. For Cortex-M microcontrollers, the window displays printf-data received from the Instrumentation Trace Macrocell (ITM). To redirect output, refer also to Retarget Output via ITM, and Debug Access in the CMSIS documentation.

Open these windows using the toolbar button or the menu View - Serial Windows.

The Context Menu allows:

  • Clearing the window.
  • Copying and saving the content to the clipboard or a file.
  • Setting a Carriage Return to every Line Feed that is received (enabled by default).
  • Switching to various representation modes.
    Terminal Mode Text formatting and cursor control sequences are supported (see table below).
    ASCII Mode Every printable character is displayed. An unprintable character is displayed as white-space (' ').
    HEX Mode Every character is displayed as a HEX-number.
    Mixed Mode Every character is displayed as a HEX-number and ASCII character. An unprintable character is displayed as dot ('.').

ANSI VT100 Terminal Sequences

Sequence Description
  From Target −→ µVision
CR ('\r') Carriage Return
LF ('\n') Line Feed
TAB ('\t') Tabulator
BS (0x08) Back Space
BEL (0x07) Bell
 
<ESC>[C Move cursor (position) 1 to the right
<ESC>[D Move cursor (position) 1 to the left
<ESC>[K Delete line right to cursor
 
<ESC>[J Clear screen
<ESC>[y;xf Set cursor to Row y, Column x; (x,y) are numeric ASCII values
  From µVision ⇒ Target
<ESC>[A Cursor Key UP
<ESC>[B Cursor Key DOWN
<ESC>[C Cursor Key RIGHT
<ESC>[D Cursor Key LEFT

Examples

// Clear screen and set cursor home
void ClearScreen(void)
{
printf("%c[1;1f%c[J", 27, 27);
} // set cursor to position (x, y)
void SetCursorPosition(int x, int y)
{
printf("%c[%i;%if", 27, (signed int)y, (signed int)x);
}

See also

最新文章

  1. Nginx配置文件详解
  2. 在iOS APP中使用H5显示百度地图时如何支持HTTPS?
  3. c++学习一:指针基础
  4. [erlang]一次erlcron崩溃引起的事故分析
  5. 【转】Git如何Check Out出指定文件或者文件夹
  6. 开放地址法实现HashTable
  7. java本地方法如何调用其他程序函数,方法详解2
  8. C++-函数模板特化如何避免重复定义
  9. 使用CURL下载远程文件保存到服务器
  10. SPOJ 4053 - Card Sorting 最长不下降子序列
  11. javascript第十六课:动态注册事件
  12. Python之登陆接口设计
  13. Linux经常使用的文件传输的几种方式
  14. python常用命令(持续) | Commonly used Python command list (con&#39;t)
  15. 协议系列之TCP协议
  16. Django数据查询方法总结
  17. 堆排序 java实现
  18. 【转】Nginx学习---Nginx&amp;&amp;Redis&amp;&amp;hcache三层缓存架构总结
  19. 关于Promise的一些个人理解jQuery的deferred
  20. MFC 剪切板的使用、线程介绍

热门文章

  1. djangoNotes
  2. SQL SERVER-Extendevent
  3. RestFramework之注册器、响应器与分页器
  4. 【年度盘点】10个热门Python练习项目
  5. mr-robot靶机练习
  6. 【DevOps】在CentOS中安装DockerCE
  7. spring框架中的一个字符串的工具类
  8. JS创建SVG的问题
  9. 2019 杭电多校第八场 HDU - 6665 Calabash and Landlord 两矩形分平面
  10. 30、[源码]-AOP原理-注册AnnotationAwareAspectJAutoProxyCreavi