User Tools

Site Tools


esp:esp32:flash-commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
esp:esp32:flash-commands [2026/08/29 13:24] – [Flash Application Partition] oscaresp:esp32:flash-commands [2026/09/12 10:25] (current) – oscar
Line 1: Line 1:
-====== Flash Commands ====== +# Flash Commands
 ---- ----
-===== Core tools =====+## Core tools
 Esp-idf commands can be executed using: Esp-idf commands can be executed using:
-  * **python**, Located in: ///esp32/idf-tools/python_env/idf5.2_py3.11_env/bin/python// +  * **idf.py**, Located in: ./esp32/esp-idf/tools/idf.py/ 
-  * **idf.py**, Located in: ///esp32/esp-idf/tools/idf.py// +  * **python**, Located in: ./esp32/idf-tools/python_env/idf6.1_py3.13_env/bin/python 
-  * **esptool.py**, Located in: ///esp32/idf-tools/python_env/idf5.2_py3.11_env/bin/esptool.py//+  * **esptool**, Located in: ./esp32/idf-tools/python_env/idf6.1_py3.13_env/bin/esptool
  
 **idf.py** to be invoked as: **idf.py** to be invoked as:
-<code>+```
 $ idf.py <parameters> $ idf.py <parameters>
-</code> +``` 
- +**esptool** can be invoked in different ways: 
-**esptool.py** can be invoked in different ways: +```
-<code>+
 $ esptool <parameters> $ esptool <parameters>
 $ python -m esptool <parameters> $ python -m esptool <parameters>
-</code> +``` 
- +## Full Flash 
-===== Full Flash ===== +```
-<code>+
 idf.py -p /dev/ttyACM0 flash idf.py -p /dev/ttyACM0 flash
-python -m esptool --chip esp32c3 -p /dev/ttyACM0 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0xd000 build/ota_data_initial.bin 0x10000 build/LCR-Meter.bin 0x250000 default.config +python -m esptool --chip esp32c3 -p /dev/ttyACM0 -b 460800 --before default-reset --after hard-reset write-flash --flash_mode dio --flash_size 4MB --flash-freq 80m 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0xd000 build/ota_data-initial.bin 0x10000 build/LCR-Meter.bin 0x250000 default.config 
-</code> +``` 
-===== Flash Application Partition =====+Where parameters are:  
 +  * write_flash 
 +  * -chip **esp32c3** or **esp32** 
 +  * -p **/dev/ttyACM0** or **/dev/ttyUSB0** 
 +  * -b **460800** 
 +  * --before default_reset 
 +  * --after hard_reset 
 +  * --flash-mode dio 
 +  * --flash-size **detect** or 4MB 
 +  * --flash-freq **80m** or 40m 
 +  * partition 1 = 0x0 build/bootloader/bootloader.bin  
 +  * partition 2 = 0x8000 build/partition_table/partition-table.bin  
 +  * partition 3 = 0xd000 build/ota_data_initial.bin  
 +  * partition 4 = 0x10000 build/LCR-Meter.bin  
 +## Flash Application Partition
 Use following examples to write to flash: Use following examples to write to flash:
-<code> +``` 
-esptool.py -chip esp32c3 -p /dev/ttyACM0 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x10000 build/ESR-Meter.bin+esptool -chip esp32c3 -p /dev/ttyACM0 -b 460800 --before default-reset --after hard-reset write-flash --flash-mode dio --flash-size detect --flash-freq 80m 0x10000 build/ESR-Meter.bin
  
-python -m esptool --chip esp32c3 -p /dev/ttyACM0 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x10000 build/ESR-Meter.bin+python -m esptool --chip esp32c3 -p /dev/ttyACM0 -b 460800 --before default_reset --after hard-reset write-flash --flash-mode dio --flash-size 4MB --flash_freq 80m 0x10000 build/ESR-Meter.bin
  
-python ../../esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyUSB0 -b 460800 --before default_reset --after hard_reset --chip esp32  write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x00130000 build/thermometer.bin +python ../../esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyUSB0 -b 460800 --before default-reset --after hard-reset --chip esp32  write-flash --flash_mode dio --flash-size detect --flash-freq 40m 0x00130000 build/thermometer.bin 
-</code>+```
  
 Where parameters are: Where parameters are:
   * write_flash    * write_flash 
-  * -chip esp32c3 +  * -chip **esp32c3** or **esp32** 
-  * -p /dev/ttyACM0 or /dev/ttyUSB0 +  * -p **/dev/ttyACM0** or **/dev/ttyUSB0** 
-  * -b 460800 +  * -b **460800** 
   * --before default_reset    * --before default_reset 
-  * --after hard_reset  +  * --after hard-reset  
-  * --flash_mode dio  +  * --flash-mode **dio**  
-  * --flash_size 4MB or --flash_size detect +  * --flash-size **detect** or 4MB 
-  * --flash_freq 80m or 40m+  * --flash-freq **80m** or 40m
   * 0x10000 build/ESR-Meter.bin   * 0x10000 build/ESR-Meter.bin
-===== Flash Config Partition ===== +## Flash Config Partition ===== 
-=== Write Config to partition === +### Write Config to partition === 
-  esptool.py --port /dev/ttyACM0  write_flash --flash_mode qio  0x250000 default.config +  esptool --port /dev/ttyACM0  write-flash --flash-mode qio  0x250000 default.config 
-=== Read CONFIG from partition === +### Read CONFIG from partition === 
-  esptool.py --port /dev/ttyACM0 -b 460800 --before default_reset --chip esp32c3  read_flash 0x250000 4096 downloaded.config +  esptool --port /dev/ttyACM0 -b 460800 --before default-reset --chip esp32c3 read-flash 0x250000 4096 downloaded.config
  
  
esp/esp32/flash-commands.1788009845.txt.gz · Last modified: by oscar