83 Commits

Author SHA1 Message Date
Peter Dragun
635cde1ef0 feat: Remove .py suffix from scripts
BREAKING CHANGE:
- The .py suffix is deprecated for the following scripts:
  - esptool
  - espefuse
  - espsecure
  - esp_rfc2217_server
2025-06-24 14:22:28 +02:00
Jakub Kocka
9b24215d69 refactor: Migrated esp_rfc2217_server into standalone subpackage
This change solves the issues when running on Windows
2024-08-28 16:37:12 +08:00
Peter Dragun
d34486ba42 change: use pyproject.toml instead of setup.py 2024-06-20 13:10:15 +02:00
Jan Beran
1de1a2659f docs(sphinx-lint): Add sphinx-lint to pre-commit, GH and GL pipelines 2024-02-12 17:08:55 +01:00
Jan Beran
1d5fcb31ab feat: Use ruff instead of flake8 and black both in pre-commit and CI 2024-01-31 15:27:35 +01:00
Peter Dragun
8ad6d57ea9 feat: add advisory port locking
Closes https://github.com/espressif/esptool/issues/946
2024-01-19 20:35:25 +08:00
radim.karnis
7f62e74ae1 ci(commitizen): Automatic changelog, revamp GH release process 2023-12-06 12:54:37 +01:00
Jakub Kocka
d1610a97ff fix: fixed exit() to be used from right module 2023-11-28 19:05:31 +00:00
Peter Dragun
7074bede97 feat: add support for intel hex format 2023-11-03 01:34:12 +00:00
radim.karnis
ef02d52044 feat: Add support for Python 3.12 2023-10-10 12:42:01 +00:00
Peter Dragun
3d899b2f47 feat(merge_bin): add support for uf2 format 2023-09-25 13:36:32 +00:00
KonstantinKondrashov
aa0ffc5cd5 espefuse: Adds yaml efuse description files for all chip
- esptool: Updates eFuses wafer major&minor versions
- esptool(esp32c6): Adds package versions
- espefuse(esp32c6): Replace PKG_VERSION BLK_VERSION_MINOR BLK_VERSION_MAJOR
- espefuse(esp32c6): Adds adc calib efuses
- espefuse: Adds yaml files for Build with PyInstaller
2023-05-12 14:38:46 +08:00
radim.karnis
d114420d37 ci: Fix libffi symlinks for cryptography>=40 2023-04-17 15:32:49 +02:00
Roland Dobai
e0a78941b0 Support more recent reedsolo packages
- https://github.com/tomerfiliba-org/reedsolomon/releases/tag/v1.6.1 - this seems to be related to licenses only.
- https://github.com/tomerfiliba-org/reedsolomon/releases/tag/v1.7.0 - this is related to installation.

Closes https://github.com/espressif/esptool/issues/872
2023-04-17 07:46:40 +00:00
Peter Dragun
4dfbeb38d3 build: limit max cryptography version to 40 2023-04-03 13:49:33 +02:00
Peter Dragun
b78044773d build: add esp_rfc2217_server to published scripts
Closes https://github.com/espressif/esptool/issues/846
2023-02-28 10:28:09 +00:00
harshal.patil
f2b942d707 espsecure.py: Added an External HSM Signing Interface
Refer the espsecure docs regarding the usage and integration
of esp_hsm_sign with espsecure.py
2023-01-13 14:22:33 +00:00
Roland Dobai
5490b0bb24 fix(setup): Use latest reedsolo package which can be installed with Python3.10 and Cython
Closes https://github.com/espressif/esptool/issues/711
2022-12-12 11:49:20 +01:00
Roland Dobai
ee27a64375 fix(espefuse): Fix compatibility with Bitstring>=4
bitstring==4 dropped class alias for BitStream. BitString was just an
alias in all supported bitstring versions:
https://github.com/scott-griffiths/bitstring/blob/bitstring-3.1.6/bitstring.py#L4247

Closes https://github.com/espressif/esptool/issues/797
2022-11-22 13:55:25 +01:00
Roland Dobai
09e41df303 fix: Add workaround for breaking changes of bitstring==4
Workaround for https://github.com/espressif/esptool/issues/797. The
proper solution will be added in a follow-up commit.
2022-11-21 13:21:30 +01:00
radim.karnis
1d18196eab ci(test_esptool): Migrate tests from unittest to pytest 2022-10-25 11:05:41 +02:00
radim.karnis
40e6afd97b ci(host_tests): Migrate from unittest to pytest
Closes https://github.com/espressif/esptool/issues/747/
2022-10-25 11:05:41 +02:00
radim.karnis
eb9dac972f ci: Add GL code quality reporting 2022-09-19 11:30:28 +02:00
radim.karnis
94f29a5e7d refactor(flasher_stub): Include stubs as json, do not embed in code 2022-07-28 21:23:12 +02:00
radim.karnis
6488ebb950 ci(coverage): Update to ~=6.0 2022-06-22 20:55:00 +02:00
radim.karnis
220c63063a refactor: Remove future imports 2022-06-15 15:45:10 +02:00
radim.karnis
30821a3f93 Make esptool callable as esptool.py even on Unix systems 2022-05-05 22:22:17 +02:00
radim.karnis
c57d11c03d Deprecate Python 2.7, 3.4, 3.5, 3.6 2022-04-20 18:10:12 +02:00
radim.karnis
45f1da954e refactoring: Employ Black code formatting 2022-03-28 23:06:34 +02:00
radim.karnis
513898db2a refactoring: Restructure espefuse and espsecure 2022-03-28 23:05:04 +02:00
radim.karnis
4875e8906f refactoring: Initial structure 2022-03-28 23:05:02 +02:00
radim.karnis
aa608227b5 Update copyright dates 2022-01-10 11:29:08 +01:00
radim.karnis
9af961540f docs: Migrate docs 2021-11-19 08:14:34 +01:00
Roland Dobai
269c38f908 Update license headers in the short SPDX format 2021-10-26 15:59:35 +02:00
Yegor Yefremov
df13de2788 Replace license header and copyright information with SPDX identifiers
This approach follows the one suggested by REUSE project.

https://reuse.software/spec/

Closes https://github.com/espressif/esptool/pull/476
2021-10-26 14:01:55 +02:00
Bartosz Bilas
4b14df383c setup.py: require wheel only when installing from pip
Fix the build from sources (that don't require wheel)
in environments where this module is not available.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>

Closes https://github.com/espressif/esptool/pull/632
2021-06-16 14:19:09 +02:00
radim.karnis
08bfa31b26 Add Python 3.9 support 2021-02-08 08:46:35 +01:00
radim.karnis
ce38d00c24 Migrate from Travis to GH Actions 2021-01-22 12:44:19 +01:00
Roland Dobai
875a0edcee Improve the main README with some known issues
Closes https://github.com/espressif/esptool/issues/585

Closes https://github.com/espressif/esptool/issues/582
2020-12-22 10:43:28 +01:00
radim.karnis
b131754741 Added coverage reporting
Running all tests through coverage.py, combining the results in a new stage and generating report artifacts
2020-12-02 18:59:12 +01:00
Angus Gratton
8270199920 setup.py: Require wheel to run setup
Fixes error output "error: invalid command 'bdist_wheel'" when installing from
pip (error doesn't prevent successful install).

wheel isn't supported on Python 3.4 (already EOL), so can't require it there.
2020-11-26 13:48:13 +08:00
Angus Gratton
c6f40c7ec7 setup.py: Add Python 3.7 & 3.8 versions in metadata 2020-11-18 19:38:19 +11:00
Angus Gratton
e3ab7c263c ecdsa: Replace vendored version with latest upstream via install_requires
Closes https://github.com/espressif/esptool/pull/230

(along with the switch of some dependencies to "pip install .[dev]")
2020-11-04 10:20:04 +08:00
Roland Dobai
05a1ebec8e Fix Python 2/3 compatibility with xmlrunner from unittest_xml_reporting 2020-10-07 09:05:56 +02:00
Angus Gratton
5dfa995992 flake8: Update setup.py to remove deprecated flake8 & tests_install keys
Also updates setup.cfg to use flake8 checks more thoroughly
2020-10-05 11:53:03 +11:00
Angus Gratton
746023b5db espsecure: Replace vendored pyaes (and optional pycrypto) with pyca-cryptography
Performance significantly improves over pyaes, roughly the same as pycrypto

pyca-cryptography is already a dependency of espsecure

Progress towards https://github.com/espressif/esptool/issues/414
2020-06-18 09:47:35 +10:00
Angus Gratton
916d2b9714 setup.py: Clean up python dependencies
* Use reedsolo v1.5.4 as 1.5.3 still may require a C
  compiler (https://github.com/tomerfiliba/reedsolomon/pull/24)
* Change the "manual install" instructions as esptool now requires
  more than just pyserial to start up
2020-06-18 09:47:35 +10:00
KonstantinKondrashov
988b9a2441 setup: Added versions for reedsolo and bitstring pkgs 2020-05-14 13:26:39 +10:00
KonstantinKondrashov
cb5297f5bf espefuse: Add support ESP32-S2 and Refactoring
Refactors the espefuse.py and adds support ESP32-S2 chip.

CMDs|ESP32|ESP32-S2|Batch burn mode|
dump|+|+|
summary|+|+|
read_protect_efuse|+|+|+|
write_protect_efuse|+|+|+|
burn_efuse|+|+|+|
burn_key|+|+|+|
burn_block_data|+|+|+|
burn_key_digest|+|+|+|
get_custom_mac|+|-|not support|
burn_custom_mac|+|-|not support|
set_flash_voltage|+|+|
adc_info|+|+|
burn_bit|+|+|

- Refactored corresponding with the new structure (see picture above)
- Using the bitstring lib to operate fields and blocks easy.
- Reading only once all blocks at init time. (No need to read each field separately)
- Burning through burn_all(). It analyzes errors and the possibility to write the new value of blocks. This approach allows us to save necessary efuses or blocks and burn them in once time. Applying the coding scheme is done in burn_all(). Not necessary to do the special conversion as it was for burn_custom_mac.
- To burn the new value of efuses/blocks need to call: efuse1.save(new_value1) ... efuseN.save(new_valueN) efuses.burn_all().
- Added the new command - set_bit. ./espefuse.py set_bit BLOCK10 0 1 2 4 8 16 32 64 96 128 160 192 224 255
- Unlike the previous !40 (closed) MR this MR has support set_flash_voltage and adc_info commands. Need to check format with esp32_s2_calibration.pdf
- Added a check of the burn values of blocks and fields. The burn is going from HI_num block to LOW_num block. It allows to read back burn block/field and compare it with expected writing value.
- Improved the description of messages to give the user understanding of what is going on.
- Added the new feature to save the whole dump of blocks to files, and after to burn those files with burn_block_data. Useful for testing.
- Added debug mode: flag -d, --debug. Prints more msgs.
- Implemented the approach if we need to hid some fields from the user depend on another. (see MAC_VERSION, BLOCK2_VERSION - calibration ADC)
- read_protect_efuse, write_protect_efuse, burn_efuse, burn_key, burn_block_data, burn_key_digest support the batch burn mode.
- Updated test_espefuse.py (ESP32, ESP32-S2)

Closes: ESPTOOL-4, ESPTOOL-10
2020-04-24 15:23:22 +08:00
Supreet Deshpande
9f87460a29 feat/eco3_secure_boot_v2: Update Secure Boot V2 utilities 2020-02-21 17:22:06 +11:00