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 Compile failed using board manager 3.1.0 of ESP8266 (Read 29166 times)
Pontifex Maximus
Newbies
*
Offline


Posts: 6
Joined: Jan 7th, 2023
Compile failed using board manager 3.1.0 of ESP8266
Jan 7th, 2023 at 7:24pm
Print Post  
I just installed the update of the ESP8266 board manager which is version 3.1.0. I updated everything: VS Studio 2022, VisualMicro, the Arduino IDE 2.0.3, all libs and all board managers. Reboot/Rescan Toolchain etc is mandatory, of course.
I created an empty arduino project with empty Setup/Loop function in visual studio, set target to "Generic ESP8266 module".
Since then, compiling always failed with the following messages:
"Compiling 'Sketch1' for 'Generic ESP8266 Module                                                                                                    (esp8266_generic)'
   *** File preferences.txt not found on Windows
Error running platform build action hooks.prebuild

   *** preferences.txt file missing from well known locations
0 Protypes Discovered"

Surprisingly, the Arduino IDE 2.0.3 does not have this issue, compiling runs well there. Must be an issue of visual micro.
Whats ongoing here?
Returning to the most recent board manager 3.0.2 works.
Any suggestions? The board manager update is just 16 hours old, so I might be the first unlucky one failing here.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12240
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compile failed using board manager 3.1.0 of ESP8266
Reply #1 - Jan 7th, 2023 at 10:22pm
Print Post  
Updated: Temporary workaround.

If you add a board.txt to your project (Add Code>Local Board.txt) then add the following the system will be switched off.
Code
Select All
recipe.hooks.prebuild.2.pattern=
build.opt.flags=
 



In Visual Micro, it is possible to add compiler defines and switches using the F4 project properties (tool window), instead of adding them to a ino.globals.h



« Last Edit: Jan 10th, 2023 at 10:37pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12240
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compile failed using board manager 3.1.0 of ESP8266
Reply #2 - Jan 10th, 2023 at 10:34pm
Print Post  
We found a way to feed the correct path into the python script of this tool chain. That will then work with same configuration as the arduino ide.

There should be an update available over the oming week. Although this package works outside of the published arduino spec. what it is doing is good.

More Info

Using the Visual Micro project level (F4) defines and compiler flags provides more flexibility than that provided by the global.h of the esp8266 package. This is because visual micro allows us to specify the defines and switches for each configuration (debug, release, foo, baa etc.) and/or global. 

Secondly, with visual micro settings, there would be a cache of the core for each set of defines and switches, as opposed to the cache being rebuilt every time the esp8266 .ino.globals.h is changed. 

That said the ino.globals.h offers some very advanced usage on top of defines and switches.

Both systems of course work side by side but it might be an idea to avoid the ino.globals.h when possible.
« Last Edit: Jan 10th, 2023 at 10:36pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Pontifex Maximus
Newbies
*
Offline


Posts: 6
Joined: Jan 7th, 2023
Re: Compile failed using board manager 3.1.0 of ESP8266
Reply #3 - Jan 19th, 2023 at 11:09pm
Print Post  
Thanks a lot! I added the file to the project directory, as suggested. It wasn't even necessary to add the file to the VisualStudio project.
Compiles well with board manager 3.1.1, too. Cool
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint