feat(idf_py): idf.py flash will reflash only changed data sectors by default

idf.py flash -a is introduced to trigger a flash of all data (not just changed sectors).
This commit is contained in:
Radim Karniš
2026-04-02 10:59:30 +02:00
parent c62515671d
commit 38d37e5e9f
9 changed files with 240 additions and 29 deletions
@@ -7,3 +7,4 @@ Migration from 6.0 to 6.1
:maxdepth: 1
peripherals
tools
@@ -0,0 +1,13 @@
Tools
=====
:link_to_translation:`zh_CN:[中文]`
``idf.py flash`` default behavior (fast reflash)
------------------------------------------------
The default behavior of ``idf.py flash`` has changed. When ``*_flashed.bin`` files exist in the build directory (e.g. from a previous successful flash), ``idf.py flash`` now performs **fast reflashing**: it only writes the flash regions that changed, which speeds up repeated flashing during development. After flashing, it verifies that the device flash content matches the expected binaries; if verification fails, a full flash is performed.
If you prefer the previous behavior where all binaries are always written in full (regardless of existing ``*_flashed.bin`` files), you can force a complete flash by using the full flash mode: run ``idf.py flash -a`` or ``idf.py flash --all``. This ensures that every binary is re-written to the device, which is recommended when working with brand-new, empty, or erased chips, or whenever you want to disable fast reflash and incremental flashing.
For more details, see :ref:`flash-with-idf-py` in the *IDF Python Tools* guide.