espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.91k stars 7.33k forks source link

Project doesn't compile with 8 ULP files index (IDFGH-2846) #4906

Closed sch0bert closed 4 years ago

sch0bert commented 4 years ago

Environment

Problem Description

My project has 8 assembly files to be compiled for ULP usage and seems like this is impacting somehow the cache from CMake at compilation time. In some point from the

Performing configure step for 'ulp_main'

The concatenation from all the paths gets cut in one address and that is causing the project to not compile.

I looked in to google and seems like the cache doesn't have enough space for that many paths getting indexed in one command. I even get the next error:

Error: could not load cache

I was able to compile with IDF v4.0 but wasn't functional with the issue that recently got fixed: 4713 That's why I now moved to the master branch to get this fix but this is now happening.

Expected Behavior

Be able to compile.

Actual Behavior

Not able to compile, it crashes on the try.

Steps to reproduce

  1. Make a project where ULP is enabled
  2. Create 8 assembly files with multiple functionalities.
  3. Try to compile the project with the files listed in your CMakeList.txt

Debug Logs

Log is attached. log.txt

renzbagaporo commented 4 years ago

Hi @sch0bert, have you tried purging the build directory and then rebuilding?

sch0bert commented 4 years ago

Hi @sch0bert, have you tried purging the build directory and then rebuilding?

Yes, I did a fullclean command and also retried deleting the build folder. Same result.

renzbagaporo commented 4 years ago

Hi @sch0bert, there is an error CMake Error: The source directory "C:/Users/phernandez/Destop/esp-idf/components/ulp/cmake" does not exist. in the log you posted. Can you verify that this directory exists?

sch0bert commented 4 years ago

That also caught my attention but once that I also saw:

-DPYTHON=C:\Users\phernandez\.espressif\python_env\idf4.2_py3.8_env\Scripts\python.exe -GNinja C:/Users/phernandez/Des || exit /b

That make me wonder that because of the cache size, the path got cut off in the "k" part of "Desktop" and that's why this error appears also. I removed the ulp code from cmakelist.txt and re compiled it without a problem so this path should be ok, just getting cut.

renzbagaporo commented 4 years ago

I can't seem to reproduce your problem @sch0bert.

That make me wonder that because of the cache size, the path got cut off in the "k" part of "Desktop"

What I found out is that this sometimes commands get cut short for display purposes in the log. To verify the actual command you should take a look at a ulp_main-configure-xxxxxxx.bat (xxxxxxx is a hex string) in the build directory. @sch0bert

sch0bert commented 4 years ago

I'm still unable to compile my code with the latest idf version. I'm unable to find the ulp_main-configure-xxxxxxx.bat file in the build folder of my project :(

renzbagaporo commented 4 years ago

Are you able to compile the ULP examples? @sch0bert

sch0bert commented 4 years ago

I upgrated my IDF and seems there were a CMake upgrade, probably this fixed the problem because I now able to compile with ULP.

IDF version: ESP-IDF v4.2-dev-781-g47253a827-dirty

Thanks @renzbagaporo!