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

How to fix the mess after esp-idf-tools-setup-offline-2.6.exe offline installer? (IEP-416) #259

Closed
samsam4 opened this issue May 3, 2021 · 47 comments
Labels
bug Something isn't working Installer
Milestone

Comments

@samsam4
Copy link

samsam4 commented May 3, 2021

Installation passed smooth without any errors reported, but after Create a new project using ESP-IDF Templates (based on instructions in README.md) after Build returns:
Build not configured correctly

So I start looking in the settings that suppose to be set automatically from installer, but what I see from my installation is quite different from what you show in the README.md
Help>Product Information reports:
IDF_PATH: D:/ESP/esp-idf
IDF_PYTHON_ENV_PATH:
PATH:

Operating System: windows 10
Java Runtime Version: 15.0.1+9-18
Eclipse Version: 4.18.0.v20201202-1800
Eclipse CDT Version: 10.1.0.202010062020
ESP-IDF version cannot be checked. IDF_PATH or IDF_PYTHON_ENV_PATH are not set.
Python set for IDF_PYTHON_ENV:
Python declared in PATH variable: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
Eclipse1
Environment

Help>ESP-IDF Tools Manager> List installed tools reports:
Some tools are not installed or IDF_PATH is not set. …
Help_ESP-IDFtools_ListInstalledTools

So how can make this installation work without to waste weeks of trying?
Thanks

@github-actions github-actions bot changed the title How to fix the mess after esp-idf-tools-setup-offline-2.6.exe offline installer? How to fix the mess after esp-idf-tools-setup-offline-2.6.exe offline installer? (IEP-416) May 3, 2021
@samsam4
Copy link
Author

samsam4 commented May 3, 2021

Update1:

After set
IDF_PYTHON_ENV_PATH and PATH variables I’ve got some progress, though there are some bug in setting the PATH variable:

I run ESP-IDF 4.2 CMD to set extra path settings for ESP then copy the path var from there, replace \ with / and add a PATH environment variable, but next when run Help>Product Information: I got some garbage for PATH in the report that stays in front of what I set for PATH:

PATH: D:/ESP/tools/idf-eclipse/2021-03//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin/server;D:/ESP/tools/idf-eclipse/2021-03//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\ActiveState Komodo Edit 11;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\PuTTY;D:\AndroidSDK\platform-tools;C:\Program Files\Java\jdk-12.0.1\bin;C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin;C:\Users\xx\AppData\Local\Microsoft\WindowsApps;;D:\ESP\esp-idf;and_from_here _start whatever_I_put_for_PATH….

So I go back delete the content of the PATH variable, then paste again and finally was fixed

Now Question1: what to do with those idf_python_env_path, idf_python_export_path, virtualenv_python
and idf_version_str?

Environment2

Question 2: Core build toolchains Do I need to add/edit anything:

CoreBuildToolchains

Question3: How to fix those ‘fatal:’ at the end of the report from Help>Product Information I have and which dir to put in Windows or Eclipse PATH variable for Python (that was no found)?
….
error: cannot spawn git: No such file or directory
fatal: Could not run 'git status --porcelain=2' in submodule third-party/mruby
fatal: 'git status --porcelain=2' failed in submodule components/nghttp/nghttp2
WARNING: Git version unavailable, reading from source
ESP-IDF v4.2.0
Python set for IDF_PYTHON_ENV: Python 3.8.7
Python declared in PATH variable: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

Thanks

@kolipakakondal
Copy link
Collaborator

Hi @samsam4

We are sorry that it didn't work out of the box. It seems to be there is some issue in running install tools and configuring environment variables.

To troubleshoot further, could you please provide the Eclipse error log https://github.com/espressif/idf-eclipse-plugin#error-log. You can export and attach a file.

@samsam4
Copy link
Author

samsam4 commented May 4, 2021 via email

@kolipakakondal
Copy link
Collaborator

Hello @samsam4

Looks like you have forgotten to attach a log file. Could you check?

Also,can you run the install tools action from Eclipse: Help > ESP-IDF Tools Manager > Install Tools. This will take care of configuring CDT build environment variables. Somehow these were not configured correctly In your case.

Please send the console log if you see any error during the install tools.

@samsam4
Copy link
Author

samsam4 commented May 4, 2021

No I didn't forget - I replied on the email I received, because it claimed that I could either reply directly to the email or online.
"Reply to this email directly, view it on GitHub, or unsubscribe. "
So obviously the problem is with Git - only text part of the response is accepted, attachments are discarded :(
Now I am responding/attaching online, so shouldn't be a problem ..
Regards

err3_5_21.log

@georgik
Copy link

georgik commented May 4, 2021

Thank you @samsam4 for reporting the problem. It seems that paths to Python and Git were not set properly for some reason. Would it be possible to attach content of file:
D:\ESP\tools\idf-eclipse\2021-*\esp_idf.json
This is the file where installer stores information about tools location and Eclipse plugins reads this data.

@samsam4
Copy link
Author

samsam4 commented May 4, 2021

Hi, attached zipped else git doesn't accept it.
Regards
esp_idf_json.zip

@georgik
Copy link

georgik commented May 4, 2021

@samsam4 Thank you for the log.
Do you use Eclipse deployed by installer or your own version?
The Eclipse deployed by installer should have following version:

Version: 2020-12 (4.18.0)
Build id: 20201210-1552

This Eclipse is located in C:\ESP\tools\idf-eclipse\2021-03, the same directory where esp_idf.json is located. The installer should also deploy the link to this Eclipse on the desktop.

Eclipse plugin loads the configuration file from Eclipse root directory. If you're using custom installation of Eclipse, please make sure to copy this esp_idf.json file to Eclipse root. The error in the seconds screenshot looks like a failure of the plugin to load values from esp_idf.json. The indication are these "variables" idf_python_env_path, idf_python_export_path, virtualenv_python which should not be there.

@kolipakakondal
Copy link
Collaborator

kolipakakondal commented May 4, 2021

Looks here is the problem from the error log. Let me look further on this. Basically git is not found on the PATH while running idf_tools.py export command

!ENTRY com.espressif.idf.core 1 0 2021-04-30 10:26:34.653
!MESSAGE Executing D:/ESP/python_env/idf4.2_py3.8_env/Scripts/python.exe D:\ESP\esp-idf\tools\idf_tools.py export --format=key-value

!ENTRY com.espressif.idf.core 1 0 2021-04-30 10:26:35.055
!MESSAGE Traceback (most recent call last):
  File "D:\ESP\esp-idf\tools\idf_tools.py", line 1492, in <module>
    main(sys.argv[1:])
  File "D:\ESP\esp-idf\tools\idf_tools.py", line 1488, in main
    action_func(args)
  File "D:\ESP\esp-idf\tools\idf_tools.py", line 1022, in action_export
    idf_python_env_path, idf_python_export_path, virtualenv_python = get_python_env_path()
  File "D:\ESP\esp-idf\tools\idf_tools.py", line 860, in get_python_env_path
    idf_version_str = subprocess.check_output(['git', 'describe'],
  File "subprocess.py", line 411, in check_output
  File "subprocess.py", line 489, in run
  File "subprocess.py", line 854, in __init__
  File "subprocess.py", line 1307, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified

@kolipakakondal
Copy link
Collaborator

As a workaround, you can always run Help > ESP-IDF Tools Manager > Install Tools and install the tools by providing the correct git, idf and python paths.

@kolipakakondal kolipakakondal added bug Something isn't working Installer labels May 4, 2021
@samsam4
Copy link
Author

samsam4 commented May 4, 2021

@georgik
I use Eclipse deployed by installer (from the desktop shortcut).
Just check the version - same what you said.
I have and 2 other older Eclipse installation on the same computer, but links to them dont exist anywhere in the windows PATH or other system variables.
Regards

@samsam4
Copy link
Author

samsam4 commented May 4, 2021

@kolipakakondal
PATH and IDF_PYTHON_ENV_PATH did not exist after installation.
I first added IDF_PYTHON_ENV_PATH as was pretty straightforward which dir to set and tried to see if PATH will be created and autofilled. There was some progress (different output) from Help>Product Information, but PATH didnt show yet, so I tried to solve what to put manually there as the example you posted in readme.md doesn't correspond to what I had after installation (as per my second posting - I only forget to mentioned there, that I add and paths to my existing jdk V12 installation).
Now after I try to analyze further the problem and trying to find best solution, maybe would be better to use (instead of my old jdk) paths to openjdk that came with installation and unexpectedly appears in the PATH while I was trying back and forth to find solution:

PATH: D:/ESP/tools/idf-eclipse/2021-03//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin/server;D:/ESP/tools/idf-eclipse/2021-03//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin; ....

Can you elaborate only why installer set // (double slashes) - is it bug, intentionally or doesn't matter?
Thanks

@samsam4
Copy link
Author

samsam4 commented May 5, 2021

@kolipakakondal
Help > ESP-IDF Tools Manager > Install Tools doesn't help at all :(

InstallTools1

I made two different attempts: First delete PATH env var hoping that Install tools will create it.
During the install Error Log window popup with some warning messages.
err4_5_21-1.log
After install PATH var was not created.

So I made second attempt, create and set PATH variable as:
D:/ESP/tools/idf-eclipse/2021-03//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin/server;D:/ESP/tools/idf-eclipse/2021-03//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;D:/ESP/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin;D:/ESP/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin;D:/ESP/tools/esp32ulp-elf/2.28.51-esp-20191205/esp32ulp-elf-binutils/bin;D:/ESP/tools/esp32s2ulp-elf/2.28.51-esp-20191205/esp32s2ulp-elf-binutils/bin;D:/ESP/tools/cmake/3.16.4/bin;D:/ESP/tools/openocd-esp32/v0.10.0-esp32-20200709/openocd-esp32/bin;D:/ESP/tools/ninja/1.10.0/;D:/ESP/tools/idf-exe/1.0.1/;D:/ESP/tools/ccache/3.7/;D:/ESP/tools/dfu-util/0.9/dfu-util-0.9-win64;D:/ESP/esp-idf/tools;D:/ESP/python_env/idf4.2_py3.8_env/Scripts;D:/ESP/tools/idf-git/2.30.1/cmd/;C:/Program Files (x86)/Common Files/Oracle/Java/javapath;C:/ProgramData/Oracle/Java/javapath;C:/Program Files (x86)/ActiveState Komodo Edit 11/;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;C:/WINDOWS/System32/WindowsPowerShell/v1.0/;C:/WINDOWS/System32/OpenSSH/;C:/Program Files/PuTTY/;D:/AndroidSDK/platform-tools/;C:/Program Files/Java/jdk-12.0.1/bin;C:/Program Files/Nordic Semiconductor/nrf-command-line-tools/bin/;C:/Users/xx/AppData/Local/Microsoft/WindowsApps;

Run again Help > ESP-IDF Tools Manager > Install Tools
This is the error log:
err4_5_21-2.log

After run Help>Product information (pay attention what PATH variables is reported, although in settings still show whatever I set when created it; neither 'fatals' for git at the end were resolved) :( :

Executing D:\ESP\python_env\idf4.2_py3.8_env\Scripts\python.exe D:\ESP\esp-idf\tools\idf_tools.py list

  • xtensa-esp32-elf: Toolchain for Xtensa (ESP32) based on GCC
    • esp-2020r3-8.4.0 (recommended, installed)
  • xtensa-esp32s2-elf: Toolchain for Xtensa (ESP32-S2) based on GCC
    • esp-2020r3-8.4.0 (recommended, installed)
  • esp32ulp-elf: Toolchain for ESP32 ULP coprocessor
    • 2.28.51-esp-20191205 (recommended, installed)
  • esp32s2ulp-elf: Toolchain for ESP32-S2 ULP coprocessor
    • 2.28.51-esp-20191205 (recommended, installed)
  • cmake: CMake build system
    • 3.16.4 (recommended, installed)
  • openocd-esp32: OpenOCD for ESP32
    • v0.10.0-esp32-20200709 (recommended, installed)
  • ninja: Ninja build system
    • 1.10.0 (recommended, installed)
  • idf-exe: IDF wrapper tool for Windows
    • 1.0.1 (recommended, installed)
  • ccache: Ccache (compiler cache)
    • 3.7 (recommended, installed)
  • dfu-util: dfu-util (Device Firmware Upgrade Utilities)
    • 0.9 (recommended, installed)

IDF_PATH: D:/ESP/esp-idf
IDF_PYTHON_ENV_PATH: D:/ESP/python_env/idf4.2_py3.8_env
PATH: C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\ActiveState Komodo Edit 11;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\PuTTY;D:\AndroidSDK\platform-tools;C:\Program Files\Java\jdk-12.0.1\bin;C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin;C:\Users\xx\AppData\Local\Microsoft\WindowsApps;;D:\ESP\esp-idf;D:/ESP/tools/idf-eclipse/2021-03//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin/server;D:/ESP/tools/idf-eclipse/2021-03//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;D:/ESP/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin;D:/ESP/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin;D:/ESP/tools/esp32ulp-elf/2.28.51-esp-20191205/esp32ulp-elf-binutils/bin;D:/ESP/tools/esp32s2ulp-elf/2.28.51-esp-20191205/esp32s2ulp-elf-binutils/bin;D:/ESP/tools/cmake/3.16.4/bin;D:/ESP/tools/openocd-esp32/v0.10.0-esp32-20200709/openocd-esp32/bin;D:/ESP/tools/ninja/1.10.0/;D:/ESP/tools/idf-exe/1.0.1/;D:/ESP/tools/ccache/3.7/;D:/ESP/tools/dfu-util/0.9/dfu-util-0.9-win64;D:/ESP/esp-idf/tools;D:/ESP/python_env/idf4.2_py3.8_env/Scripts;D:/ESP/tools/idf-git/2.30.1/cmd/;C:/Program Files (x86)/Common Files/Oracle/Java/javapath;C:/ProgramData/Oracle/Java/javapath;C:/Program Files (x86)/ActiveState Komodo Edit 11/;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;C:/WINDOWS/System32/WindowsPowerShell/v1.0/;C:/WINDOWS/System32/OpenSSH/;C:/Program Files/PuTTY/;D:/AndroidSDK/platform-tools/;C:/Program Files/Java/jdk-12.0.1/bin;C:/Program Files/Nordic Semiconductor/nrf-command-line-tools/bin/;C:/Users/xx/AppData/Local/Microsoft/WindowsApps

Operating System: windows 10
Java Runtime Version: 15.0.1+9-18
Eclipse Version: 4.18.0.v20201202-1800
Eclipse CDT Version: 10.1.0.202010062020
error: cannot spawn git: No such file or directory
fatal: Could not run 'git status --porcelain=2' in submodule third-party/mruby
fatal: 'git status --porcelain=2' failed in submodule components/nghttp/nghttp2
WARNING: Git version unavailable, reading from source
ESP-IDF v4.2.0
Python set for IDF_PYTHON_ENV: Python 3.8.7
Python declared in PATH variable: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

@georgik
Copy link

georgik commented May 6, 2021

@samsam4 Hm, that's interesting error.

Please try following workaround.

  • add following paths to PATH system variable variable (Windows Start - search for Edit the system environment variables):
D:\ESP\python_env\idf4.2_py3.8_env\Scripts\
D:\ESP\tools\idf-git\2.30.1\cmd\
  • start new Eclipse

If this approach does not work, please help us to diagnose more information using following steps:

  • download latest online installer 2.8: https://dl.espressif.com/dl/esp-idf-tools-setup-online-2.8.exe
    1. screen - accept license
    1. screen - let the System check finish, click Full log, there should be more diagnostic details, please attach the log in case of failure to this issue
    1. screen - select Use an existing ESP-IDF directory and specify D:\esp\esp-idf
    1. screen - change cache directory if necessary or keep it. According to previous logs it should be D:\esp, in my opinion it's better to use separate directory which does not overlap with ESP-IDF e.g. D:\esp\.espressif, but your configuration should work
    1. screen - check also Eclipse, check PowerShell - it will deploy new version with new version of the plugin
    1. screen - Install and finish installation

Expected result:

  • icon on Desktop pointing to new Eclipse in D:\esp\tools\idf-eclipse\2021-04 which should also contain file esp_idf.json which points to Python virtualenv and to existing Git
  • icon on Desktop pointing to PowerShell with ESP-IDF

Test build:

  • open PowerShell by the desktop link, type
cd examples/get-started/blink
idf.py build

Expected result:

  • build should run and finis correctly

Test Eclipse:

  • open Eclipse by icon on Desktop
  • check configuration and it should match with the configuration in .json file

@samsam4
Copy link
Author

samsam4 commented May 6, 2021

@georgik
Thanks - will try ASAP. Meanwhile could you elaborate on this - I found two different python.exe in this offline installation:

D:\ESP\python_env\idf4.2_py3.8_env\Scripts\python.exe 522kb
D:\ESP\tools\idf-python\3.8.7\python.exe 100kb

What is the second for and do I need to declare it anywhere in environment variables etc?
Regards

@georgik
Copy link

georgik commented May 6, 2021

@samsam4 This is common in Windows Python distribution which is quite misleading. One would expect that python.exe is the actual Python interpreter, but it's not always the case.

D:\ESP\tools\idf-python\3.8.7\python.exe 100kb - is the common Python interpreter
D:\ESP\python_env\idf4.2_py3.8_env\Scripts\python.exe 522kb - is special binary which has the name python.exe created by virtualenv. This basically initialize virtual environment and invokes the python.exe in the main Python.

So even when it might look like two Pythons, it's just one, where the second is the starting binary for the first one.

When you invoke python.exe in virtualenv it will load site-packages that are specific for virtualenv, that's the case of ESP-IDF, because idf_tools.py is using virtualenv for each major version of ESP-IDF. You can find different virtualenvs in D:\ESP\tools\python_env.

You can find project which bundles idf-python at https://github.com/espressif/idf-python . It's so called Embedded Python with additional package of virtualenv.

So to answer your question. Add just path to Python in virtualenv D:\ESP\python_env\idf4.2_py3.8_env\Scripts\python.exe, this Python will find its parent thanks to file D:\ESP\python_env\idf4.2_py3.8_env\Scripts\pyvenv.cfg

@samsam4
Copy link
Author

samsam4 commented May 6, 2021

@georgik
With adding those 2 sys vars to Windows Path, everything (fatal, error) cleared: :)
D:\ESP\python_env\idf4.2_py3.8_env\Scripts
D:\ESP\tools\idf-git\2.30.1\cmd\

Help>Product Information:
.....
Operating System: windows 10
Java Runtime Version: 15.0.1+9-18
Eclipse Version: 4.18.0.v20201202-1800
Eclipse CDT Version: 10.1.0.202010062020
ESP-IDF v4.2
Python set for IDF_PYTHON_ENV: Python 3.8.7
Python declared in PATH variable: Python 3.8.7

The only problem was this reoccurring Eclipse PATH problem that adds/duplicates autogenerated PATH at the beginning of the PATH I already put there, so I delete completely PATH on Window>Preferences>C/C++Build>Environment and restarted Eclipse so now is only autogenerated PATH and I clean, build and flash the the blink example - dont see any other problems so far :)

Environment4

Will try though and the new installer 2.8 in a new dir later, so could have some straws to compare if also doesnt go as expected ;)

Thank you and best regards

@georgik
Copy link

georgik commented May 7, 2021

@samsam4 Thank you for the feedback.

@kolipakakondal Please, could you check whether Eclipse plugin is adding path to Git and Python from the JSON to system PATH when launching subprocesses?
Other option (installer 2.7+) would be to invoke shell initializers .espressif\idf_cmd_init.bat or .espressif\Initialize-Idf.ps1 in the ESP-IDF directories. These initializers contains code which is able to find Git and Python specific for ESP-IDF instance. You can find them as target of desktop links deployed by installer.

@kolipakakondal
Copy link
Collaborator

#261

Hi @samsam4 I have prepared a fix for this issue by setting up the git path to the java run-time process. To verify this, I need your help.

Download artifacts from here https://github.com/espressif/idf-eclipse-plugin/suites/2671932894/artifacts/58873860
And follow the instructions from here https://github.com/espressif/idf-eclipse-plugin#installPluginsUsingLocalFile

Let me know how it goes.

@kolipakakondal
Copy link
Collaborator

kolipakakondal commented May 7, 2021

Hi @georgik - problem is with the idf.py export command, which is getting failed because of the git path issue #259 (comment). Let's wait for the @samsam4 feedback with the local build.

@samsam4
Copy link
Author

samsam4 commented May 7, 2021

@kolipakakondal #261
I am a little confused: Are we talking about version 2.6 which I already have installed and fixed OR for the new version 2.8 that I didn't start installing yet?
If we talking for 2.6: does your patch uses different dirs for
D:\ESP\python_env\idf???_env\Scripts
D:\ESP\tools\idf-git?.?.?\cmd
else how I will check/be sure if the new patch works or not if I dont first remove manually older vars from Windows System Environment?
Also I remember that in order to move initially from total failure I had to set IDF_PYTHON_ENV_PATH manually - do I need to delete this or any other var in Window>Preferences>C/C++Build>Environment before try to install your fix?
Thanks

@kolipakakondal
Copy link
Collaborator

It's simple! Maybe these instructions could help you @samsam4

@kolipakakondal
Copy link
Collaborator

Hi @samsam4

Did you have a chance to verify the above build?

@samsam4
Copy link
Author

samsam4 commented May 12, 2021

@kolipakakondal
Sorry, not yet - have some work with higher priority to finish first.
BTW Is your last patch embedded in last offline installer? Because I'm more interested in the offline installer rather than to install everything separately?
Regards

@kolipakakondal
Copy link
Collaborator

Hi @samsam4 No. It will be with the next version of the plugin and offline installer

@samsam4
Copy link
Author

samsam4 commented May 14, 2021

@kolipakakondal
Hi, From links that you posted above for Eclipse CDT and follow next link I see "Eclipse IDE for C/C++ Developers". There is a link Eclipse CDT on the right side, but nothing to download from there?
So which Eclipse version to download??
Thanks

@naveedabbasi
Copy link

Kindly try to look at this issue, I am unable to import projects other than the example in eclipse.
#267
................................................................

I was facing the same issue, I uninstall again and then install again, run the example, it workd.

@samsam4
Copy link
Author

samsam4 commented May 17, 2021

More bugs: :(
CMD shortcut seems was working initially Ok, seems after Help > ESP-IDF Tools Manager > Install Tools or any of the other manual tweak on environment variables (posted above) doesn't work anymore :(
cmd_echo_problem

The funny part is that I've made couple tries changing "echo." to "echo ." or "echo _" in idf_cmd_init.bat, but the output is always the same (including and if I type echo. in the same cmd window):
'echo.' is not recognized as an internal or external command, operable program or batch file.

But if open standard Windows10 cmd window or run a .bat file with some "echo." lines through a shortcut to cmd.exe, everything pass normal (outputs empty lines), so the screwed Win 10 was discarded as possible root cause and suspicion goes back to ESP plugin/tools :(

@georgik
Copy link

georgik commented May 18, 2021

@samsam4 Thank you for reporting problem with CMD initializer. The behavior is really strange.

echo. should print an empty line to the screen. Here is information from Microsoft manual: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/echo

The initializer is using common Windows CMD C:\WINDOWS\system32\cmd.exe. You can see whole command when you right click the icon and select Properties.

Please, could you provide an information which Antivirus is present on the Windows PC? In some cases Antivirus adds it's own wrapper around cmd or runs it in container.

Do you experience the same problem when using PowerShell launcher from Desktop?

@samsam4
Copy link
Author

samsam4 commented May 18, 2021

@georgik
PowerShell still working Ok as at the beginning after installation.
CMD - I already mentioned in my previous post - I wrote a simple test_echo1.bat with couple echo *** and echo.
test_echo1.zip
@echo off echo Test1 echo. echo Test2 echo. echo. echo Test3 echo.
and start it same way as Esp's cmd: C:\Windows\System32\cmd.exe /k D:\W21\ESP\problem\echo_\test_echo1.bat
And it works as suppose to:
Test_echo1

while at the sane time idf_cmd_init.bat started from the installer generated shortcut produces the errors output I posted before
Regards

@samsam4
Copy link
Author

samsam4 commented May 19, 2021

Update: Cause for "'echo.' is not recognized as an internal or external command, operable program or batch file." identified:
Somewhere between my post1 and post2 while I was trying to set manually some environment variables in order to kickoff Eclipse, some of the Eclipse or ESP-IDF scripts produced a file with name echo (no extension) and length 0.
So as far as such file exists in any Windows folder, starting a command prompt in this folder for "echo." always will return "'echo.' is not recognized as an internal or external command, operable program or batch file."
but surprisingly "echo blablabla" returns blablabla
So I moved away from esp-idf folder in other folder this file "echo" and ESP-IDF 4.2 CMD works normal as was working at the very beginning :)

echo.zip

@georgik
Copy link

georgik commented May 19, 2021

@samsam4 Wow. That's insidious trap. I would never guess that echo file can generate such behavior. I'll double check deployment process for potential source of empty echo file.

@georgik
Copy link

georgik commented May 19, 2021

@samsam4 Regarding 'echo.' problem: I was not able to find the source of the 'echo.' file in deployment process.
I've added check to CMD initializer in PR: espressif/idf-installer#21
The updated installer is available here: https://github.com/espressif/idf-installer/releases/tag/online-2.9-beta-04

@samsam4
Copy link
Author

samsam4 commented May 25, 2021

@georgik
I've tested 2.9beta04 online installer - seems work Ok - just minor "cosmetic" issues had during installation.
Error log shows some errors and warnings err_log1.log , but I was able to build the 'blink' example without errors (didn't try to flash it yet though) err_log_blink2.log .

The only serious issue I have so far not resolved - cant get/access 'make' command (in 2.6 installer too). As per ESP documentation 'make' may be removed in future, but it claims should be still available, but I cant get it neither in ESP-IDF cmd nor in power shell?
Regards

@georgik
Copy link

georgik commented May 25, 2021

@samsam4 Thank you for posting those logs and testing the installation.

Regarding make I've checked old documentation and v3.3 is referencing make as build tool for ESP-IDF: https://docs.espressif.com/projects/esp-idf/en/release-v3.3/get-started/index.html

Make was replaced by idf.py, CMake and ninja. Referenced from documentation starting v4.0.2: https://docs.espressif.com/projects/esp-idf/en/v4.0.2/get-started/index.html. There should not be a need for make.

Please, could you send a link to the documentation mentioning make?

@kolipakakondal
Copy link
Collaborator

Hi @samsam4

The errors you see in the error log related to eclipse loading and it does not cause any issue to idf eclipse plugins and functionality. Anyway, those are not real errors to be considered. Hence, ignore them.

IDF Eclipse plugin works only with the CMake and ESP-IDF 4.0 and higher.

Glad that the online installer approach worked for you. I believe we can close this issue.

@samsam4
Copy link
Author

samsam4 commented May 26, 2021

Yes, I think you can close this issue. After I see 2.9 offline installer if there are some issues I could start a new thread.
There is only one "cosmetic" issue that I found - missing button "Make New Folder"
scr5dXX

If you select "Browse" on previous dialog for Select Destination Location. There is a workaround to type the name of the path including the new folder, but it is not quite intuitive and could be problem for some people.

@georgik there were few places were is mentioned:

Since ESP-IDF V4.0, the default build system is based on CMake. This documentation is for the legacy build system based on GNU Make. Support for this build system may be removed in future major releases.

, but it was my mistake - I didnt read all the chain of links that follow - it's different toolchain that uses the old MSYS2. I was trying to explore one library for SPI displays that is using esp-idf 4.0 but still using 'make' for the creation and flashing spiffs images, but obviously will have to search other solution :(

Thanks for the cooperation in a timely manner! Best regards!

@georgik
Copy link

georgik commented May 27, 2021

@samsam4 Thank you for pointing out the Browse problem. I'll check whether it's possible to add it somehow. The installer is based on Inno Setup which has limited options of changing UI.

@samsam4
Copy link
Author

samsam4 commented May 27, 2021

@georgik This is a 'cosmetic' i.e. not so important issue, but because I saw on the other dialogs in the same installer that you already have such button, I thought is just missed on this particular one that I mentioned above.
Best regards

MakeNewFolderBtnXX

@samsam4
Copy link
Author

samsam4 commented May 30, 2021

Unfortunately the old problem with 'fatal's and cant find python in the PATH etc. resurfaced without to make any changes in installation, even didn't open this installation of Eclipse for couple days. Only downloaded one ESP project from here, imported it and when I saw some errors checked Help>Product Information, then saw similar errors like before, closed the new project and return to 'blink' project - same error output for Help>Product Information, ... restart Eclipse, restart Windows, always same output:
errLog30-5-21.log

Executing D:\ESP2_9b_tools.espressif\python_env\idf4.2_py3.8_env\Scripts\python.exe D:\ESP2_9b\tools\idf_tools.py list

  • xtensa-esp32-elf: Toolchain for Xtensa (ESP32) based on GCC
    • esp-2020r3-8.4.0 (recommended, installed)
  • xtensa-esp32s2-elf: Toolchain for Xtensa (ESP32-S2) based on GCC
    • esp-2020r3-8.4.0 (recommended, installed)
  • esp32ulp-elf: Toolchain for ESP32 ULP coprocessor
    • 2.28.51-esp-20191205 (recommended, installed)
  • esp32s2ulp-elf: Toolchain for ESP32-S2 ULP coprocessor
    • 2.28.51-esp-20191205 (recommended, installed)
  • cmake: CMake build system
    • 3.16.4 (recommended, installed)
  • openocd-esp32: OpenOCD for ESP32
    • v0.10.0-esp32-20200709 (recommended, installed)
  • ninja: Ninja build system
    • 1.10.0 (recommended, installed)
  • idf-exe: IDF wrapper tool for Windows
    • 1.0.1 (recommended, installed)
  • ccache: Ccache (compiler cache)
    • 3.7 (recommended, installed)
  • dfu-util: dfu-util (Device Firmware Upgrade Utilities)
    • 0.9 (recommended, installed)

IDF_PATH: D:/ESP2_9b/
IDF_PYTHON_ENV_PATH: D:\ESP2_9b_tools.espressif\python_env\idf4.2_py3.8_env
PATH: D:\ESP2_9b_tools.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin;D:\ESP2_9b_tools.espressif\tools\xtensa-esp32s2-elf\esp-2020r3-8.4.0\xtensa-esp32s2-elf\bin;D:\ESP2_9b_tools.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;D:\ESP2_9b_tools.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;D:\ESP2_9b_tools.espressif\tools\cmake\3.16.4\bin;D:\ESP2_9b_tools.espressif\tools\openocd-esp32\v0.10.0-esp32-20200709\openocd-esp32\bin;D:\ESP2_9b_tools.espressif\tools\ninja\1.10.0;D:\ESP2_9b_tools.espressif\tools\idf-exe\1.0.1;D:\ESP2_9b_tools.espressif\tools\ccache\3.7;D:\ESP2_9b_tools.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64;D:\ESP2_9b_tools.espressif\python_env\idf4.2_py3.8_env\Scripts;D:\ESP2_9b\tools;D:/ESP2_9b_tools/.espressif/tools/idf-eclipse/2021-04//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin/server;D:/ESP2_9b_tools/.espressif/tools/idf-eclipse/2021-04//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin;D:\ESP2_9b_tools.espressif\tools\idf-python\3.8.7;D:\ESP2_9b_tools.espressif\tools\idf-git\2.30.1\cmd;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\ActiveState Komodo Edit 11;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\PuTTY;D:\AndroidSDK\platform-tools;C:\Program Files\Java\jdk-12.0.1\bin;C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin;C:\Users\xx\AppData\Local\Microsoft\WindowsApps;;D:\ESP2_9b;

Operating System: windows 10
Java Runtime Version: 15.0.2+7-27
Eclipse Version: 4.19.0.v20210303-1800
Eclipse CDT Version: 10.2.0.202012191711
IDF Eclipse Plugin Version: 2.1.0.202104140338
error: cannot spawn git: No such file or directory
fatal: Could not run 'git status --porcelain=2' in submodule third-party/mruby
fatal: 'git status --porcelain=2' failed in submodule components/nghttp/nghttp2
WARNING: Git version unavailable, reading from source

ESP-IDF v4.2.1
Python set for IDF_PYTHON_ENV: Python 3.8.7
Python declared in PATH variable: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

@samsam4
Copy link
Author

samsam4 commented Jun 1, 2021

Will close this issue as the latest problem although observed and before with 2.6 is with the newest version of plugin/installer 2.9beta, so better to rise it as a new issue.
Thanks everybody who helped to clear most of the issues in this thread so far.

@samsam4 samsam4 closed this as completed Jun 1, 2021
@georgik
Copy link

georgik commented Jun 2, 2021

@samsam4 Thank you for all the data. Let me just add an update about Make New Folder.
The page where Make New Folder is missing is the default page of Inno Setup for selecting destination which has by default disabled flag for creating the folder.

One solution would be to implement a completely new page to handle the selection like here: https://stackoverflow.com/questions/42145152/inno-setup-how-do-i-specify-multiple-directories-for-select-destination-locatio

Feel free to add PR to https://github.com/espressif/idf-installer

We're considering moving away from Inno Setup which has many limitations like missing Make New Folder.

@samsam4
Copy link
Author

samsam4 commented Jun 2, 2021

@georgik Thanks for the update - I'd suggest to forget for now for this problem as it is really petty for most of the people that will use this installer. Seems there far more important problems to polish meanwhile, so better fix them with higher priority ;)
Best regards

@kolipakakondal kolipakakondal added this to the v2.1.1 milestone Jun 29, 2021
@kolipakakondal
Copy link
Collaborator

Update1:

After set
IDF_PYTHON_ENV_PATH and PATH variables I’ve got some progress, though there are some bug in setting the PATH variable:

I run ESP-IDF 4.2 CMD to set extra path settings for ESP then copy the path var from there, replace \ with / and add a PATH environment variable, but next when run Help>Product Information: I got some garbage for PATH in the report that stays in front of what I set for PATH:

PATH: D:/ESP/tools/idf-eclipse/2021-03//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin/server;D:/ESP/tools/idf-eclipse/2021-03//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\ActiveState Komodo Edit 11;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\PuTTY;D:\AndroidSDK\platform-tools;C:\Program Files\Java\jdk-12.0.1\bin;C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin;C:\Users\xx\AppData\Local\Microsoft\WindowsApps;;D:\ESP\esp-idf;and_from_here _start whatever_I_put_for_PATH….

So I go back delete the content of the PATH variable, then paste again and finally was fixed

Now Question1: what to do with those idf_python_env_path, idf_python_export_path, virtualenv_python
and idf_version_str?

Environment2

Question 2: Core build toolchains Do I need to add/edit anything:

CoreBuildToolchains

Question3: How to fix those ‘fatal:’ at the end of the report from Help>Product Information I have and which dir to put in Windows or Eclipse PATH variable for Python (that was no found)?
….
error: cannot spawn git: No such file or directory
fatal: Could not run 'git status --porcelain=2' in submodule third-party/mruby
fatal: 'git status --porcelain=2' failed in submodule components/nghttp/nghttp2
WARNING: Git version unavailable, reading from source
ESP-IDF v4.2.0
Python set for IDF_PYTHON_ENV: Python 3.8.7
Python declared in PATH variable: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

Thanks

The issue related to environment variables got fixed with v2.1.1

@samsam4
Copy link
Author

samsam4 commented Jul 1, 2021

@kolipakakondal The issue related to environment variables got fixed with v2.1.1

Unfortunately the tests I made with the newest as of today v2.1.2 plugin shows neither problem with environment variables were fixed even there are more problems than before as the projects cant even kick off because the plugin keeps asking again and again for git and python locations :( :(

@nathangoss
Copy link

I am also experiencing the same issues on a fresh install of the latest Eclipse and ESP-IDF on my Mac.

@samsam4 - have you managed to have any luck getting a project opened?

@samsam4
Copy link
Author

samsam4 commented Jul 9, 2021

@nathangoss
Yes, I have a workaround, but is for Windows - add git and python paths to Windows Environment variable Path. Not sure how can achieve similar functionality with Mac OS.
Also - older plugin v2.1.0 behaves much better regarding this problem than the newest 2.1.2 (haven't tried the one between 2.1.1) but the older plugins cant work with the newest Eclipse! (with Eclipse 2021-03 plugin v2.1.0 works fine regarding this problem than newest plugin)!

https://user-images.githubusercontent.com/30199901/120491459-4032bb80-c387-11eb-88cd-72fc6702542d.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Installer
Projects
None yet
Development

No branches or pull requests

5 participants