Page 2 of 7

Re: Installing and setting up of ESP32 toolchain

Posted: Wed May 10, 2023 1:58 pm
by jandidden
Well, I don't know what's going on, but I get this now from FC10:

Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\ESP\Batch\esp32_build.bat "C:\Espressif\frameworks\esp-idf-v5.0.1\" "fc10 test" "C:\Users\jandi\" esp32s_sdkconfig
You do not have a valid licence to perform this action

I just paid for the professional version and updated the license, which is accepted, but then I get this, every time.

Jan

Re: Installing and setting up of ESP32 toolchain

Posted: Wed May 10, 2023 3:27 pm
by medelec35
Hi Jan,
I have sent you a pm regarding this.

Re: Installing and setting up of ESP32 toolchain

Posted: Wed May 17, 2023 9:29 am
by jandidden
And the beat goes on ...

I did the following:

1. Uninstall all ESP related apps from the Windows Setup menu, including GIT, Python and Python installer.
2. Manually delete any folder/file remaining that I could find.
3. Restart and verify all is uninstalled/deleted.
4. Run CCleaner which detected a whole bunch of orphan registry entries related to ESP; fixed that.
5. Restart and verify with CCleaner; no registry issues found.
6. Download ESP-IDF install procedure from MatrixTSL site.
7. Cannot install ESP-IDF 4.1 as the lowest available version is V4.2. Selected that version.
8. Install in C:\esp-idf
9. Install esp-idf tools in C:\esp-idf-tools (note: these are regular hypens, not underscores, as shown in the procedure).
10. After install completes, did not run ESP-IDF Command Prompt.
11. Run FC9, in Global Settings|Locations|ESP set to C:\ESP-IDF
12. Close and reopen FC9, check Location setting, OK.
13. Open test chart wroom located in c:\Users\jandi\ , processor wroom-32.
14. Compile to hex failed with:

idf.py build

[0/1] Re-running CMake...
FAILED: build.ninja
C:\Espressif\tools\cmake\3.23.1\bin\cmake.exe --regenerate-during-build -SC:\Users\jandi\wroom -BC:\Users\jandi\wroom\build
CreateProcess failed: The system cannot find the file specified.
ninja: error: rebuilding 'build.ninja': subcommand failed
Executing action: all (aliases: build)
Running ninja in directory c:\users\jandi\wroom\build
Executing "ninja all"...
ninja failed with exit code 1

Build Failed

C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\ESP\Batch\esp32_build.bat reported error code 0x1

15. Checked that both C:\Users\jandi\wroom and C:\Users\jandi\wroom\build folders do exist.
The latter does contain the build.ninja but that is too large to attach though.

Any idea where to look for next?

Jan

Re: Installing and setting up of ESP32 toolchain

Posted: Wed May 17, 2023 9:57 am
by mnfisher
Hi Jan,

There is still something wrong - did you change the address in FC (Cconfiguration-locations) - as it is still using c:\espressif not c:\esp-idf.
Also - the build seems to be using the wrong directory (the 'build' on the end is probably wrong) (Might be worth checking windows environment variables and seeing if something 'remains' - windows key = type environment, choose 'edit environment variables...')

We'll get there - it may take us a little time :-(

So a couple of things to check:

0) Location of esp tools in FC
1) Open a cmd prompt (Windows key - cmd) - and navigate to the esp directory (cd c:\esp-idf) and then type install<enter> (it should chunder through some stuff - hopefully all already there)
2) cd to your project folder (so say you save the project to C:\ as 'test.fcfx' - this would be c:\test - and you'd need cd c:\test)
3) Type c:\esp-idf\export
4) type idf.py build

This 'should' build the program - and show that the tools are installed correctly....

5) Check the config in FC if all is good...


Martin

Re: Installing and setting up of ESP32 toolchain

Posted: Wed May 17, 2023 11:19 am
by jandidden
Yes, location in FC still set to C:\esp-idf
Checked environment variables, there's a C:\ESP-IDF-TOOLS ; don't see ESP-IDF on itself here.

Did notice a system variable "C:\Users\jandi\AppData\Roaming\Python\cripts' seems a typo, no idea of the possible impact. Left it at that.

Install of esp-idf ran successfully. Export ran successfully as well.
idf.py build gives the same error I see before: ninja failed. See attached.
The folder ....jandi\wroom\build does exists and has the bootloader and CMakeFiles and config etc subfolders.

Jan

Re: Installing and setting up of ESP32 toolchain

Posted: Wed May 17, 2023 12:08 pm
by jandidden
Here's the ninja log file.

Edit: not sure this is the latest - it has references to esp-idf v4.4.4 while I installed V4.2.x

Jan

Re: Installing and setting up of ESP32 toolchain

Posted: Wed May 17, 2023 12:30 pm
by mnfisher
Another try.

At the command prompt (as before)
Idf.py fullclean
Delete the project\build directory if this fails

Try build again

What do you have in the project\main directory?

Re: Installing and setting up of ESP32 toolchain

Posted: Wed May 17, 2023 4:07 pm
by jandidden
Clean works.
I now have again the CMake error I had before.
In the main dir [C:\Users\jandi\wroom\main] I have:
CMakeLists, component.mk, esp-project.c .

Approppriate (I think) build log:

Code: Select all

-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
CMake Error at C:/esp-idf/tools/cmake/build.cmake:423 (message):
  Traceback (most recent call last):
    File "C:\Users\jandi\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "C:\Users\jandi\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "C:\ESP-IDF-TOOLS\python_env\idf4.2_py3.7_env\lib\site-packages\idf_component_manager\prepare_components\__main__.py", line 4, in <module>
      from .prepare import main
    File "C:\ESP-IDF-TOOLS\python_env\idf4.2_py3.7_env\lib\site-packages\idf_component_manager\prepare_components\prepare.py", line 18, in <module>
      from ..core import ComponentManager
    File "C:\ESP-IDF-TOOLS\python_env\idf4.2_py3.7_env\lib\site-packages\idf_component_manager\core.py", line 17, in <module>
      import requests
    File "C:\ESP-IDF-TOOLS\python_env\idf4.2_py3.7_env\lib\site-packages\requests\__init__.py", line 43, in <module>
      import urllib3
    File "C:\ESP-IDF-TOOLS\python_env\idf4.2_py3.7_env\lib\site-packages\urllib3\__init__.py", line 39, in <module>
          "urllib3 v2.0 only supports OpenSSL 1.1.1+, currently "
  ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl'
  module is compiled with OpenSSL 1.1.0j 20 Nov 2018.  See:
  https://github.com/urllib3/urllib3/issues/2168
Call Stack (most recent call first):
  C:/esp-idf/tools/cmake/project.cmake:371 (idf_build_process)
  CMakeLists.txt:13 (project)
-- Configuring incomplete, errors occurred!

Jan

Re: Installing and setting up of ESP32 toolchain

Posted: Wed May 17, 2023 5:00 pm
by mnfisher
Can you compile with v5 ?

I've tried 'downgrading' to v4.1 and struggled to get it to work correctly (or indeed at all)
See viewtopic.php?p=9222#p9222

Martin

Re: Installing and setting up of ESP32 toolchain

Posted: Wed May 17, 2023 5:04 pm
by mnfisher
Just managed to 'downgrade' successfully to v4.n

Follow the instructions in Ben's message at viewtopic.php?p=9222#p9222 - before doing the commands cd c:\esp-idf (install directory for v4 esp-idf)
Do each command in turn - some don't seem to complete successfully - but continue.

Then cd project-directory
export
idf.py fullclean
idf.py build

Keep fingers crossed at all times.