Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Compilation error for an ESP32 project: fatal error: FreeRTOSConfig.h: No such file or directory (Read 1209 times)
Francesco14
Junior Member
**
Offline


Posts: 10
Joined: Mar 25th, 2014
Compilation error for an ESP32 project: fatal error: FreeRTOSConfig.h: No such file or directory
Jul 31st, 2024 at 5:35pm
Print Post  
I am trying to compile a somewath complex Arduino project related to an ESP32 board using VS 2022 and Visual Micro; this project compiles fine if I use the Arduino IDE v1.8.19 with ESP32 v2.0.14, but if it I try to compile it in Visual Studio 2022 with Visual Micro extension (both are updated to the latest versions) pointing to the same release of the Arduino IDE,  I receive the following compilation error:

arduino.h*:33: In file included from
WeatherDuino_4PESP32_RX_v6.3_b001.ino: from

FreeRTOS.h*: 57:10: fatal error: FreeRTOSConfig.h: No such file or directory
   #include "FreeRTOSConfig.h"
   ^~~~~~~~~~~~~~~~~~ [/code]


Please note that the "Deep Search for libraries + Accurate Prototype Insertion (Gcc-E)" option is checked in vMicro->Compiler and I can see the FreeRTOSConfig.h header file in the External Dependencies branch of the project tree and if I double click on it, it opens correctly in the VS editor; also, if I right-click on the tab of this file in the editor and click on the "Open Containing Folder" in the context menù, the corresponding folder is correctly opened.

Please, can I know if this is an already known behaviour with Arduino projects which uses ESP32 boards? If yes, is there a workaround?

Thanks in advance for support.

Regards.


« Last Edit: Jul 31st, 2024 at 5:43pm by Francesco14 »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compilation error for an ESP32 project: fatal error: FreeRTOSConfig.h: No such file or directory
Reply #1 - Aug 1st, 2024 at 1:57am
Print Post  
Thanks for the info. You are bumping into the windows max path size. The limit is 32k for the entire command and a MAX_PATH of 256 bytes for each file name and path

The older esp32 toolchains work close to the windows limits, that is compounded by the long project name and long user name in the "c:\users\[your name]\appdata" folder. 

Below the appData folder are folders where 1) intalled arduino board packages are located and 2) visual micro stores temp build files.

We are considering changing how we make the name of the temp build folder for each project because of this problem.

The arduino ide will be on the limit,  although they have already moved to a slightly shorter temp build folder structure, which is why it hasn't hit the limit yet. You might find that adding one or two more libraries will cause its limit to also be hit. 

The easiest way to resolve the issue should be to change the location that visual micro uses for the build temp.

The location you choose should be well away from any project code because you or vmicro might delete the cache at any time.

For example: 

  • Create a folder called "C:\Junk". the "option tools>options>visual micro". Under the Compiler section of the Visual Micro settings there is a property called "Build Folder". Set it to "C:\Junk\VMBuilds"
  • Click OK then run a build.

That should work. In our test, we hit the problem with less libraries than you are using but the issue should be the same. 

If there is still an issue then we can explain how to move the esp32 board package (toolchain and libraries). The board package folder has many of the libraries you are using the the freertos files are in quite deep sub folders. The package is currently in "C:\users\[your full name]\appdata\arduino15\packages\esp32...".

With arduino2 you can also control where the board packages are located. That would allow both visual micro and arduino2 to use the downloaded packages if preferred. 

« Last Edit: Aug 1st, 2024 at 2:20am by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compilation error for an ESP32 project: fatal error: FreeRTOSConfig.h: No such file or directory
Reply #2 - Aug 1st, 2024 at 3:54am
Print Post  
Update: The latest esp32 v3.0.3 core doesn't have the problem. They appear to have improved it. The build command is much smaller.
  
Back to top
IP Logged
 
Francesco14
Junior Member
**
Offline


Posts: 10
Joined: Mar 25th, 2014
Re: Compilation error for an ESP32 project: fatal error: FreeRTOSConfig.h: No such file or directory
Reply #3 - Aug 1st, 2024 at 5:52am
Print Post  
Tim@Visual Micro wrote on Aug 1st, 2024 at 1:57am:
Thanks for the info. You are bumping into the windows max path size. The limit is 32k for the entire command and a MAX_PATH of 256 bytes for each file name and path

The older esp32 toolchains work close to the windows limits, that is compounded by the long project name and long user name in the "c:\users\[your name]\appdata" folder. 

Below the appData folder are folders where 1) intalled arduino board packages are located and 2) visual micro stores temp build files.

We are considering changing how we make the name of the temp build folder for each project because of this problem.

The arduino ide will be on the limit,  although they have already moved to a slightly shorter temp build folder structure, which is why it hasn't hit the limit yet. You might find that adding one or two more libraries will cause its limit to also be hit. 

The easiest way to resolve the issue should be to change the location that visual micro uses for the build temp.

The location you choose should be well away from any project code because you or vmicro might delete the cache at any time.

For example: 

  • Create a folder called "C:\Junk". the "option tools>options>visual micro". Under the Compiler section of the Visual Micro settings there is a property called "Build Folder". Set it to "C:\Junk\VMBuilds"
  • Click OK then run a build.

That should work. In our test, we hit the problem with less libraries than you are using but the issue should be the same. 

If there is still an issue then we can explain how to move the esp32 board package (toolchain and libraries). The board package folder has many of the libraries you are using the the freertos files are in quite deep sub folders. The package is currently in "C:\users\[your full name]\appdata\arduino15\packages\esp32...".

With arduino2 you can also control where the board packages are located. That would allow both visual micro and arduino2 to use the downloaded packages if preferred. 




Hi Tim,

thank you so much for your rapid and resolutive answer!

I just tried the proposed solution and it worked!

I will try also with the new version of the ESP32 Board library.

Thank you again for your willingness!

Regards
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint