You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/espefuse/index.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ Optional General Arguments Of Commands
51
51
- ``--chip``, ``-c`` - Target chip type. If this argument is omitted, the tool automatically detects the chip type when connected. But if the command has a help option, the chip is not connected, and the default chip is ``esp32``, please specify the specific type of chip to get the correct help. Example of usage: ``-c esp32``, ``-c esp32c3``, ``-c esp32s2`` and others.
52
52
- ``--baud``, ``-b`` - Serial port baud rate, the same as for esptool.
53
53
- ``--port``, ``-p`` - Serial port device, for example: ``-p /dev/ttyUSB0`` (Linux and macOS) or ``-p COM1`` (Windows).
54
-
- ``--before`` - What to do before connecting to the chip: ``default_reset``, ``no_reset``, ``esp32r1``, ``no_reset_no_sync``.
54
+
- ``--before`` - What to do before connecting to the chip: ``default-reset``, ``no-reset``, ``esp32r1``, ``no-reset-no-sync``.
55
55
- ``--debug``, ``-d`` - Show debugging information.
56
56
- ``--virt`` - For host tests. The tool will work in the virtual mode (without connecting to a chip).
57
57
- ``--path-efuse-file`` - For host tests. Use it together with ``--virt`` option. The tool will work in the virtual mode (without connecting to a chip) and save eFuse memory to a given file. If the file does not exists the tool creates it. To reset written eFuses just delete the file. Usage: ``--path-efuse-file efuse_memory.bin``.
Copy file name to clipboardExpand all lines: docs/en/esptool/advanced-options.rst
+10-10
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
Advanced Options
4
4
================
5
5
6
-
The following advanced global configuration options can be used for all esptool commands. They are placed before the command name on the command line. For example, the option ``--before no_reset`` has to be placed before ``flash-id``. The command should look like this: ``esptool.py --before no_reset flash-id``.
6
+
The following advanced global configuration options can be used for all esptool commands. They are placed before the command name on the command line. For example, the option ``--before no-reset`` has to be placed before ``flash-id``. The command should look like this: ``esptool.py --before no-reset flash-id``.
7
7
8
8
For basic/fundamental global configuration options, see the :ref:`options` page.
9
9
@@ -19,10 +19,10 @@ The ``--before`` argument allows you to specify whether the chip needs resetting
19
19
20
20
.. list::
21
21
22
-
* ``--before default_reset`` is the default, which uses DTR & RTS serial control lines (see :ref:`entering-the-bootloader`) to try to reset the chip into bootloader mode.
23
-
* ``--before no_reset`` will skip DTR/RTS control signal assignments and just start sending a serial synchronisation command to the chip. This is useful if your chip doesn't have DTR/RTS, or for some serial interfaces (like Arduino board onboard serial) which behave differently when DTR/RTS are toggled.
24
-
* ``--before no_reset_no_sync`` will skip DTR/RTS control signal assignments and skip also the serial synchronization command. This is useful if your chip is already running the :ref:`stub bootloader <stub>` and you want to avoid resetting the chip and uploading the stub again.
25
-
:esp32c3 or esp32s3 or esp32c6 or esp32h2 or esp32p4 or esp32c5 or esp32c61: * ``--before usb_reset`` will use custom reset sequence for USB-JTAG-Serial (used for example for ESP chips connected through the USB-JTAG-Serial peripheral). Usually, this option doesn't have to be used directly. Esptool should be able to detect connection through USB-JTAG-Serial.
22
+
* ``--before default-reset`` is the default, which uses DTR & RTS serial control lines (see :ref:`entering-the-bootloader`) to try to reset the chip into bootloader mode.
23
+
* ``--before no-reset`` will skip DTR/RTS control signal assignments and just start sending a serial synchronisation command to the chip. This is useful if your chip doesn't have DTR/RTS, or for some serial interfaces (like Arduino board onboard serial) which behave differently when DTR/RTS are toggled.
24
+
* ``--before no-reset-no-sync`` will skip DTR/RTS control signal assignments and skip also the serial synchronization command. This is useful if your chip is already running the :ref:`stub bootloader <stub>` and you want to avoid resetting the chip and uploading the stub again.
25
+
:esp32c3 or esp32s3 or esp32c6 or esp32h2 or esp32p4 or esp32c5 or esp32c61: * ``--before usb-reset`` will use custom reset sequence for USB-JTAG-Serial (used for example for ESP chips connected through the USB-JTAG-Serial peripheral). Usually, this option doesn't have to be used directly. Esptool should be able to detect connection through USB-JTAG-Serial.
26
26
27
27
Reset After Operation: ``--after``
28
28
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -31,11 +31,11 @@ The ``--after`` argument allows you to specify whether the chip should be reset
31
31
32
32
.. list::
33
33
34
-
* ``--after hard_reset`` is the default. The RTS serial control line is used to reset the chip into a normal boot sequence.
35
-
:esp8266: * ``--after soft_reset`` runs the user firmware, but any subsequent reset will return to the serial bootloader. This was the reset behaviour in esptool v1.x.
36
-
* ``--after no_reset`` leaves the chip in the serial bootloader, no reset is performed.
37
-
* ``--after no_reset_stub`` leaves the chip in the stub bootloader, no reset is performed.
38
-
:not esp8266 and not esp32 and not esp32h2 and not esp32c6: * ``--after watchdog_reset`` hard-resets the chip by triggering an internal watchdog reset. This is useful when the RTS control line is not available, especially in the USB-OTG and USB-Serial/JTAG modes. Use this if a chip is getting stuck in download mode when using the default reset method in USB-Serial/JTAG mode. Using this may cause the port to re-enumerate on Linux (e.g. ``/dev/ttyACM0`` -> ``/dev/ttyACM1``).
34
+
* ``--after hard-reset`` is the default. The RTS serial control line is used to reset the chip into a normal boot sequence.
35
+
:esp8266: * ``--after soft-reset`` runs the user firmware, but any subsequent reset will return to the serial bootloader. This was the reset behaviour in esptool v1.x.
36
+
* ``--after no-reset`` leaves the chip in the serial bootloader, no reset is performed.
37
+
* ``--after no-reset-stub`` leaves the chip in the stub bootloader, no reset is performed.
38
+
:not esp8266 and not esp32 and not esp32h2 and not esp32c6: * ``--after watchdog-reset`` hard-resets the chip by triggering an internal watchdog reset. This is useful when the RTS control line is not available, especially in the USB-OTG and USB-Serial/JTAG modes. Use this if a chip is getting stuck in download mode when using the default reset method in USB-Serial/JTAG mode. Using this may cause the port to re-enumerate on Linux (e.g. ``/dev/ttyACM0`` -> ``/dev/ttyACM1``).
Copy file name to clipboardExpand all lines: docs/en/esptool/scripting.rst
+2-2
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ This example demonstrates writing two binary files using high-level commands:
52
52
attach_flash(esp) # Attach the flash memory chip, required for flash operations
53
53
withopen(BOOTLOADER, "rb") as bl_file, open(FIRMWARE, "rb") as fw_file:
54
54
write_flash(esp, [(0, bl_file), (0x1000, fw_file)]) # Write the binary files
55
-
reset_chip(esp, "hard_reset") # Reset the chip
55
+
reset_chip(esp, "hard-reset") # Reset the chip
56
56
57
57
- The ``esp`` object has to be replaced with the stub flasher object returned by ``run_stub(esp)`` when the stub flasher is activated. This step can be skipped if the stub flasher is not needed.
58
58
- Running ``attach_flash(esp)`` is required for any flash-memory-related operations to work.
@@ -90,7 +90,7 @@ The following example demonstrates running a series of flash memory operations i
90
90
write_flash(esp, [(0, bl_file), (0x1000, fw_file)]) # Write the binary files
91
91
verify_flash(esp, [(0, bl_file), (0x1000, fw_file)]) # Verify the written data
92
92
read_flash(esp, 0x0, 0x2400, "output.bin") # Read the flash memory into a file
93
-
reset_chip(esp, "hard_reset") # Reset the chip
93
+
reset_chip(esp, "hard-reset") # Reset the chip
94
94
95
95
- This example doesn't use ``detect_chip()``, but instantiates a ``ESP32ROM`` class directly. This is useful when you know the target chip in advance. In this scenario ``esp.connect()`` is required to establish a connection with the device.
96
96
- Multiple operations can be chained together in a single context manager block.
Copy file name to clipboardExpand all lines: docs/en/migration-guide.rst
+23
Original file line number
Diff line number
Diff line change
@@ -215,6 +215,17 @@ A significant amount of changes have been made to the log styling and formatting
215
215
1. Make sure to adjust any of your scripts, asserts, CI workflows, or others to accommodate the new/changed format of messages. If you are parsing the log output (not recommended), consider importing esptool as a module and using the public API (see :ref:`here <scripting>`) to get the information you need.
216
216
217
217
218
+
Reset Mode Renaming
219
+
###################
220
+
221
+
Choices for the ``--before`` and ``--after`` options have been renamed to use ``-`` instead of ``_`` as a separator (e.g., ``default_reset`` -> ``default-reset``).
222
+
223
+
224
+
**Migration Steps:**
225
+
226
+
1. Replace all underscores in the ``--before`` and ``--after`` options with ``-`` in your scripts.
227
+
228
+
218
229
espsecure.py ``v5`` Migration Guide
219
230
***********************************
220
231
@@ -261,3 +272,15 @@ The public API of ``espsecure.py`` has been updated to provide a more consistent
261
272
or if you were mocking the args object, now you don't have to do that and you can pass parameters directly to the function like:
262
273
``sign_data(data=data, key=key, ...)``.
263
274
2. Replace the ``custom_commandline`` parameter with ``argv`` in the ``main`` function call.
275
+
276
+
espefuse.py ``v5`` Migration Guide
277
+
***********************************
278
+
279
+
Reset Mode Renaming
280
+
###################
281
+
282
+
Choices for the ``--before`` option have been renamed to use ``-`` instead of ``_`` as a separator (e.g., ``default_reset`` -> ``default-reset``).
283
+
284
+
**Migration Steps:**
285
+
286
+
1. Replace all underscores in the ``--before`` option with ``-`` in your scripts.
0 commit comments