embeddedci-openhtf 2.0.0__tar.gz → 2.0.1__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.
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/CHANGELOG.md +6 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/PKG-INFO +3 -3
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/README.md +1 -1
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/examples/flash_and_boot.py +1 -1
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/examples/serial_smoke.py +1 -1
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/examples/station.py +1 -1
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/pyproject.toml +2 -2
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/src/embeddedci_openhtf/phases.py +1 -1
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/src/embeddedci_openhtf/pins.py +3 -3
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/tests/_fake.py +8 -8
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/tests/test_pins.py +1 -1
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/.gitignore +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/LICENSE +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/examples/analog_loopback.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/src/embeddedci_openhtf/__init__.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/src/embeddedci_openhtf/analog.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/src/embeddedci_openhtf/measurements.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/src/embeddedci_openhtf/plug.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/src/embeddedci_openhtf/power.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/tests/conftest.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/tests/test_analog.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/tests/test_e2e_openhtf.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/tests/test_measurements.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/tests/test_persistent.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/tests/test_phases.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/tests/test_plug.py +0 -0
- {embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/tests/test_power.py +0 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog — `embeddedci-openhtf`
|
|
2
2
|
|
|
3
|
+
## 2.0.1
|
|
4
|
+
|
|
5
|
+
- Docs: LA channels are 1-14 on BenchPod v3 pods with firmware 3.1+ (LA13/LA14), which
|
|
6
|
+
`embeddedci` 2.1 accepts. Now requires `embeddedci>=2.1`, which is where those channels
|
|
7
|
+
became valid.
|
|
8
|
+
|
|
3
9
|
## 2.0.0 — ported to the frozen `embeddedci` 2.0 API
|
|
4
10
|
|
|
5
11
|
The version jumps from 0.1.0 to 2.0.0 to track `embeddedci` 2.x, which this release requires
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: embeddedci-openhtf
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: OpenHTF plug for driving an EmbeddedCI BenchPod directly over TCP or serial (no cloud)
|
|
5
5
|
Project-URL: Homepage, https://embeddedci.com
|
|
6
6
|
Project-URL: Repository, https://github.com/embeddedci-com/embeddedci-python
|
|
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Topic :: Software Development :: Testing
|
|
20
20
|
Requires-Python: >=3.10
|
|
21
|
-
Requires-Dist: embeddedci<3,>=2.
|
|
21
|
+
Requires-Dist: embeddedci<3,>=2.1
|
|
22
22
|
Requires-Dist: openhtf>=1.6
|
|
23
23
|
Provides-Extra: dev
|
|
24
24
|
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
@@ -157,7 +157,7 @@ test = htf.Test(
|
|
|
157
157
|
test.execute(test_start=lambda: "SN-0001")
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
LA channels are 1-
|
|
160
|
+
LA channels are 1-14 (the pod has 14 generic logic-analyzer channels and no
|
|
161
161
|
fixed-role pins — wire any DUT signal to any channel and name it here).
|
|
162
162
|
|
|
163
163
|
`flash_phase` needs `openocd` on PATH (the pod is the CMSIS-DAP probe; OpenOCD
|
|
@@ -131,7 +131,7 @@ test = htf.Test(
|
|
|
131
131
|
test.execute(test_start=lambda: "SN-0001")
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
LA channels are 1-
|
|
134
|
+
LA channels are 1-14 (the pod has 14 generic logic-analyzer channels and no
|
|
135
135
|
fixed-role pins — wire any DUT signal to any channel and name it here).
|
|
136
136
|
|
|
137
137
|
`flash_phase` needs `openocd` on PATH (the pod is the CMSIS-DAP probe; OpenOCD
|
|
@@ -24,7 +24,7 @@ from openhtf.output.callbacks import console_summary, json_factory
|
|
|
24
24
|
|
|
25
25
|
from embeddedci_openhtf import benchpod_plug, boot_banner_phase, flash_phase
|
|
26
26
|
|
|
27
|
-
# --- bench wiring (edit for your setup): LA channels 1-
|
|
27
|
+
# --- bench wiring (edit for your setup): LA channels 1-14 -------------------
|
|
28
28
|
LA_VOLTAGE = 3.3 # DUT I/O voltage in volts (1.8 or 3.3)
|
|
29
29
|
SWCLK, SWDIO = 11, 12 # SWD probe -> DUT (LA channels)
|
|
30
30
|
NRESET = True # DUT reset wired to the pod's pin, J1 pin 22
|
|
@@ -28,7 +28,7 @@ from embeddedci import benchpod
|
|
|
28
28
|
from embeddedci_openhtf import benchpod_plug, record_uart
|
|
29
29
|
|
|
30
30
|
LA_VOLTAGE = 3.3 # DUT I/O voltage — change to 1.8 for a 1V8 board
|
|
31
|
-
UART_RX, UART_TX = 1, 2 # edit for your wiring (LA channels 1-
|
|
31
|
+
UART_RX, UART_TX = 1, 2 # edit for your wiring (LA channels 1-14)
|
|
32
32
|
BOOT_BANNER = "APP_OK"
|
|
33
33
|
|
|
34
34
|
|
|
@@ -31,7 +31,7 @@ from embeddedci_openhtf import (
|
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
LA_VOLTAGE = 3.3 # DUT I/O voltage in volts (1.8 or 3.3)
|
|
34
|
-
UART_RX, UART_TX = 1, 2 # edit for your wiring (LA channels 1-
|
|
34
|
+
UART_RX, UART_TX = 1, 2 # edit for your wiring (LA channels 1-14)
|
|
35
35
|
BOOT_BANNER = "APP_OK"
|
|
36
36
|
|
|
37
37
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "embeddedci-openhtf"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.1"
|
|
8
8
|
description = "OpenHTF plug for driving an EmbeddedCI BenchPod directly over TCP or serial (no cloud)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -23,7 +23,7 @@ classifiers = [
|
|
|
23
23
|
"Topic :: Software Development :: Testing",
|
|
24
24
|
]
|
|
25
25
|
dependencies = [
|
|
26
|
-
"embeddedci>=2.
|
|
26
|
+
"embeddedci>=2.1,<3",
|
|
27
27
|
"openhtf>=1.6",
|
|
28
28
|
]
|
|
29
29
|
|
|
@@ -62,7 +62,7 @@ def flash_phase(plug: type, *, file: str, target: str,
|
|
|
62
62
|
**flash_kwargs) -> object:
|
|
63
63
|
"""A phase that flashes the DUT over SWD and records the result.
|
|
64
64
|
|
|
65
|
-
``swclk``/``swdio`` are LA channels (1-
|
|
65
|
+
``swclk``/``swdio`` are LA channels (1-14); ``nreset`` is a flag saying the
|
|
66
66
|
target's reset is wired to the pod's reset pin (DUT header J1 pin 22).
|
|
67
67
|
Records a ``flash_ok``
|
|
68
68
|
measurement and attaches the OpenOCD log. By default a failed flash stops the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""LA-pin helpers for OpenHTF phases: GPIO, and timing between two channels.
|
|
2
2
|
|
|
3
|
-
The pod's
|
|
3
|
+
The pod's 14 logic-analyzer channels (LA1-LA14) are its only pins, and each has exactly one
|
|
4
4
|
function at a time — high-Z "LA mode" by default, or claimed by GPIO, a UART proxy, SWD, the
|
|
5
5
|
emulated I2C sensor or a step train. :func:`gpio` claims a channel so the pod can drive or read it;
|
|
6
6
|
:func:`release_gpio` gives it back. Claiming a channel another function owns raises
|
|
@@ -8,7 +8,7 @@ emulated I2C sensor or a step train. :func:`gpio` claims a channel so the pod ca
|
|
|
8
8
|
GPIO channel before a UART session, a flash or sensor emulation uses it. Captures observe every
|
|
9
9
|
channel whatever owns it, which is what :func:`la_delay` measures with.
|
|
10
10
|
|
|
11
|
-
``la`` arguments are an LA channel (1-
|
|
11
|
+
``la`` arguments are an LA channel (1-14 or a :class:`~embeddedci.benchpod.Pin`) or a name from the
|
|
12
12
|
bench's wiring profile — ``benchpod_plug("192.168.1.50", wiring="bench.json")`` then
|
|
13
13
|
``gpio(bench, "TRIGGER")``.
|
|
14
14
|
|
|
@@ -37,7 +37,7 @@ __all__ = [
|
|
|
37
37
|
"la_delay_phase",
|
|
38
38
|
]
|
|
39
39
|
|
|
40
|
-
#: An LA channel: 1-
|
|
40
|
+
#: An LA channel: 1-14, a :class:`Pin`, or a wiring-profile name.
|
|
41
41
|
_LaT = Union[Pin, int, str]
|
|
42
42
|
|
|
43
43
|
|
|
@@ -67,16 +67,16 @@ class FakeTransport(Transport):
|
|
|
67
67
|
self.commands: List[dict] = [] # raw `command` + `samples` requests seen
|
|
68
68
|
self.adc_samples = (adc_samples if adc_samples is not None
|
|
69
69
|
else [0, 64, 128, 192, 255, 192, 128, 64])
|
|
70
|
-
#: Raw
|
|
70
|
+
#: Raw 14-channel LA words a `la_capture` returns (bit n = LA{n+1}).
|
|
71
71
|
self.la_words = la_words if la_words is not None else []
|
|
72
72
|
self.fail_capture = fail_capture
|
|
73
73
|
self.closed = False
|
|
74
74
|
#: Capabilities the fake pod reports (the SDK gates GPIO, triggers and power profiles).
|
|
75
75
|
self.caps = ["la", "la_pins", "gpio_read", "capture_trigger", "power_profile"]
|
|
76
76
|
# LA pin ownership, as the firmware keeps it.
|
|
77
|
-
self.function = {la: "none" for la in range(1,
|
|
78
|
-
self.mode: Dict[int, Any] = {la: None for la in range(1,
|
|
79
|
-
self.level: Dict[int, Any] = {la: None for la in range(1,
|
|
77
|
+
self.function = {la: "none" for la in range(1, 15)}
|
|
78
|
+
self.mode: Dict[int, Any] = {la: None for la in range(1, 15)}
|
|
79
|
+
self.level: Dict[int, Any] = {la: None for la in range(1, 15)}
|
|
80
80
|
#: Levels the "DUT" drives on channels the pod is not driving (bitmask, bit la-1).
|
|
81
81
|
self.inputs = 0
|
|
82
82
|
#: The statistics a power_profile reply carries (µA / mV / µJ / µC, as the firmware sends).
|
|
@@ -138,7 +138,7 @@ class FakeTransport(Transport):
|
|
|
138
138
|
return {"image": self.image, "version": 27, "features": 1 if self.image == 0 else 2}
|
|
139
139
|
return {"image": req.get("image"), "version": 27, "features": 1}
|
|
140
140
|
if cmd == "la_pins":
|
|
141
|
-
return {"pins": [self._pin(la) for la in range(1,
|
|
141
|
+
return {"pins": [self._pin(la) for la in range(1, 15)], "levels": self._levels()}
|
|
142
142
|
if cmd == "gpio":
|
|
143
143
|
return self._gpio(req)
|
|
144
144
|
if cmd == "power_profile":
|
|
@@ -152,16 +152,16 @@ class FakeTransport(Transport):
|
|
|
152
152
|
|
|
153
153
|
def _levels(self) -> int:
|
|
154
154
|
mask = self.inputs
|
|
155
|
-
for la in range(1,
|
|
155
|
+
for la in range(1, 15):
|
|
156
156
|
if self.mode[la] in ("output", "open_drain") and self.level[la] is not None:
|
|
157
157
|
mask = (mask & ~(1 << (la - 1))) | (self.level[la] << (la - 1))
|
|
158
158
|
return mask
|
|
159
159
|
|
|
160
160
|
def _gpio(self, req: dict):
|
|
161
161
|
if "mode" not in req and "level" not in req:
|
|
162
|
-
return {"levels": self._levels(), "pins": [self._pin(la) for la in range(1,
|
|
162
|
+
return {"levels": self._levels(), "pins": [self._pin(la) for la in range(1, 15)]}
|
|
163
163
|
raw = req["la"]
|
|
164
|
-
las = list(range(1,
|
|
164
|
+
las = list(range(1, 15)) if raw == "all" else (raw if isinstance(raw, list) else [raw])
|
|
165
165
|
mode = req.get("mode")
|
|
166
166
|
if mode == "off":
|
|
167
167
|
for la in las:
|
|
@@ -45,7 +45,7 @@ def _cmds(tx):
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
def la_words(pattern):
|
|
48
|
-
"""Turn ``{la: [0, 1, ...]}`` into packed
|
|
48
|
+
"""Turn ``{la: [0, 1, ...]}`` into packed 14-channel LA words."""
|
|
49
49
|
length = max(len(bits) for bits in pattern.values())
|
|
50
50
|
return [sum(bits[i] << (la - 1) for la, bits in pattern.items() if i < len(bits))
|
|
51
51
|
for i in range(length)]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{embeddedci_openhtf-2.0.0 → embeddedci_openhtf-2.0.1}/src/embeddedci_openhtf/measurements.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|