/home/hexdump/Arduino/Sketchbooks/libraries/ESP8266WiFi/src/flash_utils.h:33:43: fatal error: ../../bootloaders/eboot/flash.h: No such file or directory
compilation terminated
I get this error when I compile. It is probably related to my trying to construct an environment based upon a sketch that is 2+ years old. I was trying to use the same libraries from that time plus the board has changed from an esp8266 to a esp32 feather
What I have been doing is doing a compile, look and see what is missing, retrieve it from the trash and put it into /Sketchbooks/libraries/ESP8266Wifi/source. The ../../bootloaders syntax is a puzzle to me.
This is a bad idea. The ESP8266WiFi library comes bundled with the ESP8266 core for Arduino boards platform. This is a very architecture specific library that is very much dependent on the rest of the code in the platform. You should always use the library with the version of the platform it was bundled with.
Iif you want to use the ESP8266WiFi library version that was active at a specific date, then just install that version of the ESP8266 core for Arduino platform via Boards Manager and then delete /home/hexdump/Arduino/Sketchbooks/libraries/ESP8266WiFi, since it's only going to cause you problems.
pert:
This is a bad idea. The ESP8266WiFi library comes bundled with the ESP8266 core for Arduino boards platform. This is a very architecture specific library that is very much dependent on the rest of the code in the platform. You should always use the library with the version of the platform it was bundled with.
Iif you want to use the ESP8266WiFi library version that was active at a specific date, then just install that version of the ESP8266 core for Arduino platform via Boards Manager and then delete /home/hexdump/Arduino/Sketchbooks/libraries/ESP8266WiFi, since it's only going to cause you problems.
Thank you Pert, I will give this a try plus start fresh.
I am going to start off by saving the sketch and /home/hexdump/Arduino/Sketchbooks/libraries/. except ESP8266WiFi to a secret place
I don't think it's necessary to delete everything. I only recommended deleting the ESP8266WiFi library because the copy in the sketchbook will end up being used instead of the copy bundled with the ESP8266 boards platform. When you have the same version of the ESP8266 platform installed as the one the library in sketchbook was written for, that will do no harm. But then later when you have forgotten all about putting the ESP8266WiFi library in your sketchbook and you update to a new version of ESP8266 boards platform, that's when it will cause you a problem.
Well, I have been trying to sort things out so I might have to start over again. I still have copies of everything so nothing is lost, it's just a PITA.
Is there a reference document that can show me what are the proper header( .h) files and libraries that work together with boards of a certain date ? Too much to ask I guess.
I say headers as if they were different than libraries though they are part of them.
I'll give an example that I just ran across and it's with my old friend "ESP8266WiFi" .
It seemed that WiFi.h replaced ESP8266WiFi.h so I changed all my code in about 6 places.
It caused an error as one of my includes is ESPWebServer.h which contains an include of ESP8266WiFi.h
So I changed it as well wondering how much of that was going on.
I was looking through the "Manage Libraries" sub-section and ran across this: Wifi connection and configuration manager for ESP8266 and ESP32.
ConfigManager
This library was made to ease the complication of configuring Wifi and other settings on an
ESP8266 or ESP32. It is roughly split into two parts,
Wifi configuration and the rest variable configuration.
It sounded ideal so I tried compiling with it. Lots of trouble and changes needed, so I changed about 4 sub-programs back to :
Wifi: which I think replaces ESP8266Wifi
I think that I am going back to the original and see what happens. It was closer.
I am going to post this at Adafruit as well.
What you're trying to do should not be very difficult or time consuming. You have a sketch with a certain number of dependencies and you're trying to install the versions of those dependencies that were in effect on a specific date. So you go to the GitHub repository for each dependency, check the releases page to find the version, then install that version (using Library/Boards Manager if possible, otherwise just download the release from GitHub and do an "Add .ZIP Library". Even with a very complex sketch, this should take less than an hour to do.
hextejas:
Is there a reference document that can show me what are the proper header( .h) files and libraries that work together with boards of a certain date ? Too much to ask I guess.
Yes.
hextejas:
I'll give an example that I just ran across and it's with my old friend "ESP8266WiFi" .
It seemed that WiFi.h replaced ESP8266WiFi.h
ESP8266WiFi is the WiFi communications library for the ESP8266.
WiFi.h should never be used with the ESP8266. There is a library that contains that header file written for the long retired Arduino WiFi Shield. The ESP32 boards platform also has a library of that name. If you're not using an ESP32 or an Arduino WiFi Shield, you should not include WiFi.h in any of your code.
hextejas:
I was looking through the "Manage Libraries" sub-section and ran across this: Wifi connection and configuration manager for ESP8266 and ESP32.
ConfigManager
This library was made to ease the complication of configuring Wifi and other settings on an
ESP8266 or ESP32. It is roughly split into two parts,
Wifi configuration and the rest variable configuration.
It sounded ideal so I tried compiling with it. Lots of trouble and changes needed, so I changed about 4 sub-programs back to :
Wifi: which I think replaces ESP8266Wifi
I just compiled both of the ConfigManager library's example sketches for ESP8266 with no problems, so it works without the need for any modifications.