Page 1 of 1

(resolved) issue with toolchain, maybe environment variables

Posted: Thu Oct 24, 2019 4:13 pm
by mzimmers
Hi all -

I'm trying to build one of the Ethernet examples from the latest IDF. Whenever I make, I get this warning:

Code: Select all

WARNING: Toolchain version is not supported: crosstool-ng-1.22.0-80-g6c4433a5
Expected to see version: esp32-2019r1
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 5.2.0
Expected to see version(s): 8.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
Python requirements from C:/esp-idf/requirements.txt are satisfied.
WARNING: Toolchain version is not supported: crosstool-ng-1.22.0-80-g6c4433a5
Expected to see version: esp32-2019r1
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
I've even gone so far as to remove the 5.2 directory from my C:\Users\MZimmers\.espressif\tools\xtensa-esp32-elffolder and I still get this error. Any idea what I'm doing wrong?

Thanks...

Re: issue with toolchain, maybe environment variables

Posted: Thu Oct 24, 2019 11:57 pm
by jsam589
You may already know this, but v3.x of IDF used the crosstool-ng 5.2.0 toolchain. Starting with v4.x, they are using a new toolchain, the 2019r1 8.2.0. I tried using one with the other's IDF and it does not play well together.

It looks like you are on a Windows host - did you install using the all-in-one setup installer? That is what I recommend for Windows if using v4.x IDF. You might also need to check the environment variables, there may be something like IDF_PATH or IDF_TOOLS_PATH that is still referencing the old location.

Re: issue with toolchain, maybe environment variables

Posted: Fri Oct 25, 2019 3:44 pm
by mzimmers
Hi jsan -

Thanks for the reply. I deleted the old toolchain, and still get the error.

Something's definitely messed up in my build environment, though. If I run idf.py, I can build. If I run make, I get this error now:

Code: Select all

DEFCONFIG
Traceback (most recent call last):
  File "C:/esp-idf/tools/kconfig_new/confgen.py", line 548, in <module>
    main()
  File "C:/esp-idf/tools/kconfig_new/confgen.py", line 236, in main
    deprecated_options = DeprecatedOptions(config.config_prefix, path_rename_files=sdkconfig_renames)
  File "C:/esp-idf/tools/kconfig_new/confgen.py", line 51, in __init__
    self.r_dic, self.rev_r_dic = self._parse_replacements(path_rename_files)
  File "C:/esp-idf/tools/kconfig_new/confgen.py", line 67, in _parse_replacements
    with open(rep_path) as f_rep:
IOError: [Errno 2] No such file or directory: '/c/esp-idf/components/bootloader/sdkconfig.rename'
To answer your question, yes, I used the esp-idf-tools-setup-2.1.exe to install the toolchain. I don't think any of my environment variables are bad:

Code: Select all

$ env | grep IDF
IDF_TOOLS_PATH=C:\Users\mzimmers\.espressif
OPENOCD_SCRIPTS=C:\Program Files\Espressif\ESP-IDF Tools\tools\share\openocd\scripts
IDF_PATH=/c/esp-idf
So, I'm somewhat at a loss to understand what's going on.

Re: issue with toolchain, maybe environment variables

Posted: Fri Oct 25, 2019 5:21 pm
by mzimmers
Found it (the answer to the build not running at all):

https://github.com/espressif/esp-idf/co ... 10786e249c

Evidently this patch was applied after the V4.1 tag was created.

BUT: I still have the original problem.

Re: issue with toolchain, maybe environment variables

Posted: Mon Nov 04, 2019 7:41 pm
by mzimmers
BTT. Here's what I see when I begin my builds:

Code: Select all

$ make
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
I can't figure out WHERE that crosstool is coming from. Anyone?

Thanks...

Re: issue with toolchain, maybe environment variables

Posted: Tue Nov 05, 2019 6:44 am
by ESP_Angus
mzimmers wrote:
Mon Nov 04, 2019 7:41 pm

Code: Select all

$ make
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
I can't figure out WHERE that crosstool is coming from. Anyone?
It's derived by parsing the full output of "xtensa-esp32-elf-gcc --version".

If you're using MSYS2, try checking the output of "which xtensa-esp32-elf-gcc" is the one you expect. You may need to edit the PATH variable to get it to pick up the right toolchain.

Re: issue with toolchain, maybe environment variables

Posted: Tue Nov 05, 2019 4:00 pm
by mzimmers
Hi Angus -

Code: Select all

C:\esp32_projects\wifibutton>xtensa-esp32-elf-gcc --version
xtensa-esp32-elf-gcc (crosstool-NG esp32-2019r1) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I decided to move to cmake, not because of these problems, but because I want to use Eclipse for development, so I think I've obviated this issue.

Part of the problem might have been that the tools setup program installs in an .espressif folder in your home directory, while other methods of installation put it under the msys32 directory.

Anyway, thanks for looking at this issue; I think we can consider it resolved.

(Now I get to figure out how to use cmake!)

Re: issue with toolchain, maybe environment variables

Posted: Thu Nov 07, 2019 3:46 pm
by mzimmers
ESP_Angus wrote:
Tue Nov 05, 2019 6:44 am
mzimmers wrote:
Mon Nov 04, 2019 7:41 pm

Code: Select all

$ make
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
I can't figure out WHERE that crosstool is coming from. Anyone?
It's derived by parsing the full output of "xtensa-esp32-elf-gcc --version".

If you're using MSYS2, try checking the output of "which xtensa-esp32-elf-gcc" is the one you expect. You may need to edit the PATH variable to get it to pick up the right toolchain.
I need to explore this a bit more -- so is /opt/extensa-esp32-elf/ a deprecated location for the tools? And now we're supposed to store them in ~/.espressif?

And when you mentioned the PATH variable, did you mean the IDF_TOOLS_PATH variable?

Thanks.

EDIT: OK, I see now that under msys, the PATH variable includes a reference to /opt/xtensa-esp32-elf/bin. Where does that get set? I gather that I should change that to the .espressif path?