diff --git a/.flake8 b/.flake8 index 8bd15e05d0e..3c9277cc643 100644 --- a/.flake8 +++ b/.flake8 @@ -143,7 +143,6 @@ exclude = components/bootloader/subproject/components/micro-ecc/micro-ecc, components/bt/host/nimble/nimble, components/cmock/CMock, - components/esptool_py/esptool, components/json/cJSON, components/mbedtls/mbedtls, components/openthread/openthread, diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c2ed996fbe..acc809a7c3a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,6 +126,8 @@ before_script: - fetch_submodules - *download_test_python_contraint_file - $IDF_PATH/tools/idf_tools.py install-python-env + # install esptool globally, TODO: remove this, IDFCI-1207 + - pip install esptool -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE} # used for check scripts which we want to run unconditionally .before_script_no_sync_submodule: diff --git a/.gitlab/ci/assign-test.yml b/.gitlab/ci/assign-test.yml index 4afa4a5ecf6..b5f24545e95 100644 --- a/.gitlab/ci/assign-test.yml +++ b/.gitlab/ci/assign-test.yml @@ -3,8 +3,6 @@ stage: assign_test tags: - assign_test - variables: - SUBMODULES_TO_FETCH: components/esptool_py/esptool artifacts: paths: - ${TEST_DIR}/test_configs diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index 2a10d17ff16..0e7010d2066 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -248,7 +248,6 @@ test_app_test_pytest_esp32s2_usb_host: TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw" LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS" ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml" - SUBMODULES_TO_FETCH: "components/esptool_py/esptool" script: - *define_config_file_name # first test if config file exists, if not exist, exit 0 diff --git a/.gitmodules b/.gitmodules index 3e568b562ef..a385cdcced1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,10 +3,6 @@ # For Espressif's public projects please use '../../espressif/proj', not a '../proj' # -[submodule "components/esptool_py/esptool"] - path = components/esptool_py/esptool - url = ../../espressif/esptool.git - [submodule "components/bt/controller/lib_esp32"] path = components/bt/controller/lib_esp32 url = ../../espressif/esp32-bt-lib.git diff --git a/components/esptool_py/esptool b/components/esptool_py/esptool deleted file mode 160000 index aca9d70bd81..00000000000 --- a/components/esptool_py/esptool +++ /dev/null @@ -1 +0,0 @@ -Subproject commit aca9d70bd810c25bc953ca2f7587892c4dbaffc4 diff --git a/components/esptool_py/esptool/espefuse.py b/components/esptool_py/esptool/espefuse.py new file mode 100644 index 00000000000..78e23980ac3 --- /dev/null +++ b/components/esptool_py/esptool/espefuse.py @@ -0,0 +1,22 @@ +# +# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# +# SPDX-License-Identifier: Apache-2.0 +# + +import os +import sys + +try: + sys.path.remove(os.path.dirname(os.path.realpath(__file__))) # do not import this script +except ValueError: + pass + +try: + import espefuse +except ImportError: + raise ModuleNotFoundError('No module named "espefuse" please install espefuse.py by running ' + 'the install and export scripts.') + +if __name__ == '__main__': + espefuse._main() # type: ignore diff --git a/components/esptool_py/esptool/espsecure.py b/components/esptool_py/esptool/espsecure.py new file mode 100644 index 00000000000..68b03256500 --- /dev/null +++ b/components/esptool_py/esptool/espsecure.py @@ -0,0 +1,22 @@ +# +# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# +# SPDX-License-Identifier: Apache-2.0 +# + +import os +import sys + +try: + sys.path.remove(os.path.dirname(os.path.realpath(__file__))) # do not import this script +except ValueError: + pass + +try: + import espsecure +except ImportError: + raise ModuleNotFoundError('No module named "espsecure" please install espsecure.py by running ' + 'the install and export scripts.') + +if __name__ == '__main__': + espsecure._main() # type: ignore diff --git a/components/esptool_py/esptool/esptool.py b/components/esptool_py/esptool/esptool.py new file mode 100644 index 00000000000..3063556d4d4 --- /dev/null +++ b/components/esptool_py/esptool/esptool.py @@ -0,0 +1,22 @@ +# +# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# +# SPDX-License-Identifier: Apache-2.0 +# + +import os +import sys + +try: + sys.path.remove(os.path.dirname(os.path.realpath(__file__))) # do not import this script +except ValueError: + pass + +try: + import esptool +except ImportError: + raise ModuleNotFoundError('No module named "esptool" please install esptool.py by running ' + 'the install and export scripts.') + +if __name__ == '__main__': + esptool._main() # type: ignore diff --git a/docs/en/COPYRIGHT.rst b/docs/en/COPYRIGHT.rst index bd9c4c84cf3..3ee0fcb5779 100644 --- a/docs/en/COPYRIGHT.rst +++ b/docs/en/COPYRIGHT.rst @@ -73,13 +73,6 @@ These third party libraries can be included into the application (firmware) prod * `SEGGER SystemView`_ target-side library, Copyright (c) 2015-2017 SEGGER Microcontroller GmbH & Co. KG, is licensed under BSD 3-clause license. -Build Tools ------------ - -This is the list of licenses for tools included in this repository, which are used to build applications. The tools do not become part of the application (firmware), so their license does not affect licensing of the application. - -* :component:`esptool.py ` is Copyright (C) 2014-2016 Fredrik Ahlberg, Angus Gratton and is licensed under the GNU General Public License v2, as described in :component_file:`LICENSE file`. - Documentation ------------- diff --git a/tools/ci/static-analysis-rules.yml b/tools/ci/static-analysis-rules.yml index 9852eed9d55..afa6fffb95b 100644 --- a/tools/ci/static-analysis-rules.yml +++ b/tools/ci/static-analysis-rules.yml @@ -18,7 +18,6 @@ skip: - "components/esp_phy/lib" - "components/esp_wifi/lib" - "components/esp_wifi/lib_esp32" - - "components/esptool_py/esptool" - "components/ieee802154/lib" - "components/json/cJSON" - "components/lwip/lwip" diff --git a/tools/requirements/requirements.core.txt b/tools/requirements/requirements.core.txt index 3619b199807..e261ec6274f 100644 --- a/tools/requirements/requirements.core.txt +++ b/tools/requirements/requirements.core.txt @@ -9,11 +9,7 @@ pyparsing pyelftools idf-component-manager esp-coredump - -# esptool dependencies (see components/esptool_py/esptool/setup.py) -reedsolo -bitstring -ecdsa +esptool # kconfig and menuconfig dependencies kconfiglib