ESP32 toolchain failed

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
jandidden
Posts: 110
http://meble-kuchenne.info.pl
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

ESP32 toolchain failed

Post by jandidden »

Earlier this year I struggled to get the ESP32 compile process going. After several installs, I got as far as the following error:

Code: Select all

Executing action: all (aliases: build)
Running cmake in directory c:\users\jandi\onedrive_-_linear_audio\2a_-_ar_xt\esp32_wroom_log_scale_test-2\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=1 c:\users\jandi\onedrive_-_linear_audio\2a_-_ar_xt\esp32_wroom_log_scale_test-2"...
ERROR: C:\esp-idf-tools\python_env\idf5.0_py3.7_env\Scripts\python.exe doesn't support asyncio. The issue can be worked around by re-running idf.py with the "--no-hints" argument.

Build Failed

At the time, I solved it, with help from members here, by re-downloading the ESP32 toolchain and selecting Python 3.8 instead of the default 3.7 in the ESP toolchain install process.

Recently picked up my project again, and found that the compile failed where it previously completed fine. I did an update of FC9 in the meantime so maybe that broke it.
Decided to re-install the ESP toolchain and after several failed attemps got it to progress to the previous error as shown above.
But now, in the toolchain install, there is no longer a selection of available Python versions, only V3.7 is available, and yes that fails.
Can anyone please help me to get this going again?

If you have a masochistic tendency, you may wish to look at all the other failed attempts I did here: viewtopic.php?p=11263#p11263

Jan

BenR
Matrix Staff
Posts: 1774
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 452 times
Been thanked: 612 times

Re: ESP32 toolchain failed

Post by BenR »

Hello Jan,

I also get this problem. To fix it you can do the following.

Navtigate to this directory by copying and pasting the path into your file explorer address bar.

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\ESP\Batch
Open the file esp32_build.bat in a text editor by right clicking and selecting edit.

Find these lines.

Code: Select all

@idf.py build
REM @idf.py --no-hints build
Move the REM up a line so you get this instead

Code: Select all

REM @idf.py build
@idf.py --no-hints build
Save and close the file.

Now repeat with the file esp32_prog.bat

These lines

Code: Select all

@idf.py -p %PORT% -b %BAUD% flash
REM @idf.py --no-hints -p %PORT% -b %BAUD% flash
Change to look like this.

Code: Select all

REM @idf.py -p %PORT% -b %BAUD% flash
@idf.py --no-hints -p %PORT% -b %BAUD% flash
Save and close the file.

Hopefully Flowcode can now compile correctly.

Not sure what has changed but if I make the change live for everyone it breaks existing working setups.

jandidden
Posts: 110
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Re: ESP32 toolchain failed

Post by jandidden »

Ben, much oblighed (especially on a Sunday). I'll try that out asap.

Jan

jandidden
Posts: 110
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Re: ESP32 toolchain failed

Post by jandidden »

On my system, the file path is slightly different (W10, FC9) but I found the batches and edited them.
The compile now progresses much farther without the 'asyncio' error but still fails; the first failure I can find in the output is from the CMake process:

Code: Select all

[1/10] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\Users\jandi\OneDrive_-_Linear_Audio\2a_-_AR_xt\ESP32_wroom_log_scale_test-2\build\bootloader\esp-idf\esptool_py && C:\esp-idf-tools\python_env\idf5.0_py3.7_env\Scripts\python.exe C:/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Users/jandi/OneDrive_-_Linear_Audio/2a_-_AR_xt/ESP32_wroom_log_scale_test-2/build/bootloader/bootloader.bin"
Bootloader binary size 0x6710 bytes. 0x8f0 bytes (8%) free.
[2/8] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/esp-project.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/esp-project.c.obj 
What does that mean?
Edit: C compiles successfully
Edit2: The path (or files) 'esp-idf/main/CMakeFiles/__idf_main.dir/esp-project.c.obj' do not exist.
There is no 'esp-idf/main'. Why the forward slash?

Jan

BenR
Matrix Staff
Posts: 1774
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 452 times
Been thanked: 612 times

Re: ESP32 toolchain failed

Post by BenR »

Aha move your project file from the one drive folder. Ideally to a file path containing no spaces. Projects didn't compile for me either when on a one drive folder.

jandidden
Posts: 110
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Re: ESP32 toolchain failed

Post by jandidden »

That's funny, it all worked that way for years, I've been doing it since FC3.
It also worked well up to FC9 until the latest update a few weeks ago, so that doesn't point to a 'spaces in filenames' or OneDrive issue.
So has something been changed now that what worked before now doesn't?
It's also a major issue for me, having my user files on OneDrive/cloud is the basis for all my different PCs at different locations as I move around.


Jan

jandidden
Posts: 110
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Re: ESP32 toolchain failed

Post by jandidden »

I moved the project to a folder on the local disk, with no spaces in it's path or name, also removed all spaces in the project name.
No change, still the same CMake failure as described above.

Jan

mnfisher
Valued Contributor
Posts: 1024
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 107 times
Been thanked: 532 times

Re: ESP32 toolchain failed

Post by mnfisher »

I did a fresh install..

See viewtopic.php?t=1108&start=80

Which works with v10....

Martin

Post Reply