This is a CLI tool for SEGGER RTT reading and mass flash via the JLink.
It is based on the Python library pylink-square
The requirements with the following version has been tested: JLink: v6.88a pylink-square: 0.11.1
- Download and install the JLink at here. We have test the
v6.88a
. - 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
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
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"
.
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.
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'