Skip to content

Commit d4f5479

Browse files
committed
update doc
1 parent 210e73c commit d4f5479

File tree

8 files changed

+84
-121
lines changed

8 files changed

+84
-121
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The pyx2cscope Python package communicates with X2Cscope enabled firmwares runni
1111
- Record data in run-time for AI models
1212
- Implement custom user interface, dashboards for embedded applications (QT, Tkinter, Web)
1313

14-
Dor detailed documentation is hosted at GitHub.io:
14+
Detailed documentation is hosted at GitHub.io:
1515
[https://x2cscope.github.io/pyx2cscope/](https://x2cscope.github.io/pyx2cscope/)
1616

1717
## Install

doc/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,7 @@
8080
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
8181

8282
html_theme = "sphinx_rtd_theme"
83+
84+
html_theme_options = {
85+
'navigation_depth': 4,
86+
}

doc/development.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pip install -r requirements.txt
3535
pip install -r quality.txt
3636
```
3737

38-
## Runnin tests
38+
## Running tests
3939

4040
### ruff syntax check
4141
```bash
@@ -55,11 +55,4 @@ sphinx-build -M html doc build --keep-going
5555
## Creating executables
5656
```bash
5757
pyinstaller --noconfirm .\pyx2cscope_win.spec
58-
```
59-
60-
61-
Devcontainer
62-
docker folder contains devcontainer environment.
63-
.devcontainer is VSCode devcontainer environment
64-
Support
65-
commercial support is available through www.roxautomation.com
58+
```

doc/how_to.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

doc/index.rst

Lines changed: 7 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
.. image:: images/pyx2cscope_logo.png
42
:width: 180
53
:alt: pyx2cscope
@@ -28,105 +26,21 @@ It allows user to:
2826
:alt: MCU<->PC
2927
:align: center
3028

31-
Installation
32-
============
33-
34-
Create a virtual environment and install pyx2cscope using the following commands (Windows):
35-
36-
.. code-block:: python
37-
38-
python -m venv .venv
39-
.venv\Scripts\activate
40-
pip install pyx2cscope
41-
42-
43-
It is highly recommended to install python libraries underneath a virtual environment.
44-
45-
Nevertheless, to install at system level, we advise to install it on user area. (Global insallation may not work.)
46-
Execute the following lines:
47-
48-
.. code-block:: python
49-
50-
pip install --user pyx2cscope
51-
52-
.. code-block:: python
53-
54-
pip install --upgrade pyx2cscope
55-
56-
In case of unexpected issues executing pyx2cscope try to reinstall manually:
57-
58-
.. code-block:: python
59-
60-
pip uninstall pyx2cscope
61-
pip cache purge
62-
pip install --user pyx2cscope
63-
64-
65-
After install you may check the current pyx2cscope version, in a terminal, run the following command:
66-
67-
.. code-block:: python
68-
69-
pyx2cscope --version
70-
71-
For help or additional command line options, type:
72-
73-
.. code-block:: bash
74-
75-
pyx2cscope --help
76-
77-
The log level used by pyX2Cscope is ERROR by default, possible values are
78-
DEBUG, INFO, WARNING, ERROR, and CRITICAL. To set a different log level start
79-
pyX2Cscope with argument **-l** or **--log-level**
80-
81-
.. code-block:: bash
82-
83-
pyx2cscope --log-level DEBUG
84-
85-
Usage
86-
-----
87-
88-
You may try pyX2Cscope either as an API to read and write values from/to variables in a running Microchip
89-
microcontroller, or as a Graphical User Interface (GUI), or both.
90-
91-
The GUI interface
92-
~~~~~~~~~~~~~~~~~
93-
94-
There are currently two implementations, one based on Qt and one Browser based. These GUIs are more examples
95-
on how to implement your own custom interfaces than an official user interface.
96-
97-
To execute Qt version, type:
98-
99-
.. code-block:: bash
100-
101-
pyx2cscope
102-
103-
To execute the Browser based version type:
104-
105-
.. code-block:: bash
106-
107-
pyx2cscope -w
108-
109-
110-
The API interface
111-
~~~~~~~~~~~~~~~~~
112-
113-
The API interface is managed over the X2CScope class.
114-
The simplest example of the API is depicted below:
115-
116-
.. literalinclude:: ../pyx2cscope/examples/simplest.py
117-
:language: python
118-
:linenos:
11929

120-
Following you will find specific information on the API, GUIs, and Firmware implementation.
30+
Following you will find specific information about Installation, API, GUIs, and Firmware implementation.
12131
See the section examples to check some of the usages you may get by pyX2Cscope.
12232

12333
.. toctree::
124-
:maxdepth: 3
34+
:maxdepth: 1
12535
:caption: Contents:
12636

127-
how_to
37+
install.rst
38+
scripting.rst
39+
gui_qt.md
40+
gui_web.md
12841
FW_Support
12942
example
43+
development.md
13044

13145
Indices and tables
13246
==================

doc/install.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Installation
2+
============
3+
4+
Create a virtual environment and install pyx2cscope using the following commands (Windows):
5+
6+
.. code-block:: python
7+
8+
python -m venv .venv
9+
.venv\Scripts\activate
10+
pip install pyx2cscope
11+
12+
13+
It is highly recommended to install python libraries underneath a virtual environment.
14+
15+
Nevertheless, to install at system level, we advise to install it on user area. (Global insallation may not work.)
16+
Execute the following lines:
17+
18+
.. code-block:: python
19+
20+
pip install --user pyx2cscope
21+
22+
.. code-block:: python
23+
24+
pip install --upgrade pyx2cscope
25+
26+
In case of unexpected issues executing pyx2cscope try to reinstall manually:
27+
28+
.. code-block:: python
29+
30+
pip uninstall pyx2cscope
31+
pip cache purge
32+
pip install --user pyx2cscope
33+
34+
35+
After install you may check the current pyx2cscope version, in a terminal, run the following command:
36+
37+
.. code-block:: python
38+
39+
pyx2cscope --version
40+
41+
For help or additional command line options, type:
42+
43+
.. code-block:: bash
44+
45+
pyx2cscope --help
46+
47+
The log level used by pyX2Cscope is ERROR by default, possible values are
48+
DEBUG, INFO, WARNING, ERROR, and CRITICAL. To set a different log level start
49+
pyX2Cscope with argument **-l** or **--log-level**
50+
51+
.. code-block:: bash
52+
53+
pyx2cscope --log-level DEBUG

doc/scripting.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
Scripting
2-
=========
1+
API Interface
2+
=============
3+
4+
5+
The API interface is managed over the X2CScope class.
6+
7+
Simplest example
8+
----------------
9+
10+
.. literalinclude:: ../pyx2cscope/examples/simplest.py
11+
:language: python
12+
:linenos:
13+
14+
Further examples in the repository: https://github.com/X2Cscope/pyx2cscope/tree/main/pyx2cscope/examples
315

4-
Once you have successfully installed pyX2Cscope into your environment or python project,
5-
start importing the X2CScope class. So you be able to read and write values from/to variables
6-
inside the controller. Follow the steps below to get your script running.
716

817
X2CScope class
918
--------------

pyx2cscope/parser/elf16_parser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
"""ELF16 Parser for Microchip's XC16 Compiler.
1+
"""(Deprecated) ELF16 Parser for Microchip's XC16 Compiler.
2+
3+
This module is deprecated and will be removed in future versions.
24
35
This module defines the `Elf16Parser` class for parsing ELF files generated by Microchip's XC16 compiler.
46
The parser extracts useful information about variables defined in the compiled program.

0 commit comments

Comments
 (0)