spsdk-mcu-link 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ BSD 3-Clause "New" or "Revised" License
2
+
3
+ Copyright 2024 NXP
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without modification,
7
+ are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice, this
13
+ list of conditions and the following disclaimer in the documentation and/or
14
+ other materials provided with the distribution.
15
+
16
+ * Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from this
18
+ software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
24
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
27
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
28
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29
+ OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
@@ -0,0 +1,8 @@
1
+ include LICENSE
2
+ include README.md
3
+ include SW_Content_Register_spsdk_mcu_link.txt
4
+
5
+ recursive-include tests *
6
+ recursive-exclude * __pycache__
7
+ recursive-exclude * *.py[co]
8
+ recursive-exclude .github *
@@ -0,0 +1,109 @@
1
+ Metadata-Version: 2.1
2
+ Name: spsdk_mcu_link
3
+ Version: 0.5.0
4
+ Summary: SPSDK MCU-Link. A debugger probe plugin for SPSDK supporting LPC-Link/MCU-Link from NXP.
5
+ Author: NXP
6
+ Maintainer-email: Kelnar Michal <michal.kelnar@nxp.com>
7
+ License: BSD-3-Clause
8
+ Project-URL: Homepage, https://github.com/nxp-mcuxpresso/spsdk_plugins/tree/master/mcu_link
9
+ Project-URL: Issues, https://github.com/nxp-mcuxpresso/spsdk_plugins/issues
10
+ Keywords: NXP,SPSDK,mcu-link,mculink,CMSIS-DAP
11
+ Classifier: Development Status :: 2 - Pre-Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: BSD License
14
+ Classifier: Natural Language :: English
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: wasmtime~=24.0.0
25
+ Requires-Dist: pyusb~=1.2.1
26
+ Requires-Dist: hidapi~=0.14.0.post2
27
+ Requires-Dist: libusb_package
28
+
29
+ SPSDK MCU-Link
30
+ ==============
31
+
32
+ NXP SPSDK MCU-Link debug probe support plugin for NXP LPC-Link/MCU-Link hardware debug probes. This plugin enables seamless integration with NXP's debug hardware.
33
+
34
+ * Free software: BSD-3-Clause
35
+ * Documentation: https://github.com/nxp-mcuxpresso/spsdk_plugins?tab=readme-ov-file#readme
36
+
37
+ Features
38
+ --------
39
+
40
+ * Support for NXP MCU-Link debug probes
41
+ * CMSIS-DAP protocol implementation
42
+ * Firmware update capabilities
43
+ * Debug session management
44
+ * SWD/JTAG interface support
45
+ * Integration with SPSDK tools
46
+
47
+ Installation
48
+ ------------
49
+
50
+ 1. Activate your virtual environment with SPSDK (to install spsdk run: `pip install spsdk`):
51
+
52
+ python -m venv venv
53
+ source venv/bin/activate # On Windows: venv\Scripts\activate
54
+
55
+
56
+ 2. Install the package:
57
+
58
+ pip install spsdk_mcu_link
59
+
60
+
61
+ 3. Verify installation:
62
+
63
+ nxpdebugmbox --help
64
+
65
+ You should see `mcu-link` listed among available interfaces (--interface)
66
+
67
+ Usage
68
+ -----
69
+
70
+ 1. Connect your MCU-Link debug probe to your computer
71
+ 2. Basic debug session:
72
+
73
+ nxpdebugmbox --interface mcu-link --port auto
74
+
75
+ 3. For firmware updates:
76
+
77
+ nxpdebugmbox update-firmware --interface mcu-link
78
+
79
+
80
+ Advanced Usage
81
+ -------------
82
+
83
+ * Configuration options
84
+ * Debugging commands
85
+ * Firmware management
86
+ * Troubleshooting tips
87
+
88
+ Requirements
89
+ -----------
90
+
91
+ * Python 3.7 or newer
92
+ * SPSDK package
93
+ * USB drivers for MCU-Link hardware
94
+
95
+ Contributing
96
+ -----------
97
+
98
+ Contributions are welcome! Please feel free to submit a Pull Request.
99
+
100
+ Credits
101
+ -------
102
+
103
+ Michal Kelnar
104
+ <michal.kelnar@nxp.com>
105
+
106
+ License
107
+ -------
108
+
109
+ BSD-3-Clause
@@ -0,0 +1,81 @@
1
+ SPSDK MCU-Link
2
+ ==============
3
+
4
+ NXP SPSDK MCU-Link debug probe support plugin for NXP LPC-Link/MCU-Link hardware debug probes. This plugin enables seamless integration with NXP's debug hardware.
5
+
6
+ * Free software: BSD-3-Clause
7
+ * Documentation: https://github.com/nxp-mcuxpresso/spsdk_plugins?tab=readme-ov-file#readme
8
+
9
+ Features
10
+ --------
11
+
12
+ * Support for NXP MCU-Link debug probes
13
+ * CMSIS-DAP protocol implementation
14
+ * Firmware update capabilities
15
+ * Debug session management
16
+ * SWD/JTAG interface support
17
+ * Integration with SPSDK tools
18
+
19
+ Installation
20
+ ------------
21
+
22
+ 1. Activate your virtual environment with SPSDK (to install spsdk run: `pip install spsdk`):
23
+
24
+ python -m venv venv
25
+ source venv/bin/activate # On Windows: venv\Scripts\activate
26
+
27
+
28
+ 2. Install the package:
29
+
30
+ pip install spsdk_mcu_link
31
+
32
+
33
+ 3. Verify installation:
34
+
35
+ nxpdebugmbox --help
36
+
37
+ You should see `mcu-link` listed among available interfaces (--interface)
38
+
39
+ Usage
40
+ -----
41
+
42
+ 1. Connect your MCU-Link debug probe to your computer
43
+ 2. Basic debug session:
44
+
45
+ nxpdebugmbox --interface mcu-link --port auto
46
+
47
+ 3. For firmware updates:
48
+
49
+ nxpdebugmbox update-firmware --interface mcu-link
50
+
51
+
52
+ Advanced Usage
53
+ -------------
54
+
55
+ * Configuration options
56
+ * Debugging commands
57
+ * Firmware management
58
+ * Troubleshooting tips
59
+
60
+ Requirements
61
+ -----------
62
+
63
+ * Python 3.7 or newer
64
+ * SPSDK package
65
+ * USB drivers for MCU-Link hardware
66
+
67
+ Contributing
68
+ -----------
69
+
70
+ Contributions are welcome! Please feel free to submit a Pull Request.
71
+
72
+ Credits
73
+ -------
74
+
75
+ Michal Kelnar
76
+ <michal.kelnar@nxp.com>
77
+
78
+ License
79
+ -------
80
+
81
+ BSD-3-Clause
@@ -0,0 +1,10 @@
1
+ NXP Software Content Register
2
+
3
+ Package: spsdk-mcu-link
4
+ Version: 0.5.0
5
+ Outgoing License: BSD-3-Clause
6
+ License Files: LICENSE
7
+ Type of content: Source code
8
+ Description and comments: NXP Secure Provisioning SDK Team - Debug Probe plugin for CMSIS-DAP probes
9
+ Origin: NXP (BSD-3-Clause)
10
+ URL: https://github.com/nxp-mcuxpresso/spsdk_plugins/tree/master/mcu_link
@@ -0,0 +1,168 @@
1
+ [project]
2
+ name = "spsdk_mcu_link"
3
+ description = "SPSDK MCU-Link. A debugger probe plugin for SPSDK supporting LPC-Link/MCU-Link from NXP."
4
+ dynamic = ["version"]
5
+
6
+ requires-python = ">= 3.9"
7
+ dependencies = [
8
+ "wasmtime~=24.0.0",
9
+ "pyusb~=1.2.1",
10
+ "hidapi~=0.14.0.post2",
11
+ "libusb_package",
12
+ ]
13
+
14
+ authors = [{ name = "NXP" }]
15
+ maintainers = [{ name = "Kelnar Michal", email = "michal.kelnar@nxp.com" }]
16
+ readme = { file = "README.md", content-type = "text/markdown" }
17
+ license = { text = "BSD-3-Clause" }
18
+
19
+ keywords = ["NXP", "SPSDK", "mcu-link", "mculink", "CMSIS-DAP"]
20
+ classifiers = [
21
+ "Development Status :: 2 - Pre-Alpha",
22
+ "Intended Audience :: Developers",
23
+ "License :: OSI Approved :: BSD License",
24
+ "Natural Language :: English",
25
+ "Programming Language :: Python :: 3",
26
+ "Programming Language :: Python :: 3.9",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.13",
31
+ ]
32
+
33
+ [project.entry-points]
34
+ "spsdk.debug_probe" = { mcu-link = "spsdk_mcu_link.probe" }
35
+ pyinstaller40 = { hook-dirs = "spsdk_mcu_link.__pyinstaller:get_hook_dirs" }
36
+
37
+ [project.urls]
38
+ Homepage = "https://github.com/nxp-mcuxpresso/spsdk_plugins/tree/master/mcu_link"
39
+ Issues = "https://github.com/nxp-mcuxpresso/spsdk_plugins/issues"
40
+
41
+
42
+ [build-system]
43
+ requires = ["setuptools >= 61.0", "wheel"]
44
+ build-backend = "setuptools.build_meta"
45
+
46
+ [tool.setuptools]
47
+ packages = [
48
+ "spsdk_mcu_link",
49
+ "spsdk_mcu_link.dapper",
50
+ "spsdk_mcu_link.__pyinstaller",
51
+ ]
52
+ include-package-data = true
53
+
54
+ [tool.setuptools.package-data]
55
+ "spsdk_mcu_link.dapper" = ["*.wasm"]
56
+
57
+ [tool.setuptools.dynamic]
58
+ version = { attr = "spsdk_mcu_link.__version__" }
59
+
60
+ [tool.bumpversion]
61
+ current_version = "0.5.0"
62
+
63
+ [[tool.bumpversion.files]]
64
+ filename = "spsdk_mcu_link/__init__.py"
65
+ search = '__version__ = "{current_version}"'
66
+ replace = '__version__ = "{new_version}"'
67
+
68
+ [[tool.bumpversion.files]]
69
+ filename = "SW_Content_Register_spsdk_mcu_link.txt"
70
+ search = "{current_version}"
71
+ replace = "{new_version}"
72
+
73
+ [tool.pytest.ini_options]
74
+ testpaths = ["tests"]
75
+ junit_family = "xunit1"
76
+
77
+ [tool.coverage.report]
78
+ exclude_lines = ["pragma: no cover", "safe_main()", "sys.exit(main())"]
79
+
80
+ [tool.coverage.run]
81
+ relative_files = true
82
+
83
+ [tool.black]
84
+ line-length = 100
85
+ target-version = ["py39", "py310", "py311", "py312", "py313"]
86
+ include = '\.pyi?$'
87
+
88
+ [tool.isort]
89
+ multi_line_output = 3
90
+ include_trailing_comma = true
91
+ force_grid_wrap = 0
92
+ use_parentheses = true
93
+ ensure_newline_before_comments = true
94
+ line_length = 100
95
+
96
+ [tool.mypy]
97
+ disallow_untyped_defs = true
98
+ ignore_missing_imports = true
99
+ warn_unused_ignores = true
100
+
101
+ [tool.mypy-spsdk-mcu-link.dapper.webix_dapper_wasm]
102
+ ignore_errors = true
103
+
104
+ [tool.radon]
105
+ exclude = "spsdk_mcu_link/dapper/webix_dapper_wasm.py"
106
+
107
+ [tool.pydocstyle]
108
+ convention = "google"
109
+ add_ignore = "D105,D301"
110
+ match = '(?!test_|__version__|webix_dapper_wasm).*\.py'
111
+
112
+ [tool.pylint]
113
+ format = { max-line-length = 120 }
114
+ "messages control" = { disable = ["logging-fstring-interpolation"] }
115
+ ignore = ["webix_dapper_wasm.py"]
116
+ max-attributes = 12
117
+
118
+ [tool.checker_dependencies]
119
+ root_package = "spsdk_mcu_link"
120
+ [tool.checker_dependencies.spdx]
121
+
122
+ "Apache-2.0" = [
123
+ "Apache 2.0",
124
+ "Apache-2.0 License",
125
+ "Apache Software License 2.0",
126
+ "Apache License, Version 2.0",
127
+ "Apache License 2.0",
128
+ "Apache Software License",
129
+ ]
130
+ "BSD-2-Clause" = ["BSD 2-Clause License"]
131
+ "BSD-3-Clause" = [
132
+ "BSD License",
133
+ "BSD 3-Clause",
134
+ "BSD (3 clause)",
135
+ "BSD 3-Clause License",
136
+ "Modified BSD License",
137
+ ]
138
+ "MIT" = ["MIT License", "MIT license"]
139
+ "MPL-2.0" = ["MPL 2.0", "Mozilla Public License 2.0 (MPL 2.0)"]
140
+ "NLPL" = ["Public domain", "Public Domain"]
141
+ "PSF-2.0" = ["PSF", "PSFL", "Python Software Foundation License"]
142
+ "LGPL-3.0" = []
143
+ "LGPL-2.0" = ["GPL-2.0-or-later"]
144
+ "LGPL-2.1" = ["LGPL-2.1-or-later"]
145
+ "ISC" = ["ISC license"]
146
+ "Unlincense" = ["The Unlicense", "The Unlicense (Unlicense)"]
147
+
148
+ [tool.nxp_codecheck]
149
+ git_parent_branch = "origin/master"
150
+ output_directory = "reports"
151
+ default_check_paths = ["spsdk_mcu_link"]
152
+ checkers = [
153
+ { "pytest" = { kwargs = { disable_xdist = true } } },
154
+ { "gitcov" = { info_only = true } },
155
+ "pylint",
156
+ "mypy",
157
+ "dependencies",
158
+ "pydocstyle",
159
+ "ruff",
160
+ "cspell",
161
+ { "radon_c" = { info_only = true } },
162
+ "radon_d",
163
+ "black",
164
+ "isort",
165
+ "copyright",
166
+ "py_headers",
167
+ { "bandit" = { info_only = true } },
168
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: UTF-8 -*-
3
+ #
4
+ # Copyright 2024 NXP
5
+ #
6
+ # SPDX-License-Identifier: BSD-3-Clause
7
+ """Top-level package for MCU-Link."""
8
+
9
+ __author__ = """NXP"""
10
+ __email__ = "michal.kelnar@nxp.com"
11
+ __version__ = "0.5.0"
12
+
13
+ try:
14
+ from spsdk.__version__ import version, version_tuple
15
+ except ImportError as exc:
16
+ raise RuntimeError("Unable to detect SPSDK version. Is SPSDK installed?") from exc
17
+
18
+
19
+ MIN_SPSDK_VERSION = (2, 3)
20
+ MIN_SPSDK_VERSION_STR = ".".join(str(i) for i in MIN_SPSDK_VERSION)
21
+
22
+ if version_tuple < MIN_SPSDK_VERSION:
23
+ raise RuntimeError(
24
+ f"You are using old version of SPSDK ({version}). "
25
+ f"Please update SPSDK to at least version: {MIN_SPSDK_VERSION_STR}"
26
+ )
27
+
28
+ # pylint: disable=wrong-import-position
29
+ from .probe import DebugProbeMCULink # noqa: E402
30
+
31
+ __all__ = ["DebugProbeMCULink"]
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: UTF-8 -*-
3
+ #
4
+ # Copyright 2024 NXP
5
+ #
6
+ # SPDX-License-Identifier: BSD-3-Clause
7
+
8
+ """Module containing all PyInstaller hooks."""
9
+
10
+ import os
11
+
12
+
13
+ def get_hook_dirs() -> list[str]:
14
+ """Get list of directories where PyInstaller should look for hooks."""
15
+ return [os.path.dirname(__file__)]
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: UTF-8 -*-
3
+ #
4
+ # Copyright 2024 NXP
5
+ #
6
+ # SPDX-License-Identifier: BSD-3-Clause
7
+
8
+ # pylint: disable=invalid-name, import-error
9
+
10
+ """Add hidden imports, binaries, and data for this package."""
11
+
12
+ from PyInstaller.utils.hooks import PY_DYLIB_PATTERNS, collect_data_files, collect_dynamic_libs
13
+
14
+ hiddenimports = ["spsdk_mcu_link"]
15
+
16
+ datas = collect_data_files("spsdk_mcu_link")
17
+ binaries = collect_dynamic_libs("wasmtime", search_patterns=PY_DYLIB_PATTERNS + ["_lib*.so"])
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ #
4
+ # Copyright 2024 NXP
5
+ #
6
+ # SPDX-License-Identifier: BSD-3-Clause
7
+
8
+ # noqa: D205, D212, D415
9
+ """
10
+ SPSDK MCU Link Dapper Module
11
+ ============================
12
+
13
+ This module provides interfaces for working with Dapper debug probes.
14
+
15
+ Components
16
+ ---------
17
+ * DapperFactory: Factory class for creating Dapper instances
18
+ * DapperProbeInfo: Class containing probe information
19
+ * WebixDapper: Main Dapper implementation class
20
+ * WebixDapperWasm: WASM-based Dapper implementation
21
+ * Uint8Array: Type for handling byte arrays
22
+ * Interface: Enumeration of available interfaces
23
+ """
24
+
25
+ from .webix_dapper import DapperFactory, DapperProbeInfo, Interface, WebixDapper
26
+ from .webix_dapper_wasm import Uint8Array, WebixDapperWasm
27
+
28
+ __all__ = [
29
+ "DapperFactory",
30
+ "DapperProbeInfo",
31
+ "WebixDapper",
32
+ "WebixDapperWasm",
33
+ "Uint8Array",
34
+ "Interface",
35
+ ]