Commit Graph

55 Commits

Author SHA1 Message Date
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
Angus Gratton
e2767d9211 Update pyserial requirement to v3.0 or newer
Closes https://github.com/espressif/esptool/issues/317
2018-06-13 14:56:56 +10:00
Ryan Jarvis
b14eea6f06 add flake8-import-order dep 2017-09-17 17:04:11 -07:00
Ryan Jarvis
fa7e37aa4c PEP8 imports (https://www.python.org/dev/peps/pep-0008/#imports). Remove unused import statements. 2017-09-17 12:22:03 -07:00
Angus Gratton
582a069eba esptool v2.0 final release 2017-06-14 15:07:23 +10:00
Angus Gratton
9817cf1998 setup: Correctly install executable scripts on both posix & Windows
Closes #194
2017-04-24 15:01:41 +10:00
M Hickford
d291846bb4 In setup.py specify console_scripts rather than scripts.
This is preferable cross-platform compatibility. See https://packaging.python.org/distributing/#scripts and https://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation.

Fixes https://github.com/espressif/esptool/issues/181
2017-03-06 08:27:17 +00:00
Angus Gratton
8904583a33 Merge tag 'v1.3' into feature/esp32_v20_refactor 2017-01-09 17:59:53 +11:00
Angus Gratton
3aa8534346 Release version v1.3 2017-01-09 14:37:08 +11:00
Angus Gratton
1b2fe3bfc2 setup.py: Don't require flake8 to build, only to run tests 2017-01-09 14:37:08 +11:00
Angus Gratton
d2b304f181 Forward-port Python 3 compatibility to esptool v2.0
Merge commit 'cda4f2b5e5bc09571b55c4b5e6b1c9f5ec349514' into feature/esp32_v20_refactor
2017-01-09 12:27:30 +11:00
Angus Gratton
9959dc80bf Add other command line tools to setup.py 2016-12-15 12:46:12 +11:00
Angus Gratton
a1b567adfc Merge branch 'master' into feature/esp32_v20_refactor
Brings features added in v1.2 into v2.0 branch (most notably flash size detection.)
2016-12-14 11:39:26 +11:00
Angus Gratton
7ca4afb25c Python 2/3: Disable unicode_literals on Python 2
Preempts problems with os functions that may not be unicode-safe on 2.
2016-12-09 16:46:05 +11:00
Angus Gratton
f59aa12c36 Merge branch 'pull127' into python2_and_3 2016-12-09 15:10:46 +11:00
Angus Gratton
a8df520cb8 Add third-party pyaes & ecdsa modules
(added to source tree and also setup.py requirements, for now.)
2016-11-23 18:50:54 +11:00
Angus Gratton
1e3bf123cc Update setup.py for new URL, bump version to 1.3-dev 2016-11-08 11:42:07 +11:00
Angus Gratton
9d0d031014 Remove test_imagegen.py from setup.py tests, doesn't work properly in setup.py virtualenv 2016-10-20 09:17:06 +11:00
Angus Gratton
1fe8865828 elf2image: Fix esp8266 image generation bugs, update esp8266 image generation tests 2016-10-17 15:45:59 +11:00
Angus Gratton
9602fef824 README/setup: Add note that pyserial 2.5 or newer is required 2016-10-12 17:27:17 +11:00
Jeremy Herbert
ac85b3bd59 add python3.4 to travis, add futures to flake8 test 2016-09-22 13:48:53 +10:00
Jeremy Herbert
1acbe73bbf port esptool to python 2/3 2016-09-22 12:36:30 +10:00
Angus Gratton
7a384e79cb pep8/flake8 fixes 2016-09-15 14:24:31 +10:00
Angus Gratton
ab7680c81a elf2image test cases for ESP8266
Test runner supports esp32 but currently not enabled.
2016-08-17 17:07:00 +08:00
Angus Gratton
918fb17de7 setup.py: Force Flake8 <3.0.0, new version isn't backwards compatible 2016-07-14 21:01:38 +10:00
Angus Gratton
dea0e66abf Fix flake8 setuptools config 2016-04-29 08:12:34 +10:00
Angus Gratton
ba7d460b2d setup.py: Fix longdescription usage link 2016-04-21 14:29:56 +10:00
Angus Gratton
be97f08798 setup.py: Fix pep8 whitespace 2016-04-21 13:42:13 +10:00
Angus Gratton
aaa25e0cf0 Version 1.0.1 as uploaded to pypi (metadata changes)
V1.0.0 had a mistake so I had to burn that version due to pypi policy (oops.)
2016-04-21 13:22:14 +10:00