mirror of
https://github.com/espressif/esptool.git
synced 2025-10-15 04:14:48 +08:00
docs: Add instructions on how to update
This commit is contained in:

committed by
Radim Karniš

parent
bec1865fde
commit
d4488513e9
2
.github/ISSUE_TEMPLATE/bug-report-no-hw.yml
vendored
2
.github/ISSUE_TEMPLATE/bug-report-no-hw.yml
vendored
@@ -14,7 +14,7 @@ body:
|
||||
id: version
|
||||
attributes:
|
||||
label: Esptool Version
|
||||
description: The output of `git describe` if working with the sources, output of `esptool.py version` otherwise. If possible, consider updating esptool.
|
||||
description: The output of `git describe` if working with the sources, output of `esptool.py version` otherwise. If possible, consider [updating esptool](https://docs.espressif.com/projects/esptool/en/latest/installation.html#how-to-update).
|
||||
placeholder: ex. v4.0.1, commit v4.1-10-g2059335aa
|
||||
validations:
|
||||
required: true
|
||||
|
2
.github/ISSUE_TEMPLATE/issue-with-hw.yml
vendored
2
.github/ISSUE_TEMPLATE/issue-with-hw.yml
vendored
@@ -21,7 +21,7 @@ body:
|
||||
id: version
|
||||
attributes:
|
||||
label: Esptool Version
|
||||
description: The output of `git describe` if working with the sources, output of `esptool.py version` otherwise. If possible, consider updating esptool.
|
||||
description: The output of `git describe` if working with the sources, output of `esptool.py version` otherwise. If possible, consider [updating esptool](https://docs.espressif.com/projects/esptool/en/latest/installation.html#how-to-update).
|
||||
placeholder: ex. v4.0.1, commit v4.1-10-g2059335aa
|
||||
validations:
|
||||
required: true
|
||||
|
@@ -1,3 +1,5 @@
|
||||
.. _flashing:
|
||||
|
||||
Flashing Firmware
|
||||
=================
|
||||
|
||||
|
@@ -1,8 +1,14 @@
|
||||
.. _installation:
|
||||
|
||||
Installation and Dependencies
|
||||
=============================
|
||||
|
||||
.. _installation:
|
||||
|
||||
How to Install
|
||||
--------------
|
||||
|
||||
Global Installation
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
You will need `Python 3.7 or newer <https://www.python.org/downloads/>`_ installed on your system to use the latest version of ``esptool.py``.
|
||||
If your use case requires Python 2.7, 3.4, 3.5, or 3.6, please use ``esptool.py`` v3.3.* instead.
|
||||
|
||||
@@ -21,3 +27,44 @@ After installing, you will have ``esptool.py`` installed into the default Python
|
||||
.. note::
|
||||
|
||||
If you actually plan to do development work with esptool itself, see :ref:`development-setup` for more information.
|
||||
|
||||
Virtual Environment Installation
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To ensure that ``esptool.py`` is used in isolation, and any changes made during its usage won't affect other Python environments or SDK installations, it is advised to install it in a virtual environment and use it directly if possible (more information in the :ref:`flashing` article).
|
||||
|
||||
Creating a virtual environment (venv) is a good practice. This is particularly helpful for users who may be concerned about interfering with existing installations (e.g. in an environment of a development-setup framework). Here's a quick guide:
|
||||
|
||||
- Create a virtual environment and choose its name, e.g. 'esptoolenv': ``python -m venv esptoolenv``
|
||||
- Activate the virtual environment:
|
||||
|
||||
- On Windows: ``esptoolenv\Scripts\activate``
|
||||
- On Linux or MacOS: ``source esptoolenv/bin/activate``
|
||||
|
||||
- Install the latest ``esptool.py`` version within the active virtual environment: ``pip install esptool``
|
||||
- You can now use it within this virtual environment without affecting your system-wide installations: ``esptool.py <command>``
|
||||
- When you're done using ``esptool.py``, deactivate the virtual environment: ``deactivate``. The environment can be reused by activating it again.
|
||||
- If you no longer need the virtual environment, you can remove it by deleting the ``esptoolenv`` directory.
|
||||
|
||||
How to Update
|
||||
-------------
|
||||
|
||||
Standalone
|
||||
^^^^^^^^^^
|
||||
|
||||
If you are using ``esptool.py`` as a standalone tool (as a global installation or in a virtual environment), updating to the latest version released on the `PyPI <https://pypi.org/project/esptool/>`_ index is simple:
|
||||
|
||||
::
|
||||
|
||||
$ pip install --upgrade esptool
|
||||
|
||||
As a Component
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
If ``esptool.py`` is installed as a component of a development framework (e.g. `ESP-IDF <https://docs.espressif.com/projects/esp-idf/>`_, `Arduino <https://docs.espressif.com/projects/arduino-esp32/>`_, or `PlatformIO <https://docs.platformio.org/en/latest/platforms/espressif32.html>`_), it is advised to follow the update guide of used framework for instructions and not to update the tool directly.
|
||||
|
||||
If updating directly is unavoidable, make sure you update to a compatible version by staying on the same MAJOR version number (explaned in the :ref:`versions` article). For instance, if your currently installed ``esptool.py`` is ``v3.3.1``, only update to ``v3.*.*``. You risk introducing incompatible changes by updating to ``v4.*.*`` or higher.
|
||||
|
||||
::
|
||||
|
||||
$ pip install esptool==3.3.2
|
||||
|
Reference in New Issue
Block a user