Segger J-Link的Python接口。

pylink-square的Python项目详细描述


Build Status

Segger J-Link的Python接口。

安装

将项目克隆到本地存储库中,然后导航到 目录并运行:

$ python setup.py install

外部依赖性

为了使用这个库,您需要安装segger 工具。这些工具可以从Segger网站安装 here。这个包裹是 与segger工具的版本>= 6.0b兼容。下载 在J-Link Software and Documentation Pack下为您的 特定硬件。PyLink将自动找到库 以这种方式安装,但为了获得最佳效果,您应该使用 下面列出的两种方法取决于您的操作系统:

在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.
$ exportDYLD_LIBRARY_PATH=/Applications/SEGGER/JLink:$DYLD_LIBRARY_PATH

在Windows上

Windows按以下顺序搜索DLL:

  1. 当前执行目录。
  2. Windows系统目录。
  3. Windows目录。

您可以将JLinkARM.dll复制到列出的任何目录 上面。或者,将segger j-link目录添加到 %PATH%

在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.
$ exportLD_LIBRARY_PATH=/path/to/SEGGER/JLink:$LD_LIBRARY_PATH

用法

importpylinkif__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文档。

文档

文档遵循Google Python Style Guide,并使用 `Sphinx<;http://www.sphinx-doc.org/en/stable/>;``文档 发电机 `Napoleon<;http://www.sphinx-doc.org/en/stable/ext/napoleon.html>;。`_ 扩展以提供google风格的python支持。生成 文档中,需要安装这些包(它们是 包含在提供的requirements.txt文件中)。带着这些包裹 安装后,您可以按如下方式生成文档:

$ cd docs
$ make html

测试

要运行测试,请执行以下操作:

# Unit tests
$ python setup.py test

# Functional tests
$ python setup.py bddtest

有两种类型的测试:functionalunit。信息 在`tests/README.md<;tests/readme.md>;`\

覆盖范围

代码覆盖率可以如下生成:

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

贡献

请参阅contributing上的文档。

许可证

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.

见条款和条件here

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
JavaFX进度条从单独的函数更改而来   jvm使用java服务器选项   java在<li>元素中查找同名的最后一个链接   java问题将参数传递给不同公共类中的构造函数   如何在php中从java函数中获取字符串   java如何在Android中动态显示多个tile   java仅使用Ribbon而不使用任何服务注册表是否可以实现负载平衡?   Jersey 1.19版本的java Swagger JAXRS出现“冲突URI模板”错误   带H2数据库的java Spring boot jpa   从12:00:00到00:00:00的日期转换   Android中的java如何设置文本?   java密钥库“不支持的保护参数”   http使用Java在Java中发送httprequest。净包   SpringJava刷新数据库   java在Spring Boot应用程序中使用嵌入式MongoDb和MongoTemplate失败   java需要什么MatOfMatch对象?   xml使用Java中的合并算法将两个值合并为单个值   java SQLite数据库不保存数据为什么不工作