zoukankan      html  css  js  c++  java
  • ST Debug (printf) Viewer for Jlink

    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.

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

    Serial Window Display

    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

    SequenceDescription
     From Target −→ µVision
    CR (' ') Carriage Return
    LF (' ') Line Feed
    TAB (' ') 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

  • 相关阅读:
    10 个你需要了解的 Linux 网络和监控命令
    U盘安装 bt5
    SpringCloud RabbitMQ 使用
    两个大数相乘笔试题目
    activemq 话题模式(三)
    activemq 队列模式(二)
    activemq 安装 (一)
    安装mysql5.7时缺少my.ini文件
    linux 远程rsa 登录配置 文件 /etc/ssh/sshd_config
    java -jar 解决占用终端问题
  • 原文地址:https://www.cnblogs.com/jiangzhaowei/p/10825072.html
Copyright © 2011-2022 走看看