Skip to content

Commit 3ccd4ce

Browse files
committed
Merge branch 'feat/standalone_usage' into 'master'
Document standalone usage Closes IDF-12687 See merge request espressif/esp-idf-monitor!97
2 parents d4af3ef + fb1fcb9 commit 3ccd4ce

File tree

2 files changed

+44
-7
lines changed

2 files changed

+44
-7
lines changed

README.md

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Espressif IDF Monitor
22

3-
The ```esp-idf-monitor``` is a Python-based, open-source package that is part of the [ESP-IDF](https://github.com/espressif/esp-idf) SDK for Espressif products.
3+
The `esp-idf-monitor` is a Python-based, open-source package that is part of the [ESP-IDF](https://github.com/espressif/esp-idf) SDK or can be used as a standalond tool for monitoring of Espressif microcontrollers.
44

55
The main responsibility of the IDF Monitor is serial communication input and output in ESP-IDF projects.
66

@@ -11,13 +11,47 @@ Other advanced topics like configuration file will be described in the following
1111

1212
### Table of Contents
1313

14+
- [Installation](#installation)
15+
- [Usage](#usage)
1416
- [Configuration File](#configuration-file)
1517
- [File Location](#file-location)
1618
- [Configuration Options](#configuration-options)
1719
- [Custom Reset Sequence](#custom-reset-sequence)
1820
- [Share Configuration Across Tools](#share-configuration-across-tools)
1921
- [Syntax](#syntax)
2022

23+
## Installation
24+
25+
You can install the project with your favorite package manager, but for standalone installations it is recommended to use [uv](https://docs.astral.sh/uv/) or [pipx](https://pipx.pypa.io/stable/). Using one of the following commands:
26+
27+
```sh
28+
uv install esp-idf-monitor
29+
```
30+
31+
or
32+
33+
```sh
34+
pipx install esp-idf-monitor
35+
```
36+
37+
These will install an `idf-monitor` executable for the current user without requiring administrator privileges.
38+
39+
## Usage
40+
41+
Usually IDF Monitor is run within ESP-IDF environment, which prefills a lot of arguments for features such as address decoding. However, IDF Monitor can work as standalone tool as well. For the standalone mode run:
42+
43+
```sh
44+
idf-monitor
45+
```
46+
47+
or
48+
49+
```sh
50+
python -m esp_idf_monitor
51+
```
52+
53+
For all parameters and their function please see `idf-monitor --help`.
54+
2155
## Configuration File
2256

2357
`esp-idf-monitor` is using [C0 control codes](https://en.wikipedia.org/wiki/C0_and_C1_control_codes) to interact with the console. Characters from the config file are converted to their C0 control codes. Available characters include the English alphabet (A-Z) and special symbols: `[`, `]`, `\`, `^`, `_`.
@@ -27,7 +61,7 @@ Other advanced topics like configuration file will be described in the following
2761
2862
### File Location
2963

30-
The default name for a configuration file is `esp-idf-monitor.cfg`. First, the same directory `esp-idf-monitor` is being run if is inspected.
64+
The default name for a configuration file is `esp-idf-monitor.cfg`. First, the same directory where `esp-idf-monitor` is being run is inspected.
3165

3266
If a configuration file is not found here, the current user's OS configuration directory is inspected next:
3367

@@ -90,7 +124,7 @@ Example:
90124
custom_reset_sequence = U0,1|W0.1|D1|R0|W0.5|D0
91125
```
92126

93-
Refer to [custom reset sequence](https://docs.espressif.com/projects/esptool/en/latest/esptool/configuration-file.html#custom-reset-sequence) from Esptool documentation for further details. Please note that ``custom_reset_sequence`` is the only used value from the Esptool configuration, and others will be ignored in IDF Monitor.
127+
Refer to [custom reset sequence](https://docs.espressif.com/projects/esptool/en/latest/esptool/configuration-file.html#custom-reset-sequence) from Esptool documentation for further details. Please note that `custom_reset_sequence` is the only used value from the Esptool configuration, and others will be ignored in IDF Monitor.
94128

95129
##### Share Configuration Across Tools
96130

@@ -136,28 +170,28 @@ skip_menu_key = False
136170

137171
### Code Style & Static Analysis
138172

139-
Please follow these coding standards when writing code for ``esp-idf-monitor``:
173+
Please follow these coding standards when writing code for `esp-idf-monitor`:
140174

141175
#### Pre-commit Checks
142176

143177
[pre-commit](https://pre-commit.com/) is a framework for managing pre-commit hooks. These hooks help to identify simple issues before committing code for review.
144178

145-
To use the tool, first install ``pre-commit``. Then enable the ``pre-commit`` and ``commit-msg`` git hooks:
179+
To use the tool, first install `pre-commit`. Then enable the `pre-commit` and `commit-msg` git hooks:
146180

147181
```sh
148182
python -m pip install pre-commit
149183
pre-commit install -t pre-commit -t commit-msg
150184
```
151185

152-
On the first commit ``pre-commit`` will install the hooks, subsequent checks will be significantly faster. If an error is found an appropriate error message will be displayed.
186+
On the first commit `pre-commit` will install the hooks, subsequent checks will be significantly faster. If an error is found an appropriate error message will be displayed.
153187

154188
##### Codespell Check
155189

156190
This repository utilizes an automatic [spell checker](https://github.com/codespell-project/codespell) integrated into the pre-commit process. If any spelling issues are detected, the recommended corrections will be applied automatically to the file, ready for commit. In the event of false positives, you can adjust the configuration in the `pyproject.toml` file under the `[tool.codespell]` section. To exclude files from the spell check, utilize the `skip` keyword followed by comma-separated paths to the files (wildcards are supported). Additionally, to exclude specific words from the spell check, employ the `ignore-words-list` keyword followed by comma-separated words to be skipped.
157191

158192
#### Conventional Commits
159193

160-
``esp-idf-monitor`` complies with the [Conventional Commits standard](https://www.conventionalcommits.org/en/v1.0.0/#specification). Every commit message is checked with [Conventional Precommit Linter](https://github.com/espressif/conventional-precommit-linter), ensuring it adheres to the standard.
194+
`esp-idf-monitor` complies with the [Conventional Commits standard](https://www.conventionalcommits.org/en/v1.0.0/#specification). Every commit message is checked with [Conventional Precommit Linter](https://github.com/espressif/conventional-precommit-linter), ensuring it adheres to the standard.
161195

162196
## License
163197

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ dependencies = [
3434
"pyelftools",
3535
]
3636

37+
[project.scripts]
38+
idf-monitor = "esp_idf_monitor.idf_monitor:main"
39+
3740
[project.readme]
3841
file = "README.md"
3942
content-type = "text/markdown"

0 commit comments

Comments
 (0)