Skip to content

Commit

Permalink
docs(basic-commands): added note for PowerShell users for merge_bin c…
Browse files Browse the repository at this point in the history
…ommand

Closes espressif#923
  • Loading branch information
jakub-kocka authored and peterdragun committed Jul 16, 2024
1 parent ebc12d5 commit 621c8e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/en/esptool/advanced-options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ Passing ``--no-stub`` will disable certain options, as not all options are imple

Specifying Arguments via File
-----------------------------
.. _specify_arguments_via_file:

Anywhere on the esptool command line, you can specify a file name as ``@filename.txt`` to read one or more arguments from text file ``filename.txt``. Arguments can be separated by newlines or spaces, quotes can be used to enclose arguments that span multiple words. Arguments read from the text file are expanded exactly as if they had appeared in that order on the esptool command line.

An example of this is available in the :ref:`merge_bin <merge-bin>` command description.

.. note:: PowerShell users

Because of `splatting <https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_splatting?view=powershell-7.3>`__ in PowerShell (method of passing a collection of parameter values to a command as a unit) there is a need to add quotes around @filename.txt ("@filename.txt") to be correctly resolved.
2 changes: 1 addition & 1 deletion docs/en/esptool/basic-commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Will create a file ``merged-flash.bin`` with the contents of the other 3 files.
* The ``merge_bin`` command supports the same ``--flash_mode``, ``--flash_size`` and ``--flash_freq`` options as the ``write_flash`` command to override the bootloader flash header (see above for details).
These options are applied to the output file contents in the same way as when writing to flash. Make sure to pass the ``--chip`` parameter if using these options, as the supported values and the bootloader offset both depend on the chip.
* The ``--format`` option will change the format of the output file. For more information about formats see formats description below.
* It is possible to append options from a text file with ``@filename``. As an example, this can be conveniently used with the ESP-IDF build system, which produces a ``flash_args`` file in the build directory of a project:
* It is possible to append options from a text file with ``@filename`` (see the advanced options page :ref:`Specifying Arguments via File <specify_arguments_via_file>` section for details). As an example, this can be conveniently used with the ESP-IDF build system, which produces a ``flash_args`` file in the build directory of a project:

.. code:: sh
Expand Down

0 comments on commit 621c8e1

Please sign in to comment.