Giter Site home page Giter Site logo

tools-rtt2pty's Introduction

RTT to PTY bridge

This utility allows you to form a bridge between Segger's Real Time Transfer (RTT) and a pseudo-terminal interface (PTY).

It behaves similarly to common USB to serial adapters, instantiating a PTY device while the utility is running, allowing you to send and receive data through the device using any number of common utilities (minicom, etc.).

Requirements

Since RTT is a proprietary standard, it will only work with a Segger J-Link or compatible device, and you will need to download the appropriate jlink arm library (libjlinkarm.so on Linux, libjlinkarm.dylib on OS X).

The application will search for libjlinkarm.so in common paths by default, but you can specify the file location using the -j <filename> option.

Key Parameters

The following command-line parameters are available (rtt2pty --help):

rtt2pty: Segger RTT to PTY bridge
rtt2pty [-opt <param>]

Options:
       -d <devname>      Segger device name
       -s <serial>       J-Link serial number
       -S <speed>        SWD/JTAG speed
       -b <name>         Buffer name
       -2                Enable bi-directional comms
       -j <filename>     libjlinkarm.so/dylib location

Device Name (-d <devname>)

The Segger target device name string. The default value is nrf52.

NOTE: You can get a full list of device names by opening JLinkExe and entering the following command: expdevlist <path to output file>.

Serial Number (-s <serial>)

If you have more than one J-Link connected to your computer, the first device found will be selected by default. You can indicate the device you intend to connect to by supplying the J-Link's serial number, which is visible any time you run JLinkExe.

Bi-directional Communication (-2)

By default, the tool only allows communication in one direction (target to PC). Setting the -2 flag allows communication in both directions.

Example

On OS X, you can run the following command to open a PTY device with bi-directional communication over RTT:

$ ./rtt2pty -j libjlinkarm.dylib -2 1
Connected to:
  #################
  S/N: ############
Searching for RTT control block...
Using up-buffer #0 (size=1024)
Using down-buffer #0 (size=16)
PTY name is /dev/ttys003

You can then connect to the PTY using a tool like minicom as follows:

$ minicom -D /dev/ttys003

tools-rtt2pty's People

Contributors

andrzej-kaczmarek avatar microbuilder avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.