Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
adam-ah opened this issue Aug 27, 2021 · 2 comments
Open

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

adam-ah opened this issue Aug 27, 2021 · 2 comments

Comments

@adam-ah
Copy link

adam-ah commented Aug 27, 2021

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.

@github-actions github-actions bot changed the title Outdated get-started document + running on Python3 Outdated get-started document + running on Python3 (GIT8266O-707) Aug 27, 2021
@st1vms
Copy link

st1vms commented Mar 30, 2022

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

I tried this very step, by also installing the library using install.sh and export.sh it fixed the python : Command not found error for my python3 environment. Thanks a lot @adam-ah 🥇

@mrx23dot
Copy link

On Windows I got this from following the tutorial

D:\DRIVE\Projects\FW_esp8266\src>make menuconfig
D:\Progs\esp8266_rtos_sdk/make/project.mk:60: esp-idf build system only supports GNU Make versions 3.81 or newer. You may see unexpected results with other Makes.
D:\Progs\esp8266_rtos_sdk/make/project.mk:94: *** IDF_PATH variable is not set to a valid directory..  Stop.

D:\DRIVE\Projects\FW_esp8266\src>echo %IDF_PATH%
D:\Progs\esp8266_rtos_sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants