espressif / esptool

Espressif SoC serial bootloader utility
https://docs.espressif.com/projects/esptool
GNU General Public License v2.0
5.6k stars 1.39k forks source link

Compile error merge_bin invalid choice (ESPTOOL-726) #909

Closed jackkitley closed 1 year ago

jackkitley commented 1 year ago

Operating System

MacOS Ventura

Esptool Version

4.6.2

Python Version

3.11.4

Full Esptool Command Line that Was Run

esphome light2.yaml compile

Esptool Output

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - framework-espidf @ 3.40405.230623 (4.4.5)
 - tool-cmake @ 3.16.4
 - tool-ninja @ 1.9.0
 - toolchain-esp32ulp @ 2.35.0-20220830
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Reading CMake configuration...
Dependency Graph
|-- noise-c @ 0.1.4
Linking .pioenvs/jack-lamp/firmware.elf
RAM:   [=         ]   8.1% (used 26616 bytes from 327680 bytes)
Flash: [=====     ]  45.1% (used 826833 bytes from 1835008 bytes)
Building .pioenvs/jack-lamp/firmware.bin
Creating esp32 image...
Successfully created esp32 image.
esp32_create_combined_bin([".pioenvs/jack-lamp/firmware.bin"], [".pioenvs/jack-lamp/firmware.elf"])
usage: esptool [-h] [--chip {auto,esp8266,esp32}] [--port PORT] [--baud BAUD]
               [--before {default_reset,no_reset,no_reset_no_sync}]
               [--after {hard_reset,soft_reset,no_reset}] [--no-stub]
               [--trace] [--override-vddsdio [{1.8V,1.9V,OFF}]]
               {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,version}
               ...
esptool: error: argument operation: invalid choice: 'merge_bin' (choose from 'load_ram', 'dump_mem', 'read_mem', 'write_mem', 'write_flash', 'run', 'image_info', 'make_image', 'elf2image', 'read_mac', 'chip_id', 'flash_id', 'read_flash_status', 'write_flash_status', 'read_flash', 'verify_flash', 'erase_flash', 'erase_region', 'version')

What is the Expected Behaviour?

To compile firmware with no issues.

More Information

No response

Other Steps to Reproduce

No response

radimkarnis commented 1 year ago

Hi @jackkitley, you are definitely using an old version of esptool, that doesn't support the merge_bin command. Either update esptool manually or try reinstalling/updating esphome to include a more recent esptool version.

Please read these instructions to update esphome.