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 [2]  Send TopicPrint
Hot Topic (More than 8 Replies) Need help to revert ESP32 IDF version (Read 922 times)
romeo
Junior Member
**
Offline


Posts: 27
Joined: Aug 3rd, 2024
Re: Need help to revert ESP32 IDF version
Reply #20 - Jul 21st, 2025 at 5:11am
Print Post  
I managed to clone a copy of my project that builds OK (but still don't know why the original simple approach doesn't work), so I tried your method of converting it to portable by shuffling files.
I think I have the structure you defined in your email (see attached file), although I find it curious that the project's .ino is not in the ...portable...branch, unlike the structure that the wizard generated in my first attempt (which fails to find that C++ file).

And did  I do the right thing with all the other source files?

The "add file" window seems to have vanished from my reply screen. I will send it to you via email.


Roman
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2759
Joined: Feb 13th, 2019
Re: Need help to revert ESP32 IDF version
Reply #21 - Jul 21st, 2025 at 10:08am
Print Post  
Thanks for the update.

1) Ensure All Files In Project: This is a button which needs to be clicked to check all files are included in the project (and will show in Solution Explorer when included), not a switch which is left on or off.

2) Build Folder: By default this is the project name, and as the Portable Clone of the project has the same name, the same build folder will be used.  If you right click and rename the INO file it will amend the project along with it.

3) Files Open in VS: These are remembered between sessions and the errors in the emailed document are due to the files having being moved outside of VS.  Deleting the ".vs" folder clears all cache for the solution of opened files and Intellisense.

4) Headers not being found: This is a internal problem of the compiler, however it can be worked around by adding the direct include path to the project.  If you paste the attached entry into vMicro > Project Properties > Micro General section > Configuration Extra Flags, then rebuild the project it should work as expected.
  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 27
Joined: Aug 3rd, 2024
Re: Need help to revert ESP32 IDF version
Reply #22 - Jul 22nd, 2025 at 9:41am
Print Post  
Thanks, Simon,
I added that extra search path, and did a build. First time, it found that header file, but then failed with the same symptoms as my other (non portable) problem (did not build the two .cpp files), but then I tried it a second time (after deleting - building - and restoring that search path) and it built quite fine, and went on to do so for  several more tries. Possibly something to do with histories stored in that .vs folder you mentioned.
The object file is a (slightly) different size to that built in the non-portable environment. Should this be of concern?
Then I downloaded esp32 V3, and retried the portable build - SUCCESS! Huge step forward. 

So then I went to put these two folders away in a "frozen" repository. I picked up the non-portable, moved it, opened it and it built OK. I picked up "arduino-portable" and it failed first time, but then - move it back - build it in the original place (OK) - move it out again into "Frozen" and now builds OK.   
Reminds me of the old joke about the software engineer, the electronics engineer, and the civil engineer  Cheesy

But I still cannot get my simple copy of my base solution working... (Reminder: I created a new VMicro solution in VS, copied my 5 source files into it, set up the relevant board, etc, and pressed "go"). Solution Explorer clearly shows the .ino, 2 .cpp files and two headers, the build log flags a number of errors and warnings associated with the cpp files (so presumably is aware of their existence) but simply refuses to include them in the build. (The "good" copy lists the .ino and 2 .cpp at the point where the log says "Building Project Code", whereas this copy just lists the .ino). I have re-attached the build log.

Also, can you clarify the "Ensure All files in project" thing? On the VMicro drop-down (I can't do a screen shot because the drop down won't persist) there is a box on the LHS with a green arrow in it. If I click the box, the drop-down closes with no visible feedback of any sort. When I look again, the tick is still there. I don't recall ever seeing the box without the tick. Not quite what I understand as "a button that needs to be clicked to...(do something)". I also notice the file names in Solution Explorer sometimes have a red tick next to them, sometimes not, but doesn't seem to affect the build process. 

And again I repeat my thanks to you for your patience and insight in working me through this! If we can just solve this last issue...

Roman
  

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


Posts: 2759
Joined: Feb 13th, 2019
Re: Need help to revert ESP32 IDF version
Reply #23 - Jul 22nd, 2025 at 10:34am
Print Post  
Quote:
But I still cannot get my simple copy of my base solution working... (Reminder: I created a new VMicro solution in VS, copied my 5 source files into it, set up the relevant board, etc, and pressed "go"). Solution Explorer clearly shows the .ino, 2 .cpp files and two headers, the build log flags a number of errors and warnings associated with the cpp files (so presumably is aware of their existence) but simply refuses to include them in the build. (The "good" copy lists the .ino and 2 .cpp at the point where the log says "Building Project Code", whereas this copy just lists the .ino). I have re-attached the build log.


The log shows that this Solution is using the standard %LOCALAPPDATA% copy of the board package which is at v3.2.1 from the log.  From my understanding your project requires v2.0.0 to work with its' current code.  You can either add the arduino-portable folders to the solution to isolate it (and then install it after reopening), or simply load this Solution and downgrade the ESP32 board package to v2.0.0.

Quote:
Also, can you clarify the "Ensure All files in project" thing? On the VMicro drop-down (I can't do a screen shot because the drop down won't persist) there is a box on the LHS with a green arrow in it. If I click the box, the drop-down closes with no visible feedback of any sort. When I look again, the tick is still there. I don't recall ever seeing the box without the tick. Not quite what I understand as "a button that needs to be clicked to...(do something)".


All I meant is that it is a button you can click to perform an action, it does not toggle on and off.  The green checkmark is simply the icon, which we will review if this is causing confusion.  As you have definitely clicked it and you see all files in Solution Explorer then this element should be fine now.

Quote:
I also notice the file names in Solution Explorer sometimes have a red tick next to them, sometimes not, but doesn't seem to affect the build process.


This depends on the "View" you have in Solution Explorer: 
https://learn.microsoft.com/en-us/visualstudio/ide/use-solution-explorer?view=vs...

a) Solution View: The Green + and Red checkmark are signs the project is linked to version control, and it will show these icons for files added, changed, removed etc...
2) Folder View: This red cross often indicates files which are not in the project.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint