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

--compress and --no-compress now missing (ESPTOOL-717) #901

Closed dhalbert closed 1 year ago

dhalbert commented 1 year ago

Operating System

Ubuntu 22.04

Esptool Version

v4.6.2

Python Version

3.10.6

Full Esptool Command Line that Was Run

esptool.py --no-compress --port /dev/ttyACM0 --before no_reset --baud 460800 write_flash 0 Downloads/NINA_W102-1.7.5.newnasa.bin

Esptool Output

esptool: error: unrecognized arguments: --no-compress

What is the Expected Behaviour?

args used to work

More Information

compress_args is set in __init__.py but never used: https://github.com/espressif/esptool/blob/3d8c304e72bba64fc5812f977e262d47fb70c6da/esptool/__init__.py#L339-L353

Other Steps to Reproduce

No response

radimkarnis commented 1 year ago

Hello @dhalbert, --compress and --no-compress are options for the write_flash command - they have to come after the write_flash part when constructing the cmd.

This is reflected when you run esptool.py write_flash -h:

...
  --ignore-flash-encryption-efuse-setting
                        Ignore flash encryption efuse settings
  --force               Force write, skip security and compatibility checks. Use with caution!
  --compress, -z        Compress data in transfer (default unless --no-stub is specified)
  --no-compress, -u     Disable data compression during transfer (default if --no-stub is specified)
dhalbert commented 1 year ago

Aha, thank you! Sorry!