Skip to content

UnsupportedCommandError when trying to flash on a board with Secure Download Mode (ESPTOOL-1346) #1173

Description

@niketic95

Operating System

Ubuntu 22.04

Esptool Version

v5.3.0-14-g65f72ed

Python Version

Python 3.10.12

Full Esptool Command Line that Was Run

./esptool.py --chip esp32s3 --port /dev/ttyACM0 --no-stub write-flash -fm dio -ff 80m -fs 8MB 0x10000 hello_world.bin

Esptool Output

Warning: DEPRECATED: 'esptool.py' is deprecated. Please use 'esptool' instead. The '.py' suffix will be removed in a future major release.
esptool v5.3.0
Serial port /dev/ttyACM0:
Connecting...
Traceback (most recent call last):
  File "/home/stenic/Downloads/esptool/./esptool.py", line 37, in <module>
    esptool._main()
  File "/home/stenic/Downloads/esptool/esptool/__init__.py", line 1363, in _main
    main()
  File "/home/stenic/Downloads/esptool/esptool/__init__.py", line 1257, in main
    cli(args=args, esp=esp)
  File "/home/stenic/Downloads/esptool/esptool/cli_util.py", line 346, in __call__
    return super().__call__(*args, **kwargs)
  File "/home/stenic/.espressif/python_env/idf6.1_py3.10_env/lib/python3.10/site-packages/rich_click/rich_command.py", line 402, in __call__
    return super().__call__(*args, **kwargs)
  File "/home/stenic/.espressif/python_env/idf6.1_py3.10_env/lib/python3.10/site-packages/click/core.py", line 1524, in __call__
    return self.main(*args, **kwargs)
  File "/home/stenic/.espressif/python_env/idf6.1_py3.10_env/lib/python3.10/site-packages/rich_click/rich_command.py", line 216, in main
    rv = self.invoke(ctx)
  File "/home/stenic/.espressif/python_env/idf6.1_py3.10_env/lib/python3.10/site-packages/click/core.py", line 1912, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/stenic/.espressif/python_env/idf6.1_py3.10_env/lib/python3.10/site-packages/click/core.py", line 1308, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/stenic/.espressif/python_env/idf6.1_py3.10_env/lib/python3.10/site-packages/click/core.py", line 877, in invoke
    return callback(*args, **kwargs)
  File "/home/stenic/.espressif/python_env/idf6.1_py3.10_env/lib/python3.10/site-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/stenic/Downloads/esptool/esptool/__init__.py", line 822, in write_flash_cli
    prepare_esp_object(ctx)
  File "/home/stenic/Downloads/esptool/esptool/__init__.py", line 542, in prepare_esp_object
    esp = esp or get_default_connected_device(
  File "/home/stenic/Downloads/esptool/esptool/__init__.py", line 1348, in get_default_connected_device
    _esp.connect(before, connect_attempts)
  File "/home/stenic/Downloads/esptool/esptool/loader.py", line 983, in connect
    self._post_connect()
  File "/home/stenic/Downloads/esptool/esptool/targets/esp32s3.py", line 332, in _post_connect
    self.disable_watchdogs()
  File "/home/stenic/Downloads/esptool/esptool/targets/esp32s3.py", line 315, in disable_watchdogs
    self.write_reg(self.RTC_CNTL_WDTWPROTECT_REG, self.RTC_CNTL_WDT_WKEY)
  File "/home/stenic/Downloads/esptool/esptool/loader.py", line 1008, in write_reg
    return self.check_command(
  File "/home/stenic/Downloads/esptool/esptool/loader.py", line 658, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
  File "/home/stenic/Downloads/esptool/esptool/loader.py", line 628, in command
    raise UnsupportedCommandError(self, op)
esptool.util.UnsupportedCommandError: This command (0x9) is not supported in Secure Download Mode

What is the Expected Behaviour?

  • The binary to be flashed on address 0x10000

More Information

  • Tested with the release of the tool, with the same behavior.
  • Tested with the previous version of the tool v4.10.0 where I was able to flash.

Other Steps to Reproduce

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions