pyX2Cscope
The pyx2cscope Python package communicates with X2Cscope enabled firmwares running on microcontrollers. Focusing real time control applications like motor control and power conversion.
- It allows user to:
- Read - Write variables to the embedded target in runtime
- Record and Plot fast, continuous signals from the target firmware
- Implement Automated Unit Tests (TDD) and HIL tests for embedded development
- Record data in run-time for AI models
- Implement custom user interface, dashboards for embedded applications (QT, Tkinter, Web)
Detailed documentation is hosted at GitHub.io: https://x2cscope.github.io/pyx2cscope/
Install
pyX2Cscope currently supports Python 3.10 to 3.14.
Create a virtual environment and install pyx2cscope using the following commands (Windows):
python -m venv .venv
.venv\Scripts\activate
pip install pyx2cscope
Start GUI
To execute Qt version, type:
pyx2cscope
To execute the Browser based version type:
pyx2cscope -w
Basic scripting
from pyx2cscope.x2cscope import X2CScope
# Option 1: Default UART with Auto-detect COM port (recommended for single device)
x2c_scope = X2CScope(elf_file="path/to/firmware.elf")
# Option 2: Specify COM port explicitly
# x2c_scope = X2CScope(port="COM8", elf_file="path/to/firmware.elf")
# Or import variables after instantiation
# x2c_scope.import_variables(r"..\..\tests\data\qspin_foc_same54.elf")
# Collect some variables
speed_reference = x2c_scope.get_variable("motor.apiData.velocityReference")
speed_measured = x2c_scope.get_variable("motor.apiData.velocityMeasured")
# Read the value of the "motor.apiData.velocityMeasured" variable from the target
print(speed_measured.get_value())
# Write a new value to the "motor.apiData.velocityReference" variable on the target
speed_reference.set_value(1000)
Check Examples directory in the pyX2Cscope project to see common uses of this library.
Development
https://github.com/X2Cscope/pyx2cscope/tree/main/doc/development.md
Metadata
Release files for pyx2cscope 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyx2cscope-0.7.2.tar.gz | 146.4 kB | Without provenance | Details for pyx2cscope-0.7.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyx2cscope-0.7.2-py3-none-any.whl | Python 3 | none | any | Details for pyx2cscope-0.7.2-py3-none-any.whl |
Total release size: 287.1 kB
Release files / pyx2cscope-0.7.2.tar.gz
| Download URL | pyx2cscope-0.7.2.tar.gz |
|---|---|
| Size | 146.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71cd1a12efc3a74706cc89ca1eebf1cf6d6431543d35de7438419d0700167701
|
|
BLAKE2b-256 checksum How to use checksums |
8bca0c4fa24978521dbdf7bf9539b55d5c8732c3cbebe59813afcd72155bed78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / pyx2cscope-0.7.2-py3-none-any.whl
| Download URL | pyx2cscope-0.7.2-py3-none-any.whl |
|---|---|
| Size | 140.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c476ee0001f3030b7c9e14159ba413fe38deca51c45fba067147f80385c4b10d
|
|
BLAKE2b-256 checksum How to use checksums |
da045c1a3a352aa44fd481ac40c060e3849f2177cbf9ecaf38b18d21c372165a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Security for pyx2cscope 0.7.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.