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

ST Debug (printf) Viewer for Jlink的更多相关文章

  1. Keil ARM-CM3 printf输出调试信息到Debug (printf) Viewer

    参考资料:http://www.keil.com/support/man/docs/jlink/jlink_trace_itm_viewer.htm 1.Target Options -> De ...

  2. Keil Debug (printf) Viewer

    Debug (printf) Viewer Home » µVision Windows » Debug (printf) Viewer The Debug (printf) Viewer windo ...

  3. MDK Debug (printf) Viewer打印数据

    1.Target Options -> Debug -> Settings(JLink) -> Debug里ort选择SW模式 2.在Target Options -> Deb ...

  4. STM32 使用 printf 发送数据配置方法 -- 串口 UART, JTAG SWO, JLINK RTT

    STM32串口通信中使用printf发送数据配置方法(开发环境 Keil RVMDK) http://home.eeworld.com.cn/my/space-uid-338727-blogid-47 ...

  5. 【转】keil+stm32+jlink利用swd方式进行printf输出

    出处:http://www.douban.com/note/248637026/ ----------------------------------------------------------- ...

  6. Jlink使用技巧之虚拟串口功能

    前言 串口调试是单片机开发过程必不可少的一个功能,一般是使用一个UART-TTL的串口模块来实现串口的功能,其实下载调试使用的Jlink仿真器也可以实现串口调试的功能,本篇文章将介绍如何使用Jlink ...

  7. Keil debugging techniques and alternative printf (SWO function)

    One of the basic needs of the embedded software development through the terminal to output debugging ...

  8. 使用SWO代替UART,实现Printf打印功能

    JTAG接口中,有个SWO引脚,一直没有在意,也没有去研究过是干嘛用的.直到发现ST-LINK V2-1上也有个SWO引脚,于是去研究学习它的作用,用起来相比UART方得便多. 本文内容已经整理成PD ...

  9. 【STM32H7教程】第8章 STM32H7的终极调试组件Event Recorder

    完整教程下载地址:http://forum.armfly.com/forum.php?mod=viewthread&tid=86980 第8章   STM32H7的终极调试组件Event Re ...

随机推荐

  1. MongoDB 无法启动

    提示 mongodb Mongod complains that there is no /data/db folder!! 解决方法:http://stackoverflow.com/questio ...

  2. 5.JUC之JDK自带锁ReentrantLock

    一.初识 ReentrantLock出身自jdk1.5,中文名:可重入锁 是Java JDK自带独占锁的唯一实现,是synchronized的升级版 1.我们之间有个synchronized 我们已经 ...

  3. Spring Boot 揭秘与实战之RabbitMQ

    Spring Boot 整合 RabbitMQ Spring Boot 整合 RabbitMQ 是非常容易,只需要两个步骤. 首先,在 pom.xml 中增加 RabbitMQ 依赖. <dep ...

  4. 静态库 VS 动态库

    如何得到库 ①先写好一堆的.c文件(.c:我们所需要的各种工具函数) ②将这些.c编译为对应的.o ③将所有的这些.o打包为一个仓库文件(静态库或者动态库) 静态库:按照静态库的方式打包 动态库:按照 ...

  5. CUDA中确定你显卡的thread和block数

    CUDA中确定你显卡的thread和block数 在进行并行计算时, 你的显卡所支持创建的thread数与block数是有限制的, 因此, 需要自己提前确定够用, 再进行计算, 否则, 你需要改进你的 ...

  6. centos + docker搭建深度学习环境以及一些问题解决

    必须要说容器是一个很牛逼的思想!注意,是思想!也许docker有种种问题,但是不管docker能否茁壮地发展下去,未来这种方式的环境搭建一定会变得越来越流行! 网上有很多这方面的教程,但大多数都不太好 ...

  7. 利用os模块求一个文件夹的大小。

    一.递归方法 def size(path): #给定一个初始的文件夹路径 num = 0 list_name = os.listdir(path) #利用os模块方法,以列表的形式获得该文件夹下面的所 ...

  8. 【最短路+较复杂处理】PAT-L3-005. 垃圾箱分布

    L3-005. 垃圾箱分布 大家倒垃圾的时候,都希望垃圾箱距离自己比较近,但是谁都不愿意守着垃圾箱住.所以垃圾箱的位置必须选在到所有居民点的最短距离最长的地方[此处为第一重排序选择的条件],同时还要保 ...

  9. IntelliJ IDEA如何默认使用阿里云的Maven仓库

    点击IntelliJ IDEA的config中的setting选项 在<mirrors>节点中加上一个子节点,然后保存即可: <mirror> <id>alimav ...

  10. Markdown编辑器的使用测试

    北京高校(大标题) 北京电子科技学院(小标题) 计算机技术(一级标) 研究生(二级标) 列表(三级标) 姓名 - 扎西 - 卓玛 学号 - 01 - 02 超链接 [QQ邮箱](https://www ...