Unable to compile for esp8266 ** now ESP32 **

Hi,

I've used the IDE on an old laptop for years and worked fine. I'm trying to migrate everything to a newer laptop and I'm having issues with esp8266's.

Now the same code and libs work on one laptop but not the newer. I've delated evrything and started again but still getting 'can not compile for'...

I'm running the latest IDE and I've installed the esp8266 and esp32 libs and boards. I've got the relevant files in the folders for the library. Can anybody help to what is the issue?

Arduino: 1.8.19 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"





















C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiMulti.cpp: In function 'wl_status_t waitWiFiConnect(uint32_t)':

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiMulti.cpp:89:5: error: 'esp_delay' was not declared in this scope

   89 |     esp_delay(connectTimeoutMs,

      |     ^~~~~~~~~

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiMulti.cpp: In member function 'int8_t ESP8266WiFiMulti::startScan()':

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiMulti.cpp:241:5: error: 'esp_delay' was not declared in this scope

  241 |     esp_delay(WIFI_SCAN_TIMEOUT_MS,

      |     ^~~~~~~~~

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiScan.cpp: In member function 'int8_t ESP8266WiFiScanClass::scanNetworks(bool, bool, uint8, uint8*)':

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiScan.cpp:100:9: error: 'esp_suspend' was not declared in this scope

  100 |         esp_suspend([]() { return !ESP8266WiFiScanClass::_scanComplete && ESP8266WiFiScanClass::_scanStarted; });

      |         ^~~~~~~~~~~

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiSTA-WPS.cpp: In member function 'bool ESP8266WiFiSTAClass::beginWPSConfig()':

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiSTA-WPS.cpp:77:5: error: 'esp_suspend' was not declared in this scope

   77 |     esp_suspend([]() { return _wps_config_pending; });

      |     ^~~~~~~~~~~

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp: In member function 'bool ESP8266WiFiGenericClass::mode(WiFiMode_t)':

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp:442:9: error: 'esp_delay' was not declared in this scope

  442 |         esp_delay(timeoutValue, [m]() { return wifi_get_opmode() != m; }, 5);

      |         ^~~~~~~~~

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp: In member function 'int ESP8266WiFiGenericClass::hostByName(const char*, IPAddress&, uint32_t)':

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp:626:9: error: 'esp_delay' was not declared in this scope

  626 |         esp_delay(timeout_ms, []() { return _dns_lookup_pending; }, 1);

      |         ^~~~~~~~~

In file included from C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:41:

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src/include/ClientContext.h: In member function 'int ClientContext::connect(ip_addr_t*, uint16_t)':

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src/include/ClientContext.h:148:9: error: 'esp_delay' was not declared in this scope

  148 |         esp_delay(_timeout_ms, [this]() { return this->_connect_pending; }, 1);

      |         ^~~~~~~~~

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src/include/ClientContext.h: In member function 'size_t ClientContext::_write_from_source(const char*, size_t)':

C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi\src/include/ClientContext.h:489:13: error: 'esp_delay' was not declared in this scope

  489 |             esp_delay(_timeout_ms, [this]() { return this->_send_waiting; }, 1);

      |             ^~~~~~~~~

Multiple libraries were found for "ESP8266WebServer.h"

 Used: C:\Users\cpmag\Documents\arduino\libraries\ESP8266WebServer

 Not used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WebServer

Multiple libraries were found for "ESP8266HTTPClient.h"

 Used: C:\Users\cpmag\Documents\arduino\libraries\ESP8266HTTPClient

 Not used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266HTTPClient

Multiple libraries were found for "SD.h"

 Used: C:\Users\cpmag\Documents\arduino\libraries\SD

 Not used: C:\Program Files (x86)\Arduino\libraries\SD

 Not used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\SD

Multiple libraries were found for "SDFS.h"

 Used: C:\Users\cpmag\Documents\arduino\libraries\SDFS

 Not used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\SDFS

Multiple libraries were found for "SPI.h"

 Used: C:\Users\cpmag\Documents\arduino\libraries\SPI

 Not used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\SPI

Multiple libraries were found for "ESP8266WiFi.h"

 Used: C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi

 Not used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi

Multiple libraries were found for "DNSServer.h"

 Used: C:\Users\cpmag\Documents\arduino\libraries\DNSServer

 Not used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\DNSServer

Multiple libraries were found for "Servo.h"

 Used: C:\Users\cpmag\Documents\arduino\libraries\Servo

 Not used: C:\Program Files (x86)\Arduino\libraries\Servo

 Not used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\Servo

Multiple libraries were found for "I2S.h"

 Used: C:\Users\cpmag\Documents\arduino\libraries\I2S

 Not used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\I2S

exit status 1

Error compiling for board Generic ESP8266 Module.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

You might have installed a different board package. I suggest that you check that.

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project :wink: See About the Installation & Troubleshooting category.

I see that you have installed copies of all the "platform bundled" libraries, which are stored here:

C:\Users\cpmag\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries

to your sketchbook here:

C:\Users\cpmag\Documents\arduino\libraries

This is likely the cause of your errors. The libraries that are bundled with the ESP8266 boards platform are written to work with the specific version of the platform they are bundled with.

With normal usage, the two will always be in sync and the user has no need to think about compatibility. But when you put the library in your sketchbook, the Arduino IDE gives that library preference over the platform bundled one (to allow you to make customized or experimental versions of the libraries), so when you upgrade the ESP8266 boards platform, you now are using libraries from a different version which may be incompatible.

Unless you have some very good reason for having put the libraries in your sketchbook, you should delete all of them. You should also desist from this practice in general unless you have a specific need for it, since it is likely to cause problems like this one you had, or else just leave you will outdated libraries.

Hi. Thanks for moving the post to a more suitable place.

Hi. Thanks for the reply.
I did see the duplicates but prior to adding the files to my other library folder, some were missing, causing an error. I can’t remember at this moment if I just bundled them all in there.
Ijust deleted all the files and then it states esp8266wifi.h is not there. Put it back into my folder and then it clashes again with the other folder

I've tried deleting the folders from my sketch folder but then I get the following

Arduino: 1.8.19 (Windows 10), Board: "LOLIN(WEMOS) D1 mini (clone), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, DOUT (compatible), 40MHz, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

Baby_R2D2_Controller:7:10: fatal error: WiFiManager.h: No such file or directory

    7 | #include <WiFiManager.h>

      |          ^~~~~~~~~~~~~~~

compilation terminated.

exit status 1

WiFiManager.h: No such file or directory

Specified folder/zip file does not contain a valid library


I then reinstate the folder into my sketch folder and get the following

Arduino: 1.8.19 (Windows 10), Board: "LOLIN(WEMOS) D1 mini (clone), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, DOUT (compatible), 40MHz, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

Baby_R2D2_Controller:7:10: fatal error: WiFiManager.h: No such file or directory

    7 | #include <WiFiManager.h>

Multiple libraries were found for "ESP8266WiFi.h"

      |          ^~~~~~~~~~~~~~~

 Used: C:\Users\cpmag\Documents\arduino\libraries\ESP8266WiFi

compilation terminated.

 Not used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.1\libraries\ESP8266WiFi

exit status 1

WiFiManager.h: No such file or directory

I've deleted the esp folder, arduino, all folders and the same persists. At a loss currently.

Sorry for the spam but I got it working. I followed what you said, deleted all but I didn’t need to replace esp8266wifi.
So I placed wifimanager in my lib folder and all is working. When it’s 2am and things are not working, it’s time to call it a day. All good now though. Thanks!

Hi. I'm glad you got it working. It is perfectly fine to install standalone libraries like "WiFiManager" into your sketchbook. In fact that is where the Arduino IDE's Library Manager installs libraries to.

In my previous reply, I was exclusively referring to the libraries that come with the ESP8266 boards platform. Those are managed by the Arduino IDE Boards Manager and so it is generally best to leave them where they are. There are some rare cases where you might want to make customizations or do beta testing of the latest development version of the library, in which case it would make sense to install them to your sketchbook, but most of the time when we see them there it is by user error.

1 Like

It is important that the libraries are the same versions you used before. It has happened to me that after updating to a newer version of the core files for ESP8266, a running program no longer works as normally as it used to.

Yes, fair enough. I agree with the user error, which is why I deleted everything but I just couldn’t see the issue. Thanks for the help, glad it is all working.

It is just as likely that the breakage occurred in the core itself. If you want to avoid breakage of a sketch you know was working with a specific set of dependencies, it does make sense to avoid updating libraries, but you also should avoid updating the boards platform version.

So I don't think it is a good strategy to pin the platform bundled libraries but not pin the platform in the situation where you want a controlled dependencies environment for your project. When you do decide to update the boards platform, deal with all resulting breakage from changes to the bundled libraries and breakage from changes from the core, and breakage from changes to the toolchain at that time.

You are welcome. I'm glad if I was able to be of assistance. Enjoy!

1 Like

It's the beauty of portable installs. Just create a new one, put updated libraries and/or cores in there and test your application; easier than rolling back :wink:

Hi all

it was going so well but I have the same issue but with the ESP32. When I look online it states to reinstall the IDE etc but that never worked before. I've got no additional libraries installed for the ESP32 but whatever I do, nothing compiles.

Any ideas please?

These are the libs I'm using and I've deleted the code but still the issue, so appears to be lib associated

#define BLYNK_PRINT Serial

#include <Arduino.h>
//#include <ESP8266WiFi.h>
#include <WiFi.h>
#include <WiFiClient.h> //maybe this one?
#include <DNSServer.h>
//#include <ESP8266WebServer.h>
#include <WebServer.h>
#include <WiFiManager.h>
//#include <BlynkSimpleEsp8266.h>
#include <BlynkSimpleEsp32.h>
//#include <Servo.h>
#include <ESP32Servo.h>
//additional test as not compiling
#include <FS.h>
#include "SPIFFS.h"
#include <DNSServer.h>
//#include <ArduinoJson.h>
//

The error

c:/users/cpmag/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: core\core.a(main.cpp.o):(.literal._Z8loopTaskPv+0x8): undefined reference to `setup()'

Multiple libraries were found for "WiFi.h"

 Used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\libraries\WiFi

 Not used: C:\Program Files (x86)\Arduino\libraries\WiFi

c:/users/cpmag/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: core\core.a(main.cpp.o):(.literal._Z8loopTaskPv+0xc): undefined reference to `loop()'

c:/users/cpmag/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: core\core.a(main.cpp.o): in function `loopTask(void*)':

C:\Users\cpmag\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\cores\esp32/main.cpp:42: undefined reference to `setup()'

c:/users/cpmag/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\cores\esp32/main.cpp:48: undefined reference to `loop()'

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling for board ESP32 Wrover Module.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Every Arduino sketch must have a setup function and a loop function. When they are missing, you get this "undefined reference to 'loop'" or "undefined reference to 'setup'" error.

If your sketch does have the function, then check your braces carefully to make sure you don't accidently have one function definition inside another.

A very helpful troubleshooting tool is the Auto Format feature (Tools > Auto Format in the Arduino IDE or Ctrl+B in the Arduino Web Editor). If you do an Auto Format and then compare the resulting indentation to your intended program structure, it will quickly point you to where there is a missing or extra brace.

Another useful feature of the Arduino IDE/Arduino Web Editor is that when you place the cursor next to one bracket, it puts a box around the matching bracket. In the Arduino IDE, if the cursor is next to the closing bracket and the opening bracket is off the screen then it will show the opening bracket line in a tool tip after a short delay.

Hi. Very good point. Either way, with the full sketch I’m still getting the issues.

You get different issues, so post the errors.

Here are the issues for the full code. This code works with an ESP8266, just changed the libraries to relevant ESP32 ones. But it won't compile. It'll compile for a blink sketch and that's about it.

Arduino: 1.8.19 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

C:\Users\cpmag\Documents\arduino\libraries\ESP8266Audio-master\src\AudioFileSourceICYStream.cpp:23:0: warning: "_GNU_SOURCE" redefined

 #define _GNU_SOURCE

 ^

<command-line>:0:0: note: this is the location of the previous definition

cc1plus.exe: warning: unrecognized command line option '-Wno-frame-address'

In file included from C:\Users\cpmag\Documents\arduino\libraries\ESP8266Audio-master\src\AudioGeneratorMIDI.cpp:65:0:

C:\Users\cpmag\Documents\arduino\libraries\ESP8266Audio-master\src\libtinysoundfont/tsf.h: In function 'void tsf_channel_midi_control(tsf*, int, int, int)':

C:\Users\cpmag\Documents\arduino\libraries\ESP8266Audio-master\src\libtinysoundfont/tsf.h:2100:1: error: insn does not satisfy its constraints:

 }

 ^

(insn 953 281 282 55 (set (reg:SF 20 f1 [501])

        (mem/u/c:SF (symbol_ref/u:SI ("*.LC244") [flags 0x2]) [17  S4 A32])) C:\Users\cpmag\Documents\arduino\libraries\ESP8266Audio-master\src\libtinysoundfont/tsf.h:2053 47 {movsf_internal}

     (nil))

C:\Users\cpmag\Documents\arduino\libraries\ESP8266Audio-master\src\libtinysoundfont/tsf.h:2100:1: internal compiler error: in extract_constrain_insn, at recog.c:2246

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

Multiple libraries were found for "WiFi.h"

 Used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.1\libraries\WiFi

 Not used: C:\Program Files (x86)\Arduino\libraries\WiFi

Multiple libraries were found for "SD.h"

 Used: C:\Users\cpmag\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.1\libraries\SD

 Not used: C:\Program Files (x86)\Arduino\libraries\SD

exit status 1

Error compiling for board ESP32 Dev Module.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

This is the sketch

#define BLYNK_PRINT Serial

#include <Arduino.h>
//#include <ESP8266WiFi.h>
#include <WiFi.h>
#include <WiFiClient.h> //maybe this one?
#include <DNSServer.h>
//#include <ESP8266WebServer.h>
#include <WebServer.h>
#include <WiFiManager.h>
//#include <BlynkSimpleEsp8266.h>
#include <BlynkSimpleEsp32.h>
//#include <Servo.h>
#include <ESP32Servo.h>
//additional test as not compiling
#include <FS.h>
#include "SPIFFS.h"
#include <DNSServer.h>
//#include <ArduinoJson.h>
//
#include "AudioFileSourcePROGMEM.h"
#include "AudioGeneratorWAV.h"
#include "AudioOutputI2SNoDAC.h"
#include "sounds.h"

AudioGeneratorWAV *wav;
AudioFileSourcePROGMEM *file;
AudioOutputI2SNoDAC *out;

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "<insert blynk token here>";
int xVal, yVal, headSpeed, soundCnt;
bool startup, headLeft, headRight;
double rampUpHead, rampUpBody;

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

Servo leftServo, rightServo, headServo;
const int leftServoPin = 5;
const int rightServoPin = 6;
const int headServoPin = 7;
const int NEUTRAL = 1500;
const int CONTROLLER_NEUTRAL = 511;
const int NEUTRAL_ZONE = 20;
const int MIN_CONTROLLER = 0;
const int MAX_CONTROLLER = 1024;

WiFiServer server(80);

BLYNK_WRITE(V0)
{
  xVal = param[0].asInt();
  yVal = param[1].asInt();
  
  startup = true;
}

BLYNK_WRITE(V2)
{
  headLeft = param.asInt();
}

BLYNK_WRITE(V3)
{
  headRight = param.asInt();
}

BLYNK_WRITE(V4)
{
  headSpeed = param.asInt();
}

BLYNK_WRITE(V5)
{
  int sound = param.asInt();

  if(sound) {
    audioLogger = &Serial;
    file = new AudioFileSourcePROGMEM( noise, sizeof(noise) );
    out = new AudioOutputI2SNoDAC();
    wav = new AudioGeneratorWAV();
    wav->begin(file, out);

    while (wav->isRunning()) {
      if (!wav->loop()) wav->stop();
    }
  }
}

BLYNK_WRITE(V6)
{
  int sound = param.asInt();

  if(sound) {
    audioLogger = &Serial;
    file = new AudioFileSourcePROGMEM( beeping, sizeof(beeping) );
    out = new AudioOutputI2SNoDAC();
    wav = new AudioGeneratorWAV();
    wav->begin(file, out);

    while (wav->isRunning()) {
      if (!wav->loop()) wav->stop();
    }
  }
}

BLYNK_WRITE(V7)
{
  int sound = param.asInt();

  if(sound) {
    audioLogger = &Serial;
    file = new AudioFileSourcePROGMEM( scream, sizeof(scream) );
    out = new AudioOutputI2SNoDAC();
    wav = new AudioGeneratorWAV();
    wav->begin(file, out);

    while (wav->isRunning()) {
      if (!wav->loop()) wav->stop();
    }
  }
}

void setup()
{
  // Debug console
  Serial.begin(9600);
  startup = false;
  headSpeed = 0;
  headLeft = false;
  headRight = false;

  Blynk.config(auth);
  WiFiManager wifiManager;
  bool result = wifiManager.autoConnect("Baby_R2D2","MasterLuke");
  Blynk.connect();
}

void loop()
{
  int leftMotor, rightMotor;
  //leg motors
  int modifiedX = map(xVal, MIN_CONTROLLER, MAX_CONTROLLER, 0, 1000) - 500;
  int modifiedY = map(yVal, MIN_CONTROLLER, MAX_CONTROLLER, 0, 1000) - 500;

  if (modifiedX < 0) {
    leftMotor = NEUTRAL + modifiedY;
    rightMotor = NEUTRAL - ((modifiedY + 1) / abs(modifiedY + 1)) * 500;
  }
  else if (modifiedX > 0) {
    leftMotor = NEUTRAL + ((modifiedY + 1) / abs(modifiedY + 1)) * 500;
    rightMotor = NEUTRAL - modifiedY;
  }
  else {
    leftMotor = NEUTRAL + modifiedY;
    rightMotor = NEUTRAL - modifiedY;
  }

  if(headLeft || headRight) {
    int multiplier;
    if(headLeft) {
      multiplier = 1;
    }
    else {
      multiplier = -1;
    }
    
    headServo.attach(headServoPin);
    headServo.writeMicroseconds(NEUTRAL + map(headSpeed, 0, 1024, 0, 500) * multiplier * rampUpHead);

    if(rampUpHead < 1.0) {
      rampUpHead += 0.1;
    }
  }
  else {
    rampUpHead = 0.0;
    headServo.detach();
  }

  if (startup) {
    if(leftMotor == NEUTRAL && rightMotor == NEUTRAL) {
      rampUpBody = 0.0;
      leftServo.detach();
      rightServo.detach();
    }
    else {
      if(!leftServo.attached()) {
        leftServo.attach(leftServoPin);
      }
      if(!rightServo.attached()) {
        rightServo.attach(rightServoPin);
      }
      leftServo.writeMicroseconds(leftMotor);
      rightServo.writeMicroseconds(rightMotor);
    }
  }
  
  delay(50);
  Blynk.run();
}

I've reinstalled the ESP32 from board manager and now I can't compile a blink sketch.

Any further idea's please.

Arduino: 1.8.19 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, None"

cc1.exe: out of memory allocating 65536 bytes



cc1.exe: out of memory allocating 65536 bytes



cc1.exe: out of memory allocating 65536 bytes



cc1.exe: out of memory allocating 65536 bytes



cc1.exe: out of memory allocating 16372 bytes

exit status 1

Error compiling for board ESP32 Dev Module.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I'll provide the cheesy but sometimes useful advice to restart your computer.

1 Like