Issues: latest toolchain install on Windows

User avatar
drwill
Posts: 13
Joined: Mon Oct 28, 2019 10:01 pm

Issues: latest toolchain install on Windows

Postby drwill » Mon Oct 28, 2019 10:39 pm

I'm trying to get side-by-side stable and latest toolchains configured on my Windows 10 PC. I have stable working fine, in as much as I can run menuconfig and build/flash/monitor the hello_world app. For stable, I did not set any global environment variables - instead I set the values in the .bash_profile script. That way, none of the values would conflict with latest.

I'm having trouble with the latest toolchain installation, and I'm running into a problem running menuconfig in the hello_world sample (copied to another directory).

This is my second time through the installer, and I've worked through a few issues, but still run into this same error in menuconfig. Hopefully someone can help me work through this. I'll post relevant information below.

My local directories:
  • Root directory: c:\tools\esp32-latest, has folders dist, python_env, and tools (along with an esp directory that I added). Also has idf_cmd_init.bat and a few other files.
  • IDF_PATH: c:\tools\esp32-latest\esp\esp-idf (I chose v4 release in the installer).
  • IDF_TOOLS_PATH: c:\tools\esp32-latest (not set by me, including before installation)
  • c:\users\<me>\.espressif: contains dist, python_env, and tools folders.
menuconfig error:
c:\tools\esp32-latest\esp\hello_world>idf.py menuconfig
Checking Python dependencies...
Python requirements from c:\tools\esp32-latest\esp\esp-idf\requirements.txt are satisfied.
Executing action: menuconfig
Running cmake in directory c:\tools\esp32-latest\esp\hello_world\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized -DCCACHE_ENABLE=0 c:\tools\esp32-latest\esp\hello_world"...
Warn about uninitialized values.
CMake Warning at C:/tools/esp32-latest/esp/esp-idf/tools/cmake/idf.cmake:14 (message):
IDF_PATH environment variable is different from inferred IDF_PATH.

Check if your project's top-level CMakeLists.txt includes the right
CMake files. Environment IDF_PATH will be used for the build.
Call Stack (most recent call first):
C:/tools/esp32-latest/esp/esp-idf/tools/cmake/project.cmake:7 (include)
CMakeLists.txt:5 (include)


-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.23.0.windows.1")
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- IDF_TARGET not set, using default target: esp32
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/tools/esp32-latest/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/tools/esp32-latest/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/tools/esp32-latest/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- broken
CMake Error at C:/tools/esp32-latest/tools/cmake/3.13.4/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler

"C:/tools/esp32-latest/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/tools/esp32-latest/esp/hello_world/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/tools/esp32-latest/tools/ninja/1.9.0/ninja.exe" "cmTC_214b0"
[1/2] Building C object CMakeFiles/cmTC_214b0.dir/testCCompiler.c.obj
[2/2] Linking C executable cmTC_214b0
FAILED: cmTC_214b0
cmd.exe /C "cd . && C:\tools\esp32-latest\tools\xtensa-esp32-elf\esp32-2019r1-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -mlongcalls -Wno-frame-address -nostdlib CMakeFiles/cmTC_214b0.dir/testCCompiler.c.obj -o cmTC_214b0 && cd ."
The system cannot find the path specified.
c:/tools/esp32-latest/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: warning: cannot find entry symbol _start; defaulting to 00400054
ninja: build stopped: subcommand failed.




CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
C:/tools/esp32-latest/esp/esp-idf/tools/cmake/project.cmake:258 (__project)
CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!
See also "C:/tools/esp32-latest/esp/hello_world/build/CMakeFiles/CMakeOutput.log".
See also "C:/tools/esp32-latest/esp/hello_world/build/CMakeFiles/CMakeError.log".
cmake failed with exit code 1
I've attached the CMake*.log files.

Btw, here's the output when I start the console:
he system cannot find the path specified.
Using Python in C:\Python38\
Python 3.8.0
Using Git in C:\Program Files\Git\cmd\
git version 2.23.0.windows.1
Setting IDF_PATH: c:\tools\esp32-latest\esp\esp-idf

Adding ESP-IDF tools to PATH...
Not using an unsupported version of tool cmake found in PATH: 3.15.4.
c:\tools\esp32-latest\tools\xtensa-esp32-elf\esp32-2019r1-8.2.0\xtensa-esp32-elf\bin
c:\tools\esp32-latest\tools\esp32ulp-elf\2.28.51.20170517\esp32ulp-elf-binutils\bin
c:\tools\esp32-latest\tools\cmake\3.13.4\bin
c:\tools\esp32-latest\tools\openocd-esp32\v0.10.0-esp32-20190313\openocd-esp32\bin
c:\tools\esp32-latest\tools\mconf\v4.6.0.0-idf-20190628\
c:\tools\esp32-latest\tools\ninja\1.9.0\
c:\tools\esp32-latest\tools\idf-exe\1.0.1\
c:\tools\esp32-latest\tools\ccache\3.7\
c:\tools\esp32-latest\python_env\idf4.0_py3.8_env\Scripts
c:\tools\esp32-latest\esp\esp-idf\tools

Checking if Python packages are up to date...
Python requirements from c:\tools\esp32-latest\esp\esp-idf\requirements.txt are satisfied.

Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

idf.py build
Attachments
CMakeOutput.log
(1.49 KiB) Downloaded 44 times
CMakeError.log
(933 Bytes) Downloaded 41 times

ESP_igrr
Posts: 1551
Joined: Tue Dec 01, 2015 8:37 am

Re: Issues: latest toolchain install on Windows

Postby ESP_igrr » Tue Oct 29, 2019 6:40 am

Have you by any chance built the same project first with "stable" and then with "latest" IDF? If yes, please try deleting the build directory before switching versions. The following error indicates that something is wrong with the setting of IDF_PATH, and it may be because CMake caches this variable in CMakeCache.txt:

CMake Warning at C:/tools/esp32-latest/esp/esp-idf/tools/cmake/idf.cmake:14 (message):
IDF_PATH environment variable is different from inferred IDF_PATH.

Check if your project's top-level CMakeLists.txt includes the right
CMake files. Environment IDF_PATH will be used for the build.

User avatar
drwill
Posts: 13
Joined: Mon Oct 28, 2019 10:01 pm

Re: Issues: latest toolchain install on Windows

Postby drwill » Tue Oct 29, 2019 6:44 pm

Have you by any chance built the same project first with "stable" and then with "latest" IDF?
No, not the same project. I should have mentioned that my stable tool chain is installed at c:\tools\esp32-stable. It has it's own esp-idf repo clone (v3.3). From there I copied the hello_world sample to home/esp/hello_world.

So that is a technically a different project and folder from the "latest" tool chain folder.

That said, I deleted the build directory under latest's hello_world and tried again. I get the same error.

User avatar
drwill
Posts: 13
Joined: Mon Oct 28, 2019 10:01 pm

Re: Issues: latest toolchain install on Windows

Postby drwill » Tue Oct 29, 2019 10:09 pm

ESP_igrr wrote:
Tue Oct 29, 2019 6:40 am
CMake Warning at C:/tools/esp32-latest/esp/esp-idf/tools/cmake/idf.cmake:14 (message):
IDF_PATH environment variable is different from inferred IDF_PATH.
I edited tools\cmake\idf.cmake to spit out the values of idf_path and _idf_path to see how it was different. It looks like it is doing a case-sensitive comparison because the only difference is the case of my drive letter:
CMake Warning at C:/tools/esp32-latest/esp/esp-idf/tools/cmake/idf.cmake:14 (message):
IDF_PATH environment variable is different from inferred IDF_PATH.

Check if your project's top-level CMakeLists.txt includes the right
CMake files. Environment IDF_PATH will be used for the build.
c:/tools/esp32-latest/esp/esp-idf
C:/tools/esp32-latest/esp/esp-idf
Since that seems only to be a warning, I think the value of IDF_PATH is a misleading message. Windows is case-insensitive for file system paths so this difference shouldn't matter.

If I replace that idf.cmake code with the following to negate that, I get the following output.

Code: Select all

    # Environment IDF_PATH should match the inferred IDF_PATH. If not, warn the user.
    if(idf_path)
        string(TOLOWER "${idf_path}" idf_path_lower)
        string(TOLOWER "${_idf_path}" _idf_path_lower)

        if(NOT idf_path_lower STREQUAL _idf_path_lower)
            message(WARNING "IDF_PATH environment variable is different from inferred IDF_PATH.
                            Check if your project's top-level CMakeLists.txt includes the right
                            CMake files. Environment IDF_PATH will be used for the build.
                            ${idf_path}
                            ${_idf_path}")
        endif()
c:\tools\esp32-latest\esp\hello_world>idf.py menuconfig
Checking Python dependencies...
Python requirements from c:\tools\esp32-latest\esp\esp-idf\requirements.txt are satisfied.
Executing action: menuconfig
Running cmake in directory c:\tools\esp32-latest\esp\hello_world\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized -DCCACHE_ENABLE=0 c:\tools\esp32-latest\esp\hello_world"...
Warn about uninitialized values.
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.23.0.windows.1")
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- IDF_TARGET not set, using default target: esp32
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/drwill/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/drwill/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/drwill/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- broken
CMake Error at C:/Users/drwill/.espressif/tools/cmake/3.13.4/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler

"C:/Users/drwill/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/tools/esp32-latest/esp/hello_world/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/Users/drwill/.espressif/tools/ninja/1.9.0/ninja.exe" "cmTC_dffb9"
[1/2] Building C object CMakeFiles/cmTC_dffb9.dir/testCCompiler.c.obj
[2/2] Linking C executable cmTC_dffb9
FAILED: cmTC_dffb9
cmd.exe /C "cd . && C:\Users\drwill\.espressif\tools\xtensa-esp32-elf\esp32-2019r1-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -mlongcalls -Wno-frame-address -nostdlib CMakeFiles/cmTC_dffb9.dir/testCCompiler.c.obj -o cmTC_dffb9 && cd ."
The system cannot find the path specified.
c:/users/drwill/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: warning: cannot find entry symbol _start; defaulting to 00400054
ninja: build stopped: subcommand failed.




CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
C:/tools/esp32-latest/esp/esp-idf/tools/cmake/project.cmake:258 (__project)
CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!
See also "C:/tools/esp32-latest/esp/hello_world/build/CMakeFiles/CMakeOutput.log".
See also "C:/tools/esp32-latest/esp/hello_world/build/CMakeFiles/CMakeError.log".
cmake failed with exit code 1

User avatar
drwill
Posts: 13
Joined: Mon Oct 28, 2019 10:01 pm

Re: Issues: latest toolchain install on Windows

Postby drwill » Fri Nov 01, 2019 9:35 pm

Any idea @ESP_igrr?

From what I can tell, the following command references a directory structure and file that do not exist, and that is why it fails. Why does it have an expectation that isn't met? Is a previous step supposed to have set that up?

C:\Users\drwill\.espressif\tools\xtensa-esp32-elf\esp32-2019r1-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -mlongcalls -Wno-frame-address -nostdlib CMakeFiles/cmTC_dffb9.dir/testCCompiler.c.obj -o cmTC_dffb9

Thanks,
David

Who is online

Users browsing this forum: Bing [Bot] and 14 guests