Command-Line ToolΒΆ

PyLink ships with a command-line interface that provides common functionality. After you’ve installed the package, the command should be readily available for use.

Python interface for SEGGER J-Link.

usage: pylink [-h] [--version] [-v]
              {emulator,info,firmware,flash,unlock,erase,license} ...
Options:
--version show program’s version number and exit
-v, --verbose increase output verbosity
Sub-commands:
emulator

query for information about emulators or support

Query for information about emulators or support.

usage: pylink emulator [-h] (-l [{usb,ip}] | -s SUPPORTED | -t)
Options:
-l, --list

list all the connected emulators

Possible choices: usb, ip

-s, --supported
 query whether a device is supported
-t, --test perform a self-test
info

get information about the J-Link

Get information about the J-Link.

usage: pylink info [-h] [-p] [-j] [-s SERIAL_NO | -i IP_ADDR]
Options:
-p, --product print the production information
-j, --jtag print the JTAG pin status
-s, --serial specify the J-Link serial number
-i, --ip_addr J-Link IP address
firmware

modify the J-Link firmware

Modify the J-Link firmware.

usage: pylink firmware [-h] (-d | -u) [-s SERIAL_NO | -i IP_ADDR]
Options:
-d, --downgrade
 downgrade the J-Link firmware
-u, --upgrade upgrade the J-Link firmware
-s, --serial specify the J-Link serial number
-i, --ip_addr J-Link IP address
flash

flash a device connected to the J-Link

Flashes firmware from a file to a device connected to a J-Link.

usage: pylink flash [-h] [-a ADDR] -t {jtag,swd} -d DEVICE
                    [-s SERIAL_NO | -i IP_ADDR]
                    file
Positional arguments:
file file to flash onto device
Options:
-a, --addr start address to flash from
-t, --tif

target interface (JTAG | SWD)

Possible choices: jtag, swd

-d, --device specify the target device name
-s, --serial specify the J-Link serial number
-i, --ip_addr J-Link IP address
unlock

unlock a connected device

Unlocks a device connected to a J-Link. Note that this will erase the device.

usage: pylink unlock [-h] -t {jtag,swd} -d DEVICE [-s SERIAL_NO | -i IP_ADDR]
                     {kinetis}
Positional arguments:
name

name of MCU to unlock

Possible choices: kinetis

Options:
-t, --tif

target interface (JTAG | SWD)

Possible choices: jtag, swd

-d, --device specify the target device name
-s, --serial specify the J-Link serial number
-i, --ip_addr J-Link IP address
erase

erases the device connected to the J-Link

Erases the target device.

usage: pylink erase [-h] -t {jtag,swd} -d DEVICE [-s SERIAL_NO | -i IP_ADDR]
Options:
-t, --tif

target interface (JTAG | SWD)

Possible choices: jtag, swd

-d, --device specify the target device name
-s, --serial specify the J-Link serial number
-i, --ip_addr J-Link IP address
license

manage the licenses of your J-Link

Manage the licenses of the J-Link.

usage: pylink license [-h] (-l | -a ADD | -e) [-s SERIAL_NO | -i IP_ADDR]
Options:
-l, --list list the licenses of the J-Link
-a, --add add a custom license to the J-Link
-e, --erase erase the custom licenses on the J-Link
-s, --serial specify the J-Link serial number
-i, --ip_addr J-Link IP address

Copyright 2017 Square, Inc.