Skip to content

sada45/rtt_cmd_tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A useful SEGGER RTT command line tool

This is a CLI tool for SEGGER RTT reading and mass flash via the JLink. It is based on the Python library pylink-square

Version Requirement

The requirements with the following version has been tested: JLink: v6.88a pylink-square: 0.11.1

Get started

  1. Download and install the JLink at here. We have test the v6.88a.
  2. Install the pylink-square library according to the official guidance or use the pip (version 0.11.1 has been tested)
pip install pylink-square

Usage

Mass Flash

The script mass_flash.py can be used to mass flash the boards:

python3 mass_flash.py -s <JLink sequence number> -f <target binary file>

An example:

python3 mass_flash.py -s 1 2 3 -f test.bin

Log reader

The script log_reader.py is used to read the log output from the board via RTT:

python3 log_reader.py -v -s <JLink sequence number> [-p <log file prefix>]

The optional parameter -p given the prefix of the log file. For example, while using -p test, the log output for the JLink with sequency number 1 is "test_1.log".

RTT interaction

Some times we need to interact with the boards. You can use the:

python3 rtt_view.py -v -s <JLink sequence number> [-p <log file prefix> -t]

The optional parameter -p is same as the log reader.

The optional parameter -t let the program to start a thread which continuous reading the board's output. Otherwise, the program will only read the output once after the user send some message to the board.

Tips

This is a very simple tool based on the Python scripts. We strongly recommend users to modify the .bashrc file to simplify the usage like this:

alias rv='python3 ~/rtt_cmd_tool/rtt_view.py -vt'
alias mf='python3 ~/rtt_cmd_tool/mass_flash.py'
alias lr='python3 ~/rtt_cmd_tool/log_reader.py -v'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages