Skip to content

Outdated get-started document + running on Python3 (GIT8266O-707) #1129

@adam-ah

Description

@adam-ah

Environment

MacOS, latest version of RTOS SDK
Documentation from https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/get-started/index.html

Problem Description - get-started documentation

The get-started guide is getting very outdated, does not mention installing the toolchain via install.sh and setting up the environment via export.sh.

Would you accept pull request to update it?

Problem Description - reliance on the abandoned Python 2 environment

Related to the documentation issues above, the RTOS SDK focuses on the now obsolete Python 2 environment.

The shebang code in the tools also inconsistently calls for python, python2, and python3, further highlighting that the SDK both requires Python 2 and Python 3 to be present:

components/partition_table/test_gen_esp32part_host/gen_esp32part_tests.py:#!/usr/bin/env python components/partition_table/gen_esp32part.py:#!/usr/bin/env python components/partition_table/parttool.py:#!/usr/bin/env python components/partition_table/gen_empty_partition.py:#!/usr/bin/env python components/esptool_py/esptool/ecdsa/ellipticcurve.py:#! /usr/bin/env python components/esptool_py/esptool/ecdsa/ecdsa.py:#! /usr/bin/env python components/esptool_py/esptool/ecdsa/numbertheory.py:#! /usr/bin/env python components/esptool_py/esptool/test/test_imagegen.py:#!/usr/bin/env python components/esptool_py/esptool/test/test_esptool.py:#!/usr/bin/env python components/esptool_py/esptool/espsecure.py:#!/usr/bin/env python components/esptool_py/esptool/flasher_stub/compare_stubs.py:#!/usr/bin/env python components/esptool_py/esptool/flasher_stub/wrap_stub.py:#!/usr/bin/env python3 components/esptool_py/esptool/flasher_stub/esptool_test_stub.py:#!/usr/bin/env python components/esptool_py/esptool/esptool.py:#!/usr/bin/env python components/esptool_py/esptool/espefuse.py:#!/usr/bin/env python components/mbedtls/mbedtls/tests/scripts/test_generate_test_code.py:#!/usr/bin/env python3 components/mbedtls/mbedtls/tests/scripts/generate_test_code.py:#!/usr/bin/env python3 components/mbedtls/mbedtls/tests/scripts/check-files.py:#!/usr/bin/env python3 components/mbedtls/mbedtls/scripts/abi_check.py:#!/usr/bin/env python3 components/app_update/otatool.py:#!/usr/bin/env python components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py:#!/usr/bin/env python docs/gen-version-specific-includes.py:#!/usr/bin/env python docs/gen-dxd.py:#!/usr/bin/env python docs/gen-toolchain-links.py:#!/usr/bin/env python examples/provisioning/legacy/softap_prov/softap_prov_test.py:#!/usr/bin/env python examples/protocols/http_server/advanced_tests/scripts/test.py:#!/usr/bin/env python examples/protocols/http_server/simple/http_server_simple_test.py:#!/usr/bin/env python examples/protocols/http_server/simple/scripts/client.py:#!/usr/bin/env python examples/protocols/http_server/persistent_sockets/scripts/adder.py:#!/usr/bin/env python tools/ldgen/test/test_fragments.py:#!/usr/bin/env python tools/ldgen/test/test_generation.py:#!/usr/bin/env python tools/ldgen/ldgen.py:#!/usr/bin/env python tools/gen_esp_err_to_name.py:#!/usr/bin/env python tools/cmake/convert_to_cmake.py:#!/usr/bin/env python tools/idf_monitor.py:#!/usr/bin/env python tools/ci/envsubst.py:#!/usr/bin/env python tools/check_kconfigs.py:#!/usr/bin/env python tools/idf.py:#!/usr/bin/env python3 tools/idf_tools.py:#!/usr/bin/env python3 tools/test_check_kconfigs.py:#!/usr/bin/env python tools/idf_size.py:#!/usr/bin/env python tools/check_python_dependencies.py:#!/usr/bin/env python3 tools/kconfig_new/test/test_confserver.py:#!/usr/bin/env python tools/kconfig_new/confserver.py:#!/usr/bin/env python tools/kconfig_new/confgen.py:#!/usr/bin/env python tools/kconfig_new/gen_kconfig_doc.py:#!/usr/bin/env python tools/windows/eclipse_make.py:#!/usr/bin/env python tools/pack_fw.py:#!/usr/bin/env python2 tools/esp_prov/esp_prov.py:#!/usr/bin/env python

However, it seems simply editing the shebang in the following files are enough to run the stack on Python 3.
modified: tools/check_python_dependencies.py modified: tools/idf.py modified: tools/idf_tools.py

NB, Python 2 has been explicitly made abandoned over a year and a half ago, and there is no good reason to force people to hack around to try to run the SDK on Python 2. Python 3 is available on all systems by now and the SDK should be ported to Python to ASAP as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions