Skip to content

Commit 3f625c3

Browse files
committed
feat(image_info): Deprecate the --version 1 output format
BREAKING CHANGE
1 parent 83613c8 commit 3f625c3

File tree

8 files changed

+229
-287
lines changed

8 files changed

+229
-287
lines changed

docs/en/advanced-topics/firmware-image-format.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,4 @@ The file is padded with zeros until its size is one byte less than a multiple of
189189
Analyzing a Binary Image
190190
------------------------
191191

192-
To analyze a binary image and get a complete summary of its headers and segments, use the :ref:`image_info <image-info>` command with the ``--version 2`` option.
192+
To analyze a binary image and get a complete summary of its headers and segments, use the :ref:`image_info <image-info>` command.

docs/en/esptool/basic-commands.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,15 +225,13 @@ By default, ``elf2image`` uses the sections in the ELF file to generate each seg
225225
Output .bin Image Details: image_info
226226
-------------------------------------
227227

228-
The ``image_info`` command outputs some information (load addresses, sizes, etc) about a ``.bin`` file created by ``elf2image``. Command also supports ``.hex`` file created by ``merge_bin`` command from supported ``.bin`` files.
229-
230-
To view more information about the image, such as set flash size, frequency and mode, or extended header information, use the ``--version 2`` option. This extended output will become the default in a future major release.
228+
The ``image_info`` command outputs some information (load addresses, segment sizes, set flash size, frequency, and mode, extended header information, etc) about a ``.bin`` file created by ``elf2image``. Command also supports ``.hex`` file created by ``merge_bin`` command from supported ``.bin`` files.
231229

232230
This information corresponds to the headers described in :ref:`image-format`.
233231

234232
::
235233

236-
esptool.py image_info --version 2 my_esp_app.bin
234+
esptool.py image_info my_esp_app.bin
237235

238236
.. only:: not esp8266
239237

docs/en/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ More Information
5151
Troubleshooting <troubleshooting>
5252
Contribute <contributing>
5353
Versions <versions>
54+
Migration Guide <migration-guide>
5455
Resources <resources>
5556
About <about>

docs/en/migration-guide.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. _migration:
2+
3+
esptool.py ``v5`` Migration Guide
4+
=================================
5+
6+
This document describes the breaking changes made to esptool.py in the major release ``v5``. It provides guidance on adapting existing workflows and scripts to ensure compatibility when updating from ``v4.*``.
7+
8+
9+
``image_info`` Output Format Change
10+
***********************************
11+
12+
The output format of the :ref:`image_info <image-info>` command has been **updated in v5**. The original format (``--version 1``) is **deprecated** and replaced by the updated format (``--version 2``). The ``--version`` argument has been **removed entirely**, and the new format is now the default and only option.
13+
14+
**Changes in the New Format:**
15+
16+
- Improved readability and structure
17+
- Additional metadata fields for better debugging and analysis
18+
- Consistent formatting for all ESP chip variants
19+
20+
**Migration Steps:**
21+
22+
1. Update any scripts or tools that parse the ``image_info`` output to use the new format
23+
2. Remove any ``--version`` arguments from ``image_info`` commands

esptool/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -402,13 +402,6 @@ def add_spi_flash_subparsers(
402402
parser_image_info.add_argument(
403403
"filename", help="Image file to parse", action=AutoHex2BinAction
404404
)
405-
parser_image_info.add_argument(
406-
"--version",
407-
"-v",
408-
help="Output format version (1 - legacy, 2 - extended)",
409-
choices=["1", "2"],
410-
default="1",
411-
)
412405

413406
parser_make_image = subparsers.add_parser(
414407
"make_image", help="Create an application image from binary files"

0 commit comments

Comments
 (0)