All Projects → square → Pylink

square / Pylink

Licence: apache-2.0
Python Library for device debugging/programming via J-Link

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pylink

Dirtyjtag
JTAG probe firmware for STM32F1
Stars: ✭ 183 (+15.82%)
Mutual labels:  arm, firmware
smcutil
SMC utility for modifying and examining Apple's SMC payloads.
Stars: ✭ 30 (-81.01%)
Mutual labels:  arm, firmware
Elinux
嵌入式 Linux 知识库 (elinux.org) 中文翻译计划;本项目发起人发布了《360° 剖析 Linux ELF》视频课程,欢迎订阅:https://www.cctalk.com/m/group/88089283
Stars: ✭ 193 (+22.15%)
Mutual labels:  firmware, debugging
Hydrafw
HydraFW official firmware for HydraBus/HydraNFC for researcher, hackers, students, embedded software developers or anyone interested in debugging/hacking/developing/penetration testing
Stars: ✭ 165 (+4.43%)
Mutual labels:  firmware, debugging
Daplink
Stars: ✭ 1,162 (+635.44%)
Mutual labels:  arm, firmware
m3forth
m3forth is a forth cross-compiler for cortex-m3 ARM microcontrollers
Stars: ✭ 16 (-89.87%)
Mutual labels:  debugging, arm
nsec-badge
Software from the NorthSec badge
Stars: ✭ 34 (-78.48%)
Mutual labels:  arm, firmware
Nailgun
Nailgun attack on ARM devices.
Stars: ✭ 114 (-27.85%)
Mutual labels:  arm, debugging
Raspberrypipkg
DEPRECATED - DO NOT USE | Go here instead ->
Stars: ✭ 758 (+379.75%)
Mutual labels:  arm, firmware
drone-cortexm
ARM® Cortex®-M platform crate for Drone, an Embedded Operating System.
Stars: ✭ 31 (-80.38%)
Mutual labels:  arm, firmware
Cargo Embed
a cargo extension for working with microcontrollers
Stars: ✭ 100 (-36.71%)
Mutual labels:  arm, debugging
Cargo Flash
a cargo extension for programming microcontrollers
Stars: ✭ 134 (-15.19%)
Mutual labels:  arm, debugging
Cross
“Zero setup” cross compilation and “cross testing” of Rust crates
Stars: ✭ 2,461 (+1457.59%)
Mutual labels:  arm
Redbug
erlang tracing debugger
Stars: ✭ 159 (+0.63%)
Mutual labels:  debugging
Esp8266 Firmware
DeviceHive esp8266 firmware. Control hardware via clouds with DeviceHive!
Stars: ✭ 154 (-2.53%)
Mutual labels:  firmware
Fwtr
Open Database of Firmware Test Results
Stars: ✭ 154 (-2.53%)
Mutual labels:  firmware
Arm Assembly Cheat
MOVED TO: https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly SEE README. ARMv7 and ARMv8 assembly userland minimal examples tutorial. Runnable asserts on x86 hosts with QEMU user mode or natively on ARM targets. Nice GDB step debug setup. Tested on Ubuntu 18.04 host and Raspberry Pi 2 and 3 targets.
Stars: ✭ 159 (+0.63%)
Mutual labels:  arm
Exein
Exein core for Linux based firmware
Stars: ✭ 158 (+0%)
Mutual labels:  firmware
Silicon Info
Mac menu bar tool to view the architecture of the running application
Stars: ✭ 153 (-3.16%)
Mutual labels:  arm
Stm32 graphics display drivers
STM32 LCD drivers (currently: spi(dma), gpio, fsmc(dma), st7735, st7783, ili9325, ili9328, ili9341, ili9486, ili9488, hx8347g)
Stars: ✭ 151 (-4.43%)
Mutual labels:  arm

pylink

Build Status

Python interface for the SEGGER J-Link.

Requirements

Installation

Clone the project into a local repository, then navigate to the directory and run:

$ python setup.py install

External Dependencies

In order to use this library, you will need to have installed the SEGGER tools. The tools can be installed from the SEGGER website here. This package is compatible with versions of the SEGGER tool >= 6.0b. Download the software under J-Link Software and Documentation Pack for your specific hardware. PyLink will automatically find the library if you have installed it this way, but for best results, you should use one of the two methods listed below depending on your operating system:

On Mac

# Option A: Copy the library to your libraries directory.
$ cp libjlinkarm.dylib /usr/local/lib/

# Option B: Add SEGGER's J-Link directory to your dynamic libraries path.
$ export DYLD_LIBRARY_PATH=/Applications/SEGGER/JLink:$DYLD_LIBRARY_PATH

On Windows

Windows searches for DLLs in the following order:

  1. The current directory of execution.
  2. The Windows system directory.
  3. The Windows directory.

You can copy the JLinkARM.dll to any of the directories listed above. Alternatively, add the SEGGER J-Link directory to your %PATH%.

On Linux

# Option A: Copy the library to your libraries directory.
$ cp libjlinkarm.so /usr/local/lib/

# Option B: Add SEGGER's J-Link library path to your libraries path.
$ export LD_LIBRARY_PATH=/path/to/SEGGER/JLink:$LD_LIBRARY_PATH

Usage

import pylink

if __name__ == '__main__':
   serial_no = '123456789'
   jlink = pylink.JLink()

   # Open a connection to your J-Link.
   jlink.open(serial_no)

   # Connect to the target device.
   jlink.connect('device', verbose=True)

   # Do whatever you want from here on in.
   jlink.flash(firmware, 0x0)
   jlink.reset()

Troubleshooting

Should you run into any issues, refer to the documentation, as well as check out our troubleshooting document.

Documentation

Documentation follows the Google Python Style Guide, and uses Sphinx documentation generator with the Napoleon extension to provide Google style Python support. To generate the documentation, these packages will need to be installed (they are included in the provided requirements.txt file). With these packages installed, you can generate the documentation as follows:

$ cd docs
$ make html

Developing for PyLink

First install the development requirements by running:

$ pip install -r requirements.txt

After you've installed the requirements, decide on the development work you want to do. See the documentation about contributing before you begin your development work.

Testing

To run tests, execute the following:

# Unit tests
$ python setup.py test

# Functional tests
$ python setup.py bddtest

There are two types of tests: functional and unit. Information about both can be found under tests/README.md.

Coverage

Code coverage can be generated as follows:

$ python setup.py coverage
$ open htmlcov/index.html

Contributing

Please see the documentation on contributing.

License

Copyright 2017 Square, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

See terms and conditions here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].