esptool 4.12.dev1__tar.gz → 4.12.dev3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {esptool-4.12.dev1/esptool.egg-info → esptool-4.12.dev3}/PKG-INFO +1 -1
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esp_rfc2217_server/__init__.py +10 -2
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/base_operations.py +3 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/util.py +19 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32c5.yaml +32 -32
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32p4.yaml +3 -3
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32p4_v3.0.yaml +1 -1
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/__init__.py +5 -4
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/cmds.py +5 -6
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/loader.py +54 -51
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32c2.py +1 -1
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32c5.py +1 -1
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32c61.py +1 -1
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32h4.py +1 -1
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32p4.py +29 -7
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/LICENSE-APACHE +201 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/LICENSE-MIT +21 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/2/README.md +1 -1
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp32.json +8 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp32c2.json +8 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp32c3.json +8 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp32c5.json +8 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp32c6.json +8 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp32c61.json +8 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp32h2.json +8 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp32p4-rev1.json +8 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp32p4.json +8 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp32s2.json +8 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp32s3.json +30 -0
- esptool-4.12.dev3/esptool/targets/stub_flasher/2/esp8266.json +8 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3/esptool.egg-info}/PKG-INFO +1 -1
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool.egg-info/SOURCES.txt +7 -3
- {esptool-4.12.dev1 → esptool-4.12.dev3}/pyproject.toml +1 -1
- esptool-4.12.dev1/esptool/targets/stub_flasher/1/esp32p4.json +0 -8
- esptool-4.12.dev1/esptool/targets/stub_flasher/2/LICENSE-APACHE +0 -201
- esptool-4.12.dev1/esptool/targets/stub_flasher/2/LICENSE-MIT +0 -25
- esptool-4.12.dev1/esptool/targets/stub_flasher/2/esp32.json +0 -1
- esptool-4.12.dev1/esptool/targets/stub_flasher/2/esp32c2.json +0 -1
- esptool-4.12.dev1/esptool/targets/stub_flasher/2/esp32c3.json +0 -1
- esptool-4.12.dev1/esptool/targets/stub_flasher/2/esp32c6.json +0 -1
- esptool-4.12.dev1/esptool/targets/stub_flasher/2/esp32h2.json +0 -1
- esptool-4.12.dev1/esptool/targets/stub_flasher/2/esp32s2.json +0 -1
- esptool-4.12.dev1/esptool/targets/stub_flasher/2/esp32s3.json +0 -1
- {esptool-4.12.dev1 → esptool-4.12.dev3}/LICENSE +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/MANIFEST.in +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/README.md +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esp_rfc2217_server/__main__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esp_rfc2217_server/esp_port_manager.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esp_rfc2217_server/redirector.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esp_rfc2217_server.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/__main__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/base_fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/csv_table_parser.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/emulate_efuse_controller_base.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c2/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c2/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c2/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c2/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c2/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c3/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c3/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c3/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c3/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c3/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c5/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c5/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c5/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c5/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c5/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c5beta3/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c5beta3/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c5beta3/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c5beta3/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c5beta3/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c6/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c6/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c6/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c6/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c6/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c61/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c61/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c61/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c61/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32c61/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h2/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h2/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h2/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h2/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h2/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h21/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h21/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h21/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h21/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h21/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h2beta1/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h2beta1/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h2beta1/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h2beta1/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h2beta1/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h4/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h4/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h4/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h4/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32h4/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32p4/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32p4/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32p4/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32p4/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32p4/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s2/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s2/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s2/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s2/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s2/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s3/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s3/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s3/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s3/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s3/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s3beta2/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s3beta2/emulate_efuse_controller.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s3beta2/fields.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s3beta2/mem_definition.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/esp32s3beta2/operations.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse/mem_definition_base.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32c2.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32c3.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32c5beta3.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32c6.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32c61.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32h2.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32h21.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32h2_v0.0_v1.1.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32h4.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32s2.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse/efuse_defs/esp32s3.yaml +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espefuse.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espsecure/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espsecure/__main__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espsecure/esp_hsm_sign/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espsecure/esp_hsm_sign/exceptions.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/espsecure.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/__main__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/bin_image.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/config.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/reset.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/__init__.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32c3.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32c5beta3.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32c6.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32c6beta.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32h2.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32h21.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32h2beta1.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32h2beta2.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32s2.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32s3.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp32s3beta2.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/esp8266.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/README.md +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32c2.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32c3.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32c5.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32c5beta3.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32c6.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32c61.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32c6beta.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32h2.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32h2beta1.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32h2beta2.json +0 -0
- /esptool-4.12.dev1/esptool/targets/stub_flasher/1/esp32p4rc1.json → /esptool-4.12.dev3/esptool/targets/stub_flasher/1/esp32p4-rev1.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32s2.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32s3.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp32s3beta2.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/targets/stub_flasher/1/esp8266.json +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/uf2_writer.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool/util.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool.egg-info/dependency_links.txt +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool.egg-info/requires.txt +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool.egg-info/top_level.txt +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/esptool.py +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/setup.cfg +0 -0
- {esptool-4.12.dev1 → esptool-4.12.dev3}/setup.py +0 -0
|
@@ -91,8 +91,16 @@ def main():
|
|
|
91
91
|
srv.listen(1)
|
|
92
92
|
logging.info(f"TCP/IP port: {args.localport}")
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
try:
|
|
95
|
+
host_ip = socket.gethostbyname(socket.gethostname())
|
|
96
|
+
except OSError:
|
|
97
|
+
# CI/minimal containers often have no DNS for gethostname(); the server
|
|
98
|
+
# is still reachable on loopback.
|
|
99
|
+
host_ip = "127.0.0.1"
|
|
100
|
+
wait_msg = (
|
|
101
|
+
"Waiting for connection ... use the 'rfc2217://"
|
|
102
|
+
f"{host_ip}:{args.localport}?ign_set_control' as a PORT"
|
|
103
|
+
)
|
|
96
104
|
logging.info(wait_msg)
|
|
97
105
|
|
|
98
106
|
while True:
|
|
@@ -356,6 +356,9 @@ def summary(esp, efuses, args):
|
|
|
356
356
|
json_efuse[e.name] = {
|
|
357
357
|
"name": e.name,
|
|
358
358
|
"value": base_value if readable else value,
|
|
359
|
+
"raw_value": util.json_raw_value_hex(
|
|
360
|
+
e.efuse_type, e.get_bitstring()
|
|
361
|
+
),
|
|
359
362
|
"readable": readable,
|
|
360
363
|
"writeable": writeable,
|
|
361
364
|
"description": e.description,
|
|
@@ -6,12 +6,31 @@
|
|
|
6
6
|
|
|
7
7
|
import esptool
|
|
8
8
|
|
|
9
|
+
from bitstring import Bits
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
def hexify(bitstring, separator=""):
|
|
11
13
|
as_bytes = tuple(b for b in bitstring)
|
|
12
14
|
return separator.join(("%02x" % b) for b in as_bytes)
|
|
13
15
|
|
|
14
16
|
|
|
17
|
+
def json_raw_value_hex(efuse_type: str, bits: Bits) -> str:
|
|
18
|
+
"""``0x``-prefixed lowercase hex string for JSON ``raw_value``,
|
|
19
|
+
same style for all field types.
|
|
20
|
+
|
|
21
|
+
For ``bytes`` fields, uses the same byte order as the text/JSON ``value`` hex
|
|
22
|
+
(``bits.bytes`` reversed). For other types, encodes the field bit pattern with
|
|
23
|
+
leading zero bits padded to a nibble boundary so ``Bits.hex`` is defined.
|
|
24
|
+
"""
|
|
25
|
+
if efuse_type.startswith("bytes"):
|
|
26
|
+
return "0x" + str(bits.bytes[::-1].hex())
|
|
27
|
+
b = bits if isinstance(bits, Bits) else Bits(bits)
|
|
28
|
+
pad = (4 - (b.len % 4)) % 4
|
|
29
|
+
if pad:
|
|
30
|
+
b = Bits(pad) + b
|
|
31
|
+
return "0x" + str(b.hex)
|
|
32
|
+
|
|
33
|
+
|
|
15
34
|
def popcnt(b):
|
|
16
35
|
"""Return number of "1" bits set in 'b'"""
|
|
17
36
|
return len([x for x in bin(b) if x == "1"])
|
|
@@ -3,29 +3,29 @@ EFUSES:
|
|
|
3
3
|
WR_DIS : {show: y, blk : 0, word: 0, pos : 0, len : 32, start : 0, type : 'uint:32', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Disable programming of individual eFuses, rloc: EFUSE_RD_WR_DIS_REG, bloc: 'B0,B1,B2,B3'}
|
|
4
4
|
RD_DIS : {show: y, blk : 0, word: 1, pos : 0, len : 7, start : 32, type : 'uint:7', wr_dis : 0, rd_dis: null, alt : '', dict : '', desc: Disable reading from BlOCK4-10, rloc: 'EFUSE_RD_REPEAT_DATA0_REG[6:0]', bloc: 'B4[6:0]'}
|
|
5
5
|
BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION_HI: {show: y, blk : 0, word: 1, pos : 7, len : 1, start : 39, type : bool, wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Represents the anti-rollback secure version of the 2nd stage bootloader used by the ROM bootloader (the high part of the field), rloc: 'EFUSE_RD_REPEAT_DATA0_REG[7]', bloc: 'B4[7]'}
|
|
6
|
-
DIS_ICACHE : {show: y, blk : 0, word: 1, pos : 8, len : 1, start : 40, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict: '
|
|
7
|
-
DIS_USB_JTAG : {show: y, blk : 0, word: 1, pos : 9, len : 1, start : 41, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict: '
|
|
8
|
-
BOOTLOADER_ANTI_ROLLBACK_EN : {show: y, blk : 0, word: 1, pos: 10, len : 1, start : 42, type : bool, wr_dis: null, rd_dis: null, alt : '', dict: '
|
|
9
|
-
DIS_USB_SERIAL_JTAG : {show: n, blk : 0, word: 1, pos: 11, len : 1, start : 43, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict: '
|
|
10
|
-
DIS_FORCE_DOWNLOAD : {show: y, blk : 0, word: 1, pos: 12, len : 1, start : 44, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict: '
|
|
11
|
-
SPI_DOWNLOAD_MSPI_DIS : {show: y, blk : 0, word: 1, pos: 13, len : 1, start : 45, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict: '
|
|
12
|
-
DIS_TWAI : {show: y, blk : 0, word: 1, pos: 14, len : 1, start : 46, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict: '
|
|
13
|
-
JTAG_SEL_ENABLE : {show: y, blk : 0, word: 1, pos: 15, len : 1, start : 47, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict: '
|
|
6
|
+
DIS_ICACHE : {show: y, blk : 0, word: 1, pos : 8, len : 1, start : 40, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict : '', desc: 'Represents whether cache is disabled. 1: Disabled 0: Enabled', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[8]', bloc: 'B5[0]'}
|
|
7
|
+
DIS_USB_JTAG : {show: y, blk : 0, word: 1, pos : 9, len : 1, start : 41, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the USB-to-JTAG function in USB Serial/JTAG is disabled. Note that EFUSE_DIS_USB_JTAG is available only when EFUSE_DIS_USB_SERIAL_JTAG is configured to 0. 1: Disabled 0: Enabled', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[9]', bloc: 'B5[1]'}
|
|
8
|
+
BOOTLOADER_ANTI_ROLLBACK_EN : {show: y, blk : 0, word: 1, pos: 10, len : 1, start : 42, type : bool, wr_dis: null, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the anti-rollback check for the 2nd stage bootloader is enabled. 1: Enabled 0: Disabled', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[10]', bloc: 'B5[2]'}
|
|
9
|
+
DIS_USB_SERIAL_JTAG : {show: n, blk : 0, word: 1, pos: 11, len : 1, start : 43, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict : '', desc: 'Represents whether USB Serial/JTAG is disabled. 1: Disabled 0: Enabled', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[11]', bloc: 'B5[3]'}
|
|
10
|
+
DIS_FORCE_DOWNLOAD : {show: y, blk : 0, word: 1, pos: 12, len : 1, start : 44, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the function that forces chip into Download mode is disabled. 1: Disabled 0: Enabled', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[12]', bloc: 'B5[4]'}
|
|
11
|
+
SPI_DOWNLOAD_MSPI_DIS : {show: y, blk : 0, word: 1, pos: 13, len : 1, start : 45, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict : '', desc: 'Represents whether SPI0 controller during boot_mode_download is disabled. 0: Enabled 1: Disabled', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[13]', bloc: 'B5[5]'}
|
|
12
|
+
DIS_TWAI : {show: y, blk : 0, word: 1, pos: 14, len : 1, start : 46, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict : '', desc: 'Represents whether TWAI function is disabled. 1: Disabled 0: Enabled', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[14]', bloc: 'B5[6]'}
|
|
13
|
+
JTAG_SEL_ENABLE : {show: y, blk : 0, word: 1, pos: 15, len : 1, start : 47, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the selection of a JTAG signal source through the strapping pin value is enabled when all of EFUSE_DIS_PAD_JTAG; EFUSE_DIS_USB_JTAG and EFUSE_DIS_USB_SERIAL_JTAG are configured to 0. 1: Enabled 0: Disabled', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[15]', bloc: 'B5[7]'}
|
|
14
14
|
SOFT_DIS_JTAG : {show: y, blk : 0, word: 1, pos: 16, len : 3, start : 48, type : 'uint:3', wr_dis : 31, rd_dis: null, alt : '', dict : '', desc: 'Represents whether PAD JTAG is disabled in the soft way. It can be restarted via HMAC. Odd count of bits with a value of 1: Disabled; Even count of bits with a value of 1: Enabled', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[18:16]', bloc: 'B6[2:0]'}
|
|
15
|
-
DIS_PAD_JTAG : {show: y, blk : 0, word: 1, pos: 19, len : 1, start : 51, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict: '
|
|
16
|
-
DIS_DOWNLOAD_MANUAL_ENCRYPT : {show: y, blk : 0, word: 1, pos: 20, len : 1, start : 52, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict: '
|
|
15
|
+
DIS_PAD_JTAG : {show: y, blk : 0, word: 1, pos: 19, len : 1, start : 51, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict : '', desc: 'Represents whether PAD JTAG is disabled in the hard way (permanently). 1: Disabled 0: Enabled', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[19]', bloc: 'B6[3]'}
|
|
16
|
+
DIS_DOWNLOAD_MANUAL_ENCRYPT : {show: y, blk : 0, word: 1, pos: 20, len : 1, start : 52, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict : '', desc: 'Represents whether flash encryption is disabled (except in SPI boot mode). 1: Disabled 0: Enabled', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[20]', bloc: 'B6[4]'}
|
|
17
17
|
USB_DREFH : {show: n, blk : 0, word: 1, pos: 21, len : 2, start : 53, type : 'uint:2', wr_dis : 30, rd_dis: null, alt : '', dict : '', desc: Represents the single-end input threshold vrefh; 1.76 V to 2 V with step of 80 mV, rloc: 'EFUSE_RD_REPEAT_DATA0_REG[22:21]', bloc: 'B6[6:5]'}
|
|
18
18
|
USB_DREFL : {show: n, blk : 0, word: 1, pos: 23, len : 2, start : 55, type : 'uint:2', wr_dis : 30, rd_dis: null, alt : '', dict : '', desc: Represents the single-end input threshold vrefl; 1.76 V to 2 V with step of 80 mV, rloc: 'EFUSE_RD_REPEAT_DATA0_REG[24:23]', bloc: 'B6[7],B7[0]'}
|
|
19
|
-
USB_EXCHG_PINS : {show: y, blk : 0, word: 1, pos: 25, len : 1, start : 57, type : bool, wr_dis : 30, rd_dis: null, alt : '', dict: '
|
|
20
|
-
VDD_SPI_AS_GPIO : {show: y, blk : 0, word: 1, pos: 26, len : 1, start : 58, type : bool, wr_dis : 30, rd_dis: null, alt : '', dict: '
|
|
19
|
+
USB_EXCHG_PINS : {show: y, blk : 0, word: 1, pos: 25, len : 1, start : 57, type : bool, wr_dis : 30, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the D+ and D- pins is exchanged. 1: Exchanged 0: Not exchanged', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[25]', bloc: 'B7[1]'}
|
|
20
|
+
VDD_SPI_AS_GPIO : {show: y, blk : 0, word: 1, pos: 26, len : 1, start : 58, type : bool, wr_dis : 30, rd_dis: null, alt : '', dict : '', desc: 'Represents whether VDD SPI pin is functioned as GPIO. 1: Functioned 0: Not functioned', rloc: 'EFUSE_RD_REPEAT_DATA0_REG[26]', bloc: 'B7[2]'}
|
|
21
21
|
WDT_DELAY_SEL : {show: y, blk : 0, word: 1, pos: 27, len : 2, start : 59, type : 'uint:2', wr_dis : 3, rd_dis: null, alt : '', dict : '', desc: "Represents RTC watchdog timeout threshold. The originally configured STG0 threshold * (2 ^ (EFUSE_WDT_DELAY_SEL + 1))", rloc: 'EFUSE_RD_REPEAT_DATA0_REG[28:27]', bloc: 'B7[4:3]'}
|
|
22
22
|
BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION_LO: {show: y, blk : 0, word: 1, pos: 29, len : 3, start : 61, type : 'uint:3', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Represents the anti-rollback secure version of the 2nd stage bootloader used by the ROM bootloader (the low part of the field), rloc: 'EFUSE_RD_REPEAT_DATA0_REG[31:29]', bloc: 'B7[7:5]'}
|
|
23
23
|
KM_DISABLE_DEPLOY_MODE : {show: y, blk : 0, word: 2, pos : 0, len : 4, start : 64, type : 'uint:4', wr_dis : 1, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the new key deployment of key manager is disabled. Bit0: ECDSA key deployment (0: Enabled, 1: Disabled). Bit1: XTS-AES (flash and PSRAM) key deployment (0: Enabled, 1: Disabled). Bit2: HMAC key deployment (0: Enabled, 1: Disabled). Bit3: DS key deployment (0: Enabled, 1: Disabled)', rloc: 'EFUSE_RD_REPEAT_DATA1_REG[3:0]', bloc: 'B8[3:0]'}
|
|
24
|
-
KM_RND_SWITCH_CYCLE : {show: y, blk : 0, word: 2, pos : 4, len : 2, start : 68, type : 'uint:2', wr_dis : 1, rd_dis: null, alt : '', dict: '
|
|
24
|
+
KM_RND_SWITCH_CYCLE : {show: y, blk : 0, word: 2, pos : 4, len : 2, start : 68, type : 'uint:2', wr_dis : 1, rd_dis: null, alt : '', dict : '', desc: 'Represents the cycle at which the Key Manager switches random numbers. 0: Controlled by the KEYMNG_RND_SWITCH_CYCLE register. 1: 8 Key Manager clock cycles 2: 16 Key Manager clock cycles 3: 32 Key Manager clock cycles', rloc: 'EFUSE_RD_REPEAT_DATA1_REG[5:4]', bloc: 'B8[5:4]'}
|
|
25
25
|
KM_DEPLOY_ONLY_ONCE : {show: y, blk : 0, word: 2, pos : 6, len : 4, start : 70, type : 'uint:4', wr_dis : 1, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the corresponding key can be deployed only once. Bit0: ECDSA key (0: Multiple times, 1: Only once). Bit1: XTS-AES (flash and PSRAM) key (0: Multiple times, 1: Only once). Bit2: HMAC key (0: Multiple times, 1: Only once). Bit3: DS key (0: Multiple times, 1: Only once)', rloc: 'EFUSE_RD_REPEAT_DATA1_REG[9:6]', bloc: 'B8[7:6],B9[1:0]'}
|
|
26
26
|
FORCE_USE_KEY_MANAGER_KEY : {show: y, blk : 0, word: 2, pos: 10, len : 4, start : 74, type : 'uint:4', wr_dis : 1, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the corresponding key must come from Key Manager. Bit0: ECDSA key (0: Not required, 1: Required). Bit1: XTS-AES (flash and PSRAM) key (0: Not required, 1: Required). Bit2: HMAC key (0: Not required, 1: Required). Bit3: DS key (0: Not required, 1: Required)', rloc: 'EFUSE_RD_REPEAT_DATA1_REG[13:10]', bloc: 'B9[5:2]'}
|
|
27
|
-
FORCE_DISABLE_SW_INIT_KEY : {show: y, blk : 0, word: 2, pos: 14, len : 1, start : 78, type : bool, wr_dis : 1, rd_dis: null, alt : '', dict: '
|
|
28
|
-
BOOTLOADER_ANTI_ROLLBACK_UPDATE_IN_ROM : {show: y, blk : 0, word: 2, pos: 15, len : 1, start : 79, type : bool, wr_dis: null, rd_dis: null, alt : '', dict: '
|
|
27
|
+
FORCE_DISABLE_SW_INIT_KEY : {show: y, blk : 0, word: 2, pos: 14, len : 1, start : 78, type : bool, wr_dis : 1, rd_dis: null, alt : '', dict : '', desc: 'Represents whether to disable the use of the initialization key written by software and instead force use efuse_init_key. 0: Enable 1: Disable', rloc: 'EFUSE_RD_REPEAT_DATA1_REG[14]', bloc: 'B9[6]'}
|
|
28
|
+
BOOTLOADER_ANTI_ROLLBACK_UPDATE_IN_ROM : {show: y, blk : 0, word: 2, pos: 15, len : 1, start : 79, type : bool, wr_dis: null, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the anti-rollback SECURE_VERSION will be updated from the ROM bootloader. 1: Enable 0: Disable', rloc: 'EFUSE_RD_REPEAT_DATA1_REG[15]', bloc: 'B9[7]'}
|
|
29
29
|
SPI_BOOT_CRYPT_CNT : {show: y, blk : 0, word: 2, pos: 16, len : 3, start : 80, type : 'uint:3', wr_dis : 4, rd_dis: null, alt : '', dict: '{0: "Disable", 1: "Enable", 3: "Disable", 7: "Enable"}', desc: Enables flash encryption when 1 or 3 bits are set and disables otherwise, rloc: 'EFUSE_RD_REPEAT_DATA1_REG[18:16]', bloc: 'B10[2:0]'}
|
|
30
30
|
SECURE_BOOT_KEY_REVOKE0 : {show: y, blk : 0, word: 2, pos: 19, len : 1, start : 83, type : bool, wr_dis : 5, rd_dis: null, alt : '', dict : '', desc: Revoke 1st secure boot key, rloc: 'EFUSE_RD_REPEAT_DATA1_REG[19]', bloc: 'B10[3]'}
|
|
31
31
|
SECURE_BOOT_KEY_REVOKE1 : {show: y, blk : 0, word: 2, pos: 20, len : 1, start : 84, type : bool, wr_dis : 6, rd_dis: null, alt : '', dict : '', desc: Revoke 2nd secure boot key, rloc: 'EFUSE_RD_REPEAT_DATA1_REG[20]', bloc: 'B10[4]'}
|
|
@@ -36,32 +36,32 @@ EFUSES:
|
|
|
36
36
|
KEY_PURPOSE_3 : {show: y, blk : 0, word: 3, pos : 5, len : 5, start: 101, type : 'uint:5', wr_dis : 11, rd_dis: null, alt : KEY3_PURPOSE, dict : '', desc: 'Represents the purpose of Key3.', rloc: 'EFUSE_RD_REPEAT_DATA2_REG[9:5]', bloc: 'B12[7:5],B13[1:0]'}
|
|
37
37
|
KEY_PURPOSE_4 : {show: y, blk : 0, word: 3, pos: 10, len : 5, start: 106, type : 'uint:5', wr_dis : 12, rd_dis: null, alt : KEY4_PURPOSE, dict : '', desc: 'Represents the purpose of Key4.', rloc: 'EFUSE_RD_REPEAT_DATA2_REG[14:10]', bloc: 'B13[6:2]'}
|
|
38
38
|
KEY_PURPOSE_5 : {show: y, blk : 0, word: 3, pos: 15, len : 5, start: 111, type : 'uint:5', wr_dis : 13, rd_dis: null, alt : KEY5_PURPOSE, dict : '', desc: 'Represents the purpose of Key5.', rloc: 'EFUSE_RD_REPEAT_DATA2_REG[19:15]', bloc: 'B13[7],B14[3:0]'}
|
|
39
|
-
SEC_DPA_LEVEL : {show: y, blk : 0, word: 3, pos: 20, len : 2, start: 116, type : 'uint:2', wr_dis : 14, rd_dis: null, alt : '', dict: '
|
|
39
|
+
SEC_DPA_LEVEL : {show: y, blk : 0, word: 3, pos: 20, len : 2, start: 116, type : 'uint:2', wr_dis : 14, rd_dis: null, alt : '', dict : '', desc: 'Represents the security level of anti-DPA attack. The level is adjusted by configuring the clock random frequency division mode. 0: Security level is SEC_DPA_OFF 1: Security level is SEC_DPA_LOW 2: Security level is SEC_DPA_MIDDLE 3: Security level is SEC_DPA_HIGH.', rloc: 'EFUSE_RD_REPEAT_DATA2_REG[21:20]', bloc: 'B14[5:4]'}
|
|
40
40
|
RECOVERY_BOOTLOADER_FLASH_SECTOR_HI : {show: y, blk : 0, word: 3, pos: 22, len : 3, start: 118, type : 'uint:3', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Represents the starting flash sector (flash sector size is 0x1000) of the recovery bootloader used by the ROM bootloader If the primary bootloader fails. 0 and 0xFFF - this feature is disabled. (The high part of the field), rloc: 'EFUSE_RD_REPEAT_DATA2_REG[24:22]', bloc: 'B14[7:6],B15[0]'}
|
|
41
|
-
SECURE_BOOT_EN : {show: y, blk : 0, word: 3, pos: 25, len : 1, start: 121, type : bool, wr_dis : 15, rd_dis: null, alt : '', dict: '
|
|
42
|
-
SECURE_BOOT_AGGRESSIVE_REVOKE : {show: y, blk : 0, word: 3, pos: 26, len : 1, start: 122, type : bool, wr_dis : 16, rd_dis: null, alt : '', dict: '
|
|
43
|
-
KM_XTS_KEY_LENGTH_256 : {show: y, blk : 0, word: 3, pos: 27, len : 1, start: 123, type : bool, wr_dis : 1, rd_dis: null, alt : '', dict: '
|
|
41
|
+
SECURE_BOOT_EN : {show: y, blk : 0, word: 3, pos: 25, len : 1, start: 121, type : bool, wr_dis : 15, rd_dis: null, alt : '', dict : '', desc: 'Represents whether Secure Boot is enabled. 1: Enabled 0: Disabled', rloc: 'EFUSE_RD_REPEAT_DATA2_REG[25]', bloc: 'B15[1]'}
|
|
42
|
+
SECURE_BOOT_AGGRESSIVE_REVOKE : {show: y, blk : 0, word: 3, pos: 26, len : 1, start: 122, type : bool, wr_dis : 16, rd_dis: null, alt : '', dict : '', desc: 'Represents whether aggressive revocation of Secure Boot is enabled. 1: Enabled 0: Disabled', rloc: 'EFUSE_RD_REPEAT_DATA2_REG[26]', bloc: 'B15[2]'}
|
|
43
|
+
KM_XTS_KEY_LENGTH_256 : {show: y, blk : 0, word: 3, pos: 27, len : 1, start: 123, type : bool, wr_dis : 1, rd_dis: null, alt : '', dict : '', desc: 'Represents which key flash encryption uses. 0: XTS-AES-256 key 1: XTS-AES-128 key', rloc: 'EFUSE_RD_REPEAT_DATA2_REG[27]', bloc: 'B15[3]'}
|
|
44
44
|
FLASH_TPUW : {show: y, blk : 0, word: 3, pos: 28, len : 4, start: 124, type : 'uint:4', wr_dis : 18, rd_dis: null, alt : '', dict : '', desc: 'Represents the flash waiting time after power-up. Measurement unit: ms. When the value is less than 15; the waiting time is the programmed value. Otherwise; the waiting time is a fixed value; i.e. 30 ms', rloc: 'EFUSE_RD_REPEAT_DATA2_REG[31:28]', bloc: 'B15[7:4]'}
|
|
45
|
-
DIS_DOWNLOAD_MODE : {show: y, blk : 0, word: 4, pos : 0, len : 1, start: 128, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict: '
|
|
46
|
-
DIS_DIRECT_BOOT : {show: y, blk : 0, word: 4, pos : 1, len : 1, start: 129, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict: '
|
|
47
|
-
DIS_USB_SERIAL_JTAG_ROM_PRINT : {show: y, blk : 0, word: 4, pos : 2, len : 1, start: 130, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict: '
|
|
48
|
-
LOCK_KM_KEY : {show: y, blk : 0, word: 4, pos : 3, len : 1, start: 131, type : bool, wr_dis : 1, rd_dis: null, alt : '', dict: '
|
|
49
|
-
DIS_USB_SERIAL_JTAG_DOWNLOAD_MODE : {show: y, blk : 0, word: 4, pos : 4, len : 1, start: 132, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict: '
|
|
50
|
-
ENABLE_SECURITY_DOWNLOAD : {show: y, blk : 0, word: 4, pos : 5, len : 1, start: 133, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict: '
|
|
45
|
+
DIS_DOWNLOAD_MODE : {show: y, blk : 0, word: 4, pos : 0, len : 1, start: 128, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict : '', desc: 'Represents whether Download mode is disable or enable. 1. Disable 0: Enable', rloc: 'EFUSE_RD_REPEAT_DATA3_REG[0]', bloc: 'B16[0]'}
|
|
46
|
+
DIS_DIRECT_BOOT : {show: y, blk : 0, word: 4, pos : 1, len : 1, start: 129, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict : '', desc: 'Represents whether direct boot mode is disabled or enabled. 1. Disable 0: Enable', rloc: 'EFUSE_RD_REPEAT_DATA3_REG[1]', bloc: 'B16[1]'}
|
|
47
|
+
DIS_USB_SERIAL_JTAG_ROM_PRINT : {show: y, blk : 0, word: 4, pos : 2, len : 1, start: 130, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict : '', desc: 'Represents whether print from USB-Serial-JTAG is disabled or enabled. 1. Disable 0: Enable', rloc: 'EFUSE_RD_REPEAT_DATA3_REG[2]', bloc: 'B16[2]'}
|
|
48
|
+
LOCK_KM_KEY : {show: y, blk : 0, word: 4, pos : 3, len : 1, start: 131, type : bool, wr_dis : 1, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the keys in the Key Manager are locked after deployment. 0: Not locked 1: Locked', rloc: 'EFUSE_RD_REPEAT_DATA3_REG[3]', bloc: 'B16[3]'}
|
|
49
|
+
DIS_USB_SERIAL_JTAG_DOWNLOAD_MODE : {show: y, blk : 0, word: 4, pos : 4, len : 1, start: 132, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the USB-Serial-JTAG download function is disabled or enabled. 1: Disable 0: Enable', rloc: 'EFUSE_RD_REPEAT_DATA3_REG[4]', bloc: 'B16[4]'}
|
|
50
|
+
ENABLE_SECURITY_DOWNLOAD : {show: y, blk : 0, word: 4, pos : 5, len : 1, start: 133, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict : '', desc: 'Represents whether security download is enabled. Only downloading into flash is supported. Reading/writing RAM or registers is not supported (i.e. stub download is not supported). 1: Enabled 0: Disabled', rloc: 'EFUSE_RD_REPEAT_DATA3_REG[5]', bloc: 'B16[5]'}
|
|
51
51
|
UART_PRINT_CONTROL : {show: y, blk : 0, word: 4, pos : 6, len : 2, start: 134, type : 'uint:2', wr_dis : 18, rd_dis: null, alt : '', dict: '{0: "Enable", 1: "Enable when GPIO8 is low at reset", 2: "Enable when GPIO8 is high at reset", 3: "Disable"}', desc: Set the default UART boot message output mode, rloc: 'EFUSE_RD_REPEAT_DATA3_REG[7:6]', bloc: 'B16[7:6]'}
|
|
52
|
-
FORCE_SEND_RESUME : {show: y, blk : 0, word: 4, pos : 8, len : 1, start: 136, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict: '
|
|
52
|
+
FORCE_SEND_RESUME : {show: y, blk : 0, word: 4, pos : 8, len : 1, start: 136, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict : '', desc: 'Represents whether ROM code is forced to send a resume command during SPI boot. 1: Forced. 0: Not forced.', rloc: 'EFUSE_RD_REPEAT_DATA3_REG[8]', bloc: 'B17[0]'}
|
|
53
53
|
SECURE_VERSION : {show: y, blk : 0, word: 4, pos : 9, len : 9, start: 137, type : 'uint:9', wr_dis : 18, rd_dis: null, alt : '', dict : '', desc: Represents the app secure version used by ESP-IDF anti-rollback feature, rloc: 'EFUSE_RD_REPEAT_DATA3_REG[17:9]', bloc: 'B17[7:1],B18[1:0]'}
|
|
54
54
|
RESERVE_0_146 : {show: n, blk : 0, word: 4, pos: 18, len : 7, start: 146, type : 'uint:7', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Reserved; it was created by set_missed_fields_in_regs func, rloc: 'EFUSE_RD_REPEAT_DATA3_REG[24:18]', bloc: 'B18[7:2],B19[0]'}
|
|
55
|
-
SECURE_BOOT_DISABLE_FAST_WAKE : {show: y, blk : 0, word: 4, pos: 25, len : 1, start: 153, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict: '
|
|
56
|
-
HYS_EN_PAD : {show: y, blk : 0, word: 4, pos: 26, len : 1, start: 154, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict: '
|
|
57
|
-
XTS_DPA_PSEUDO_LEVEL : {show: y, blk : 0, word: 4, pos: 27, len : 2, start: 155, type : 'uint:2', wr_dis : 14, rd_dis: null, alt : '', dict: '
|
|
58
|
-
XTS_DPA_CLK_ENABLE : {show: y, blk : 0, word: 4, pos: 29, len : 1, start: 157, type : bool, wr_dis : 14, rd_dis: null, alt : '', dict: '
|
|
55
|
+
SECURE_BOOT_DISABLE_FAST_WAKE : {show: y, blk : 0, word: 4, pos: 25, len : 1, start: 153, type : bool, wr_dis : 18, rd_dis: null, alt : '', dict : '', desc: 'Represents whether FAST VERIFY ON WAKE is disabled when Secure Boot is enabled. 1: Disabled 0: Enabled', rloc: 'EFUSE_RD_REPEAT_DATA3_REG[25]', bloc: 'B19[1]'}
|
|
56
|
+
HYS_EN_PAD : {show: y, blk : 0, word: 4, pos: 26, len : 1, start: 154, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the hysteresis function of PAD0 - PAD27 is enabled. 1: Enabled 0: Disabled', rloc: 'EFUSE_RD_REPEAT_DATA3_REG[26]', bloc: 'B19[2]'}
|
|
57
|
+
XTS_DPA_PSEUDO_LEVEL : {show: y, blk : 0, word: 4, pos: 27, len : 2, start: 155, type : 'uint:2', wr_dis : 14, rd_dis: null, alt : '', dict : '', desc: 'Represents the pseudo round level of XTS-AES anti-DPA attack. 0: Disabled 1: Low 2: Moderate 3: High', rloc: 'EFUSE_RD_REPEAT_DATA3_REG[28:27]', bloc: 'B19[4:3]'}
|
|
58
|
+
XTS_DPA_CLK_ENABLE : {show: y, blk : 0, word: 4, pos: 29, len : 1, start: 157, type : bool, wr_dis : 14, rd_dis: null, alt : '', dict : '', desc: 'Represents whether XTS-AES anti-DPA attack clock is enabled. 0: Disable 1: Enabled', rloc: 'EFUSE_RD_REPEAT_DATA3_REG[29]', bloc: 'B19[5]'}
|
|
59
59
|
RESERVE_0_158 : {show: n, blk : 0, word: 4, pos: 30, len : 1, start: 158, type : bool, wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Reserved; it was created by set_missed_fields_in_regs func, rloc: 'EFUSE_RD_REPEAT_DATA3_REG[30]', bloc: 'B19[6]'}
|
|
60
60
|
SECURE_BOOT_SHA384_EN : {show: y, blk : 0, word: 4, pos: 31, len : 1, start: 159, type : bool, wr_dis : 14, rd_dis: null, alt : '', dict : '', desc: Represents if the chip supports Secure Boot using SHA-384, rloc: 'EFUSE_RD_REPEAT_DATA3_REG[31]', bloc: 'B19[7]'}
|
|
61
61
|
HUK_GEN_STATE : {show: y, blk : 0, word: 5, pos : 0, len : 9, start: 160, type : 'uint:9', wr_dis : 19, rd_dis: null, alt : '', dict : '', desc: 'Represents whether the HUK generate mode is valid. Odd count of bits with a value of 1: Invalid; Even count of bits with a value of 1: Valid', rloc: 'EFUSE_RD_REPEAT_DATA4_REG[8:0]', bloc: 'B20,B21[0]'}
|
|
62
62
|
XTAL_48M_SEL : {show: y, blk : 0, word: 5, pos : 9, len : 3, start: 169, type : 'uint:3', wr_dis : 17, rd_dis: null, alt : '', dict : '', desc: 'Represents whether XTAL frequency is 48MHz or not. If not; 40MHz XTAL will be used. If this field contains Odd number bit 1: Enable 48MHz XTAL; Even number bit 1: Enable 40MHz XTAL', rloc: 'EFUSE_RD_REPEAT_DATA4_REG[11:9]', bloc: 'B21[3:1]'}
|
|
63
|
-
XTAL_48M_SEL_MODE : {show: y, blk : 0, word: 5, pos: 12, len : 1, start: 172, type : bool, wr_dis : 17, rd_dis: null, alt : '', dict: '
|
|
64
|
-
ECC_FORCE_CONST_TIME : {show: y, blk : 0, word: 5, pos: 13, len : 1, start: 173, type : bool, wr_dis : 14, rd_dis: null, alt : '', dict: '
|
|
63
|
+
XTAL_48M_SEL_MODE : {show: y, blk : 0, word: 5, pos: 12, len : 1, start: 172, type : bool, wr_dis : 17, rd_dis: null, alt : '', dict : '', desc: 'Represents what determines the XTAL frequency in Joint Download Boot mode. 0: Strapping PAD state 1: EFUSE_XTAL_48M_SEL in eFuse', rloc: 'EFUSE_RD_REPEAT_DATA4_REG[12]', bloc: 'B21[4]'}
|
|
64
|
+
ECC_FORCE_CONST_TIME : {show: y, blk : 0, word: 5, pos: 13, len : 1, start: 173, type : bool, wr_dis : 14, rd_dis: null, alt : '', dict : '', desc: 'Represents whether to force ECC to use constant-time mode for point multiplication calculation. 0: Not force 1: Force', rloc: 'EFUSE_RD_REPEAT_DATA4_REG[13]', bloc: 'B21[5]'}
|
|
65
65
|
RECOVERY_BOOTLOADER_FLASH_SECTOR_LO : {show: y, blk : 0, word: 5, pos: 14, len : 9, start: 174, type : 'uint:9', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Represents the starting flash sector (flash sector size is 0x1000) of the recovery bootloader used by the ROM bootloader If the primary bootloader fails. 0 and 0xFFF - this feature is disabled. (The low part of the field), rloc: 'EFUSE_RD_REPEAT_DATA4_REG[22:14]', bloc: 'B21[7:6],B22[6:0]'}
|
|
66
66
|
RESERVE_0_183 : {show: n, blk : 0, word: 5, pos: 23, len : 9, start: 183, type : 'uint:9', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Reserved; it was created by set_missed_fields_in_regs func, rloc: 'EFUSE_RD_REPEAT_DATA4_REG[31:23]', bloc: 'B22[7],B23'}
|
|
67
67
|
MAC : {show: y, blk : 1, word: 0, pos : 0, len : 48, start : 0, type : 'bytes:6', wr_dis : 20, rd_dis: null, alt : MAC_FACTORY, dict : '', desc: MAC address, rloc: EFUSE_RD_MAC_SYS0_REG, bloc: 'B0,B1,B2,B3,B4,B5'}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
VER_NO:
|
|
1
|
+
VER_NO: f7765f0ac3faf4b54f8c1f064307522c
|
|
2
2
|
EFUSES:
|
|
3
3
|
WR_DIS : {show: y, blk : 0, word: 0, pos : 0, len : 32, start : 0, type : 'uint:32', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Disable programming of individual eFuses, rloc: EFUSE_RD_WR_DIS_REG, bloc: 'B0,B1,B2,B3'}
|
|
4
4
|
RD_DIS : {show: y, blk : 0, word: 1, pos : 0, len : 7, start : 32, type : 'uint:7', wr_dis : 0, rd_dis: null, alt : '', dict : '', desc: Disable reading from BlOCK4-10, rloc: 'EFUSE_RD_REPEAT_DATA0_REG[6:0]', bloc: 'B4[6:0]'}
|
|
@@ -74,7 +74,7 @@ EFUSES:
|
|
|
74
74
|
MAC : {show: y, blk : 1, word: 0, pos : 0, len : 48, start : 0, type : 'bytes:6', wr_dis : 20, rd_dis: null, alt : MAC_FACTORY, dict : '', desc: MAC address, rloc: EFUSE_RD_MAC_SYS_0_REG, bloc: 'B0,B1,B2,B3,B4,B5'}
|
|
75
75
|
RESERVED_1_16 : {show: n, blk : 1, word: 1, pos: 16, len : 16, start : 48, type : 'uint:16', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Stores the extended bits of MAC address, rloc: 'EFUSE_RD_MAC_SYS_1_REG[31:16]', bloc: 'B6,B7'}
|
|
76
76
|
WAFER_VERSION_MINOR : {show: y, blk : 1, word: 2, pos : 0, len : 4, start : 64, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Minor chip version, rloc: 'EFUSE_RD_MAC_SYS_2_REG[3:0]', bloc: 'B8[3:0]'}
|
|
77
|
-
|
|
77
|
+
WAFER_VERSION_MAJOR_LO : {show: y, blk : 1, word: 2, pos : 4, len : 2, start : 68, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Major chip version (lower 2 bits), rloc: 'EFUSE_RD_MAC_SYS_2_REG[5:4]', bloc: 'B8[5:4]'}
|
|
78
78
|
DISABLE_WAFER_VERSION_MAJOR : {show: y, blk : 1, word: 2, pos : 6, len : 1, start : 70, type : bool, wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Disables check of wafer version major, rloc: 'EFUSE_RD_MAC_SYS_2_REG[6]', bloc: 'B8[6]'}
|
|
79
79
|
DISABLE_BLK_VERSION_MAJOR : {show: y, blk : 1, word: 2, pos : 7, len : 1, start : 71, type : bool, wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Disables check of blk version major, rloc: 'EFUSE_RD_MAC_SYS_2_REG[7]', bloc: 'B8[7]'}
|
|
80
80
|
BLK_VERSION_MINOR : {show: y, blk : 1, word: 2, pos : 8, len : 3, start : 72, type : 'uint:3', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: BLK_VERSION_MINOR of BLOCK2, rloc: 'EFUSE_RD_MAC_SYS_2_REG[10:8]', bloc: 'B9[2:0]'}
|
|
@@ -83,7 +83,7 @@ EFUSES:
|
|
|
83
83
|
TEMP : {show: y, blk : 1, word: 2, pos: 16, len : 2, start : 80, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Operating temperature of the ESP chip, rloc: 'EFUSE_RD_MAC_SYS_2_REG[17:16]', bloc: 'B10[1:0]'}
|
|
84
84
|
PSRAM_VENDOR : {show: y, blk : 1, word: 2, pos: 18, len : 2, start : 82, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: PSRAM vendor, rloc: 'EFUSE_RD_MAC_SYS_2_REG[19:18]', bloc: 'B10[3:2]'}
|
|
85
85
|
PKG_VERSION : {show: y, blk : 1, word: 2, pos: 20, len : 3, start : 84, type : 'uint:3', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Package version, rloc: 'EFUSE_RD_MAC_SYS_2_REG[22:20]', bloc: 'B10[6:4]'}
|
|
86
|
-
|
|
86
|
+
WAFER_VERSION_MAJOR_HI : {show: y, blk : 1, word: 2, pos: 23, len : 1, start : 87, type : bool, wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Major chip version (MSB), rloc: 'EFUSE_RD_MAC_SYS_2_REG[23]', bloc: 'B10[7]'}
|
|
87
87
|
LDO_VO1_DREF : {show: y, blk : 1, word: 2, pos: 24, len : 4, start : 88, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO1 parameter, rloc: 'EFUSE_RD_MAC_SYS_2_REG[27:24]', bloc: 'B11[3:0]'}
|
|
88
88
|
LDO_VO2_DREF : {show: y, blk : 1, word: 2, pos: 28, len : 4, start : 92, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO2 parameter, rloc: 'EFUSE_RD_MAC_SYS_2_REG[31:28]', bloc: 'B11[7:4]'}
|
|
89
89
|
LDO_VO1_MUL : {show: y, blk : 1, word: 3, pos : 0, len : 3, start : 96, type : 'uint:3', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO1 parameter, rloc: 'EFUSE_RD_MAC_SYS_3_REG[2:0]', bloc: 'B12[2:0]'}
|
|
@@ -25,7 +25,7 @@ EFUSES:
|
|
|
25
25
|
FORCE_DISABLE_SW_INIT_KEY : {show: y, blk : 0, word: 2, pos: 13, len : 1, start : 77, type : bool, wr_dis : 1, rd_dis: null, alt : '', dict : '', desc: Set this bit to disable software written init key; and force use efuse_init_key, rloc: 'EFUSE_RD_REPEAT_DATA1_REG[13]', bloc: 'B9[5]'}
|
|
26
26
|
KM_XTS_KEY_LENGTH_256 : {show: y, blk : 0, word: 2, pos: 14, len : 1, start : 78, type : bool, wr_dis : 1, rd_dis: null, alt : '', dict : '', desc: Set this bit to config flash encryption xts-512 key; else use xts-256 key when using the key manager, rloc: 'EFUSE_RD_REPEAT_DATA1_REG[14]', bloc: 'B9[6]'}
|
|
27
27
|
ECC_FORCE_CONST_TIME : {show: y, blk : 0, word: 2, pos: 15, len : 1, start : 79, type : bool, wr_dis : 14, rd_dis: null, alt : '', dict : '', desc: Set this bit to permanently turn on ECC const-time mode, rloc: 'EFUSE_RD_REPEAT_DATA1_REG[15]', bloc: 'B9[7]'}
|
|
28
|
-
|
|
28
|
+
DOWNLOAD_MODE_XPD_ON : {show: y, blk : 0, word: 2, pos: 16, len : 1, start : 80, type : bool, wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Set this bit to power on XPD in download mode, rloc: 'EFUSE_RD_REPEAT_DATA1_REG[16]', bloc: 'B10[0]'}
|
|
29
29
|
WDT_DELAY_SEL : {show: y, blk : 0, word: 2, pos: 17, len : 1, start : 81, type : bool, wr_dis : 2, rd_dis: null, alt : '', dict : '', desc: Select lp wdt timeout threshold at startup = initial timeout value * (2 ^ (EFUSE_WDT_DELAY_SEL + 1)), rloc: 'EFUSE_RD_REPEAT_DATA1_REG[17]', bloc: 'B10[1]'}
|
|
30
30
|
SPI_BOOT_CRYPT_CNT : {show: y, blk : 0, word: 2, pos: 18, len : 3, start : 82, type : 'uint:3', wr_dis : 4, rd_dis: null, alt : '', dict: '{0: "Disable", 1: "Enable", 3: "Disable", 7: "Enable"}', desc: 'Set this bit to enable SPI boot encrypt/decrypt. Odd number of 1: enable. even number of 1: disable', rloc: 'EFUSE_RD_REPEAT_DATA1_REG[20:18]', bloc: 'B10[4:2]'}
|
|
31
31
|
SECURE_BOOT_KEY_REVOKE0 : {show: y, blk : 0, word: 2, pos: 21, len : 1, start : 85, type : bool, wr_dis : 5, rd_dis: null, alt : '', dict : '', desc: Revoke 1st secure boot key, rloc: 'EFUSE_RD_REPEAT_DATA1_REG[21]', bloc: 'B10[5]'}
|
|
@@ -29,7 +29,7 @@ __all__ = [
|
|
|
29
29
|
"write_mem",
|
|
30
30
|
]
|
|
31
31
|
|
|
32
|
-
__version__ = "4.12.
|
|
32
|
+
__version__ = "4.12.dev3"
|
|
33
33
|
|
|
34
34
|
import argparse
|
|
35
35
|
import inspect
|
|
@@ -171,8 +171,8 @@ def main(argv=None, esp=None):
|
|
|
171
171
|
# --stub-version can be set with --no-stub so the tests wouldn't fail if this option is implied globally
|
|
172
172
|
parser.add_argument(
|
|
173
173
|
"--stub-version",
|
|
174
|
-
default=os.environ.get("ESPTOOL_STUB_VERSION",
|
|
175
|
-
choices=
|
|
174
|
+
default=os.environ.get("ESPTOOL_STUB_VERSION", None),
|
|
175
|
+
choices=["1", "2"],
|
|
176
176
|
# not a public option and is not subject to the semantic versioning policy
|
|
177
177
|
help=argparse.SUPPRESS,
|
|
178
178
|
)
|
|
@@ -728,7 +728,8 @@ def main(argv=None, esp=None):
|
|
|
728
728
|
print("esptool.py v%s" % __version__)
|
|
729
729
|
load_config_file(verbose=True)
|
|
730
730
|
|
|
731
|
-
|
|
731
|
+
if args.stub_version is not None:
|
|
732
|
+
StubFlasher.set_stub_subdir(args.stub_version)
|
|
732
733
|
|
|
733
734
|
# Parse filter arguments into separate lists
|
|
734
735
|
args.filterVids = []
|
|
@@ -632,10 +632,12 @@ def write_flash(esp, args):
|
|
|
632
632
|
# Decompress the compressed binary a block at a time,
|
|
633
633
|
# to dynamically calculate the timeout based on the real write size
|
|
634
634
|
decompress = zlib.decompressobj()
|
|
635
|
-
blocks = esp.flash_defl_begin(
|
|
635
|
+
blocks = esp.flash_defl_begin(
|
|
636
|
+
uncsize, len(image), address, encrypted_write=encrypted
|
|
637
|
+
)
|
|
636
638
|
else:
|
|
637
639
|
blocks = esp.flash_begin(
|
|
638
|
-
uncsize, address,
|
|
640
|
+
uncsize, address, encrypted_write=encrypted
|
|
639
641
|
)
|
|
640
642
|
argfile.seek(0) # in case we need it again
|
|
641
643
|
seq = 0
|
|
@@ -673,10 +675,7 @@ def write_flash(esp, args):
|
|
|
673
675
|
else:
|
|
674
676
|
# Pad the last block
|
|
675
677
|
block = block + b"\xff" * (esp.FLASH_WRITE_SIZE - len(block))
|
|
676
|
-
|
|
677
|
-
esp.flash_encrypt_block(block, seq)
|
|
678
|
-
else:
|
|
679
|
-
esp.flash_block(block, seq)
|
|
678
|
+
esp.flash_block(block, seq, encrypted=encrypted)
|
|
680
679
|
bytes_written += len(block)
|
|
681
680
|
bytes_sent += len(block)
|
|
682
681
|
image = image[esp.FLASH_WRITE_SIZE :]
|
|
@@ -147,6 +147,7 @@ class StubFlasher:
|
|
|
147
147
|
STUB_DIR = os.path.join(os.path.dirname(__file__), "targets", "stub_flasher")
|
|
148
148
|
# directories will be searched in the order of STUB_SUBDIRS
|
|
149
149
|
STUB_SUBDIRS = ["1", "2"]
|
|
150
|
+
STUB_VERSION_EXPLICIT = False
|
|
150
151
|
|
|
151
152
|
def __init__(self, target):
|
|
152
153
|
json_name = target.STUB_CLASS.stub_json_name(target)
|
|
@@ -171,20 +172,30 @@ class StubFlasher:
|
|
|
171
172
|
for i, subdir in enumerate(self.STUB_SUBDIRS):
|
|
172
173
|
json_path = os.path.join(self.STUB_DIR, subdir, json_name)
|
|
173
174
|
if os.path.exists(json_path):
|
|
174
|
-
if i:
|
|
175
|
+
if i and self.STUB_VERSION_EXPLICIT:
|
|
175
176
|
print(
|
|
176
|
-
f"
|
|
177
|
+
f"WARNING: {chip_name} stub version {self.STUB_SUBDIRS[0]} "
|
|
178
|
+
f"doesn't exist, using {subdir} instead."
|
|
177
179
|
)
|
|
178
|
-
|
|
180
|
+
if subdir == "2": # TODO: Remove this after legacy stub deprecation
|
|
181
|
+
print("Using the new stub flasher.")
|
|
179
182
|
return json_path
|
|
180
183
|
else:
|
|
181
|
-
raise
|
|
184
|
+
raise FatalError(
|
|
185
|
+
f"Flasher stub data is missing for {chip_name}. \n"
|
|
186
|
+
"This means the esptool installation is incomplete or broken - "
|
|
187
|
+
"stub JSON files were removed or a third-party distribution package "
|
|
188
|
+
"didn't ship them. "
|
|
189
|
+
"It is unlikely to be a defect in esptool itself.\n\n"
|
|
190
|
+
"Try reinstalling esptool or restoring the stub files "
|
|
191
|
+
"from the upstream source tree. As a workaround, "
|
|
192
|
+
"you can pass --no-stub (slower operation, fewer features)."
|
|
193
|
+
)
|
|
182
194
|
|
|
183
195
|
@classmethod
|
|
184
|
-
def
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
cls.STUB_SUBDIRS.insert(0, subdir)
|
|
196
|
+
def set_stub_subdir(cls, subdir):
|
|
197
|
+
cls.STUB_SUBDIRS = [subdir] + [x for x in cls.STUB_SUBDIRS if x != subdir]
|
|
198
|
+
cls.STUB_VERSION_EXPLICIT = True
|
|
188
199
|
|
|
189
200
|
|
|
190
201
|
class ESPLoader(object):
|
|
@@ -604,24 +615,29 @@ class ESPLoader(object):
|
|
|
604
615
|
active_port = self._port.port
|
|
605
616
|
|
|
606
617
|
# Pyserial only identifies regular ports, URL handlers are not supported
|
|
607
|
-
if not active_port.lower().startswith(
|
|
618
|
+
if not active_port.lower().startswith("com") and not os.path.isabs(active_port):
|
|
608
619
|
print(
|
|
609
620
|
"\nDevice PID identification is only supported on "
|
|
610
|
-
"COM and
|
|
621
|
+
"COM and absolute serial ports."
|
|
611
622
|
)
|
|
612
623
|
return
|
|
613
|
-
# Return the real path if the active port is a symlink
|
|
614
|
-
if active_port.startswith("/dev/") and os.path.islink(active_port):
|
|
615
|
-
active_port = os.path.realpath(active_port)
|
|
616
624
|
|
|
617
625
|
active_ports = [active_port]
|
|
626
|
+
if os.path.islink(active_port):
|
|
627
|
+
resolved = os.path.realpath(active_port)
|
|
628
|
+
if os.path.exists(resolved) and resolved != active_port:
|
|
629
|
+
active_ports.insert(0, resolved)
|
|
618
630
|
|
|
619
631
|
# The "cu" (call-up) device has to be used for outgoing communication on MacOS
|
|
620
|
-
if sys.platform == "darwin"
|
|
621
|
-
active_ports
|
|
632
|
+
if sys.platform == "darwin":
|
|
633
|
+
for port in active_ports[:]:
|
|
634
|
+
if "tty" in port:
|
|
635
|
+
active_ports.append(port.replace("tty", "cu"))
|
|
622
636
|
ports = list_ports.comports()
|
|
623
|
-
for
|
|
624
|
-
|
|
637
|
+
for active_port_candidate in active_ports:
|
|
638
|
+
for p in ports:
|
|
639
|
+
if p.device != active_port_candidate or p.pid is None:
|
|
640
|
+
continue
|
|
625
641
|
self.cache["usb_pid"] = p.pid
|
|
626
642
|
return p.pid
|
|
627
643
|
print(
|
|
@@ -965,7 +981,14 @@ class ESPLoader(object):
|
|
|
965
981
|
raise
|
|
966
982
|
pass
|
|
967
983
|
|
|
968
|
-
def flash_begin(
|
|
984
|
+
def flash_begin(
|
|
985
|
+
self,
|
|
986
|
+
size,
|
|
987
|
+
offset,
|
|
988
|
+
begin_rom_encrypted=False,
|
|
989
|
+
logging=True,
|
|
990
|
+
encrypted_write=None,
|
|
991
|
+
):
|
|
969
992
|
"""
|
|
970
993
|
Start downloading to Flash (performs an erase)
|
|
971
994
|
|
|
@@ -985,8 +1008,10 @@ class ESPLoader(object):
|
|
|
985
1008
|
params = struct.pack(
|
|
986
1009
|
"<IIII", erase_size, num_blocks, self.FLASH_WRITE_SIZE, offset
|
|
987
1010
|
)
|
|
988
|
-
if
|
|
989
|
-
|
|
1011
|
+
if encrypted_write is None:
|
|
1012
|
+
encrypted_write = begin_rom_encrypted
|
|
1013
|
+
if self.IS_STUB or self.SUPPORTS_ENCRYPTED_FLASH:
|
|
1014
|
+
params += struct.pack("<I", 1 if encrypted_write else 0)
|
|
990
1015
|
self.check_command(
|
|
991
1016
|
"enter Flash download mode", self.ESP_FLASH_BEGIN, params, timeout=timeout
|
|
992
1017
|
)
|
|
@@ -994,12 +1019,13 @@ class ESPLoader(object):
|
|
|
994
1019
|
print("Took %.2fs to erase flash block" % (time.time() - t))
|
|
995
1020
|
return num_blocks
|
|
996
1021
|
|
|
997
|
-
def flash_block(self, data, seq, timeout=DEFAULT_TIMEOUT):
|
|
1022
|
+
def flash_block(self, data, seq, timeout=DEFAULT_TIMEOUT, encrypted=False):
|
|
998
1023
|
"""Write block to flash, retry if fail"""
|
|
1024
|
+
operation = "encrypted " if encrypted else ""
|
|
999
1025
|
for attempts_left in range(WRITE_BLOCK_ATTEMPTS - 1, -1, -1):
|
|
1000
1026
|
try:
|
|
1001
1027
|
self.check_command(
|
|
1002
|
-
"write
|
|
1028
|
+
"write %sto target Flash after seq %d" % (operation, seq),
|
|
1003
1029
|
self.ESP_FLASH_DATA,
|
|
1004
1030
|
struct.pack("<IIII", len(data), seq, 0, 0) + data,
|
|
1005
1031
|
self.checksum(data),
|
|
@@ -1009,7 +1035,7 @@ class ESPLoader(object):
|
|
|
1009
1035
|
except FatalError:
|
|
1010
1036
|
if attempts_left:
|
|
1011
1037
|
self.trace(
|
|
1012
|
-
"
|
|
1038
|
+
f"{operation.capitalize()}block write failed, "
|
|
1013
1039
|
f"retrying with {attempts_left} attempts left"
|
|
1014
1040
|
)
|
|
1015
1041
|
else:
|
|
@@ -1017,29 +1043,8 @@ class ESPLoader(object):
|
|
|
1017
1043
|
|
|
1018
1044
|
def flash_encrypt_block(self, data, seq, timeout=DEFAULT_TIMEOUT):
|
|
1019
1045
|
"""Encrypt, write block to flash, retry if fail"""
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
# triggered by flash_begin(begin_rom_encrypted=True)
|
|
1023
|
-
return self.flash_block(data, seq, timeout)
|
|
1024
|
-
|
|
1025
|
-
for attempts_left in range(WRITE_BLOCK_ATTEMPTS - 1, -1, -1):
|
|
1026
|
-
try:
|
|
1027
|
-
self.check_command(
|
|
1028
|
-
"Write encrypted to target Flash after seq %d" % seq,
|
|
1029
|
-
self.ESP_FLASH_ENCRYPT_DATA,
|
|
1030
|
-
struct.pack("<IIII", len(data), seq, 0, 0) + data,
|
|
1031
|
-
self.checksum(data),
|
|
1032
|
-
timeout=timeout,
|
|
1033
|
-
)
|
|
1034
|
-
break
|
|
1035
|
-
except FatalError:
|
|
1036
|
-
if attempts_left:
|
|
1037
|
-
self.trace(
|
|
1038
|
-
"Encrypted block write failed, "
|
|
1039
|
-
f"retrying with {attempts_left} attempts left"
|
|
1040
|
-
)
|
|
1041
|
-
else:
|
|
1042
|
-
raise
|
|
1046
|
+
# Encryption is selected by the fifth word in flash_begin().
|
|
1047
|
+
return self.flash_block(data, seq, timeout, encrypted=True)
|
|
1043
1048
|
|
|
1044
1049
|
def flash_finish(self, reboot=False, timeout=DEFAULT_TIMEOUT):
|
|
1045
1050
|
"""Leave flash mode and run/reboot"""
|
|
@@ -1266,7 +1271,7 @@ class ESPLoader(object):
|
|
|
1266
1271
|
return self.STUB_CLASS(self)
|
|
1267
1272
|
|
|
1268
1273
|
@stub_and_esp32_function_only
|
|
1269
|
-
def flash_defl_begin(self, size, compsize, offset):
|
|
1274
|
+
def flash_defl_begin(self, size, compsize, offset, encrypted_write=False):
|
|
1270
1275
|
"""
|
|
1271
1276
|
Start downloading compressed data to Flash (performs an erase)
|
|
1272
1277
|
|
|
@@ -1292,10 +1297,8 @@ class ESPLoader(object):
|
|
|
1292
1297
|
params = struct.pack(
|
|
1293
1298
|
"<IIII", write_size, num_blocks, self.FLASH_WRITE_SIZE, offset
|
|
1294
1299
|
)
|
|
1295
|
-
if self.
|
|
1296
|
-
|
|
1297
|
-
# (not supported currently)
|
|
1298
|
-
params += struct.pack("<I", 0)
|
|
1300
|
+
if self.IS_STUB or self.SUPPORTS_ENCRYPTED_FLASH:
|
|
1301
|
+
params += struct.pack("<I", 1 if encrypted_write else 0)
|
|
1299
1302
|
self.check_command(
|
|
1300
1303
|
"enter compressed flash mode",
|
|
1301
1304
|
self.ESP_FLASH_DEFL_BEGIN,
|
|
@@ -29,7 +29,7 @@ class ESP32C2ROM(ESP32C3ROM):
|
|
|
29
29
|
EFUSE_SECURE_BOOT_EN_MASK = 1 << 21
|
|
30
30
|
|
|
31
31
|
EFUSE_SPI_BOOT_CRYPT_CNT_REG = EFUSE_BASE + 0x30
|
|
32
|
-
EFUSE_SPI_BOOT_CRYPT_CNT_MASK = 0x7 <<
|
|
32
|
+
EFUSE_SPI_BOOT_CRYPT_CNT_MASK = 0x7 << 7
|
|
33
33
|
|
|
34
34
|
EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT_REG = EFUSE_BASE + 0x30
|
|
35
35
|
EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT = 1 << 6
|
|
@@ -44,7 +44,7 @@ class ESP32C5ROM(ESP32C6ROM):
|
|
|
44
44
|
EFUSE_SPI_BOOT_CRYPT_CNT_MASK = 0x7 << 18
|
|
45
45
|
|
|
46
46
|
EFUSE_SECURE_BOOT_EN_REG = EFUSE_BASE + 0x038
|
|
47
|
-
EFUSE_SECURE_BOOT_EN_MASK = 1 <<
|
|
47
|
+
EFUSE_SECURE_BOOT_EN_MASK = 1 << 25
|
|
48
48
|
|
|
49
49
|
IROM_MAP_START = 0x42000000
|
|
50
50
|
IROM_MAP_END = 0x44000000
|
|
@@ -35,7 +35,7 @@ class ESP32C61ROM(ESP32C6ROM):
|
|
|
35
35
|
EFUSE_PURPOSE_KEY5_SHIFT = 20
|
|
36
36
|
|
|
37
37
|
EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT_REG = EFUSE_RD_REG_BASE
|
|
38
|
-
EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT = 1 <<
|
|
38
|
+
EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT = 1 << 14
|
|
39
39
|
|
|
40
40
|
EFUSE_SPI_BOOT_CRYPT_CNT_REG = EFUSE_BASE + 0x030
|
|
41
41
|
EFUSE_SPI_BOOT_CRYPT_CNT_MASK = 0x7 << 23
|