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 ESP32_Painlessmesh (Read 2094 times)
jackie87
Newbies
*
Offline


Posts: 4
Joined: Jun 22nd, 2023
ESP32_Painlessmesh
Jun 23rd, 2023 at 7:18am
Print Post  
Until few months ago painless mesh was compiling fine. Now there are errors which are hard to debug. 

The attached file compiles in Arduino IDE 2.1.0 without any issue.

The full micro build output is attached at the end of basic.ino for reference. 
What might be the reason for the issue?

Libraries used:
Painlessmesh - 1.5.0
TaskScheduler - 3.7.0
« Last Edit: Jun 23rd, 2023 at 7:38am by jackie87 »  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP32_Painlessmesh
Reply #1 - Jun 23rd, 2023 at 9:15am
Print Post  
Thanks for the info. It looks like you have switched off "vMicro>Compiler>Deep search for libraries". Arduino 2 always has that setting on. You also have debug enabled which is better Off if you have a compile problem.

I suggest switch deep search back on then try the build again.

  
Back to top
IP Logged
 
jackie87
Newbies
*
Offline


Posts: 4
Joined: Jun 22nd, 2023
Re: ESP32_Painlessmesh
Reply #2 - Jun 23rd, 2023 at 1:07pm
Print Post  
Thanks for the reply.

Tried with deep search on & in release mode. Same response.
The output is attached for reference.

Also a clarification please.

Deep search usually takes more time and the cumulative time addition from numerous compilations end up an hour at times.
Is it possible to save the deep search locations and if possible the cache of those files in RAM for quick reuse?

System has 32GB RAM and almost 20GB is just idle. So those who can make use of this would benefit greatly.
  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP32_Painlessmesh
Reply #3 - Jun 23rd, 2023 at 8:01pm
Print Post  
Thanks, visual micro should always be same or faster build than arduino. After the error is solved you can switch deep search off again if you don't see an error. (The deep search also ensures automatically inserted prototypes are inserted at the correct location)

If same code between both IDE's then my intial thoughts are that the library resolver is finding different libraries to arduino. Normally, if all paths are the same then that should only happen if two libraries are installed that contain the same headers. Then it is hit and miss as to which is resolved. but lets' see exactly...

The verbose output from the arduino ide would help. That can be enabled in the arduino ide with file>preferences>compile verbose.

These are the libraies that vm is finding:-

Using library Update version 2.0.0 in folder "E:/Software/Arduino/Arduino%20Sketches/libraries/Update"
Using library FS version 2.0.0 in folder "E:/Software/Arduino/Arduino%20Sketches/libraries/FS"
Using library SPIFFS version 2.0.0 in folder "E:/Software/Arduino/Arduino%20Sketches/libraries/SPIFFS"
Using library WiFi version 2.0.0 in folder "E:/Software/Arduino/Arduino%20Sketches/libraries/WiFi"
Using library AsyncTCP version 1.1.4 in folder "E:/Software/Arduino/Arduino%20Sketches/libraries/AsyncTCP"
Using library ArduinoJson version 6.21.2 in folder "E:/Software/Arduino/Arduino%20Sketches/libraries/ArduinoJson"
Using library TaskScheduler version 3.7.0 in folder "E:/Software/Arduino/Arduino%20Sketches/libraries/TaskScheduler"
Using library Painless_Mesh version 1.5.0 in folder "E:/Software/Arduino/Arduino%20Sketches/libraries/Painless_Mesh"

Deep search is cached apart from the ino code. If you can also build vm again we can check that your cache is working properly.

We also need the painlessMesh.h and any other project files it references.
« Last Edit: Jun 23rd, 2023 at 9:10pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP32_Painlessmesh
Reply #4 - Jun 23rd, 2023 at 9:19pm
Print Post  
Update. it would be useful to see a 2nd build output as stated above but the issue is that the following libraries appear to be installed as overrides to the ones provided with the esp32 core.

I believe that arduino 1x would also do same if the libs you have installed has a library.properties file containing architectures=esp32. Can you confirm what "architecture=" exists in a  library.properties file in one of the following folders:-

Using library FS version 2.0.0 in folder "E:/Software/Arduino/Arduino%20Sketches/libraries/FS"
Using library SPIFFS version 2.0.0 in folder "E:/Software/Arduino/Arduino%20Sketches/libraries/SPIFFS"
Using library WiFi version 2.0.0 in folder "E:/Software/Arduino/Arduino%20Sketches/libraries/WiFi"

Afer that remove the folder and click "vMicro>General>reload toolchains" or restart the ide. That will probably resolve for now.
  
Back to top
IP Logged
 
jackie87
Newbies
*
Offline


Posts: 4
Joined: Jun 22nd, 2023
Re: ESP32_Painlessmesh
Reply #5 - Jun 26th, 2023 at 5:59am
Print Post  
Thanks for the continued support. 
Error resolved. Thanks for the insightful advice. 
Let me inform the observations. 
There are worthy info to be noted and enhanced.

FS, SPIFFS & WiFi
architectures=esp32

Folders were removed and IDE restarted. Same error. 

The compiler output from Arduino IDE is attached for reference.


Earlier, with Deep search disabled, Visual micro mentioned missing libraries such as FS, SPIFFS, WiFi, TaskScheduler & ArduinoJson. So I declared them as headers. (Arduino didn't required the additional headers. I was not aware Arduino does deep search on every compilation) This worked for a long time. I recall version of esp32 core, painlessmesh & TaskScheduler were updated. Later the compile error started. 

Resolved method:
As you advised, deep search was enabled. Then the additional library headers were commented out. Only painlessmesh.h remained. It worked. 

With additional library headers and deep search enabled, same error was the result.
Would you please analyze what is causing this error?


Compile time difference:

Deep search enabled.
Compiled again with no change to the code

Program Painless_Mesh_Test size: 754792 bytes (used 38% of a 1966080 byte maximum) (3.91 secs)
Minimum Memory Usage: 42140 bytes (13% of a 327680 byte maximum)
-----------------------------------------------------------------------------


Deep search enabled.
Compiled again after changing a variable’s content. No change in library declaration

Program Painless_Mesh_Test size: 754792 bytes (used 38% of a 1966080 byte maximum) (19.99 secs)
Minimum Memory Usage: 42140 bytes (13% of a 327680 byte maximum)
-----------------------------------------------------------------------------

If there is no change in library declarations but only code changed, is it possible for visual micro to skip library deep search on compilations? This would save so many hours of development time.
« Last Edit: Jun 26th, 2023 at 6:31am by jackie87 »  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP32_Painlessmesh
Reply #6 - Jun 26th, 2023 at 1:50pm
Print Post  
With deep search on you should see exact same results as arduino ide. 

The order that the #includes that were manually added by you was probably the issue or it was the prototypes.

Deep search does two things :-

1) find libraries referenced by libraries you are using that are not reference in your own code

2) Adds any prototypes for .ino code that you have not added yourself. The location of the prototypes can be quite important if the code has been declared in an abstract order.

If you switch on "vmicro>compiler>show build folder" then take a look at the project_name.cpp in the build folder. Then you will see the prototypes and where they have been added.

Switching off deep search can cause a lot of issues unless these points are clearly understood. 

The problem becomes bigger if you have #includes surrounded by #if statements. Only deep search can cater for those. 

If you ensure libraries have been included correctly, that no #if statements surround #includes and that prototypes have been added for all methods into the correct location. Then deep search can probbaly be switched off.

Deep search is cached for all but .ino files. tip: It is also possible to move much of the code into .cpp file(s) so that the .ino code has the minimum of library #includes. That will allow deep search to remain on with significantly less work.






  
Back to top
IP Logged
 
jackie87
Newbies
*
Offline


Posts: 4
Joined: Jun 22nd, 2023
Re: ESP32_Painlessmesh
Reply #7 - Jun 27th, 2023 at 9:38am
Print Post  
Thanks a lot for helping with valuable inputs.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint