Error compiling for board NodeMCU 1.0 (ESP-12E Module)

Following the instructions on the Temu advert for the Ideaspark ESP8266 0.96" OLED Module, I have done exactly what it says, but I get ....

Error compiling for board NodeMCU 1.0 (ESP-12E Module)

The full error messages I get are as follows ....

Arduino: 1.8.19 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E 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, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

C:\Users\Dave\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-ar: unable to rename 'core\core.a'; reason: File exists

Multiple libraries were found for "U8g2lib.h"
Used: C:\Users\Dave\Documents\Arduino Projects\libraries\U8g2
Not used: C:\Users\Dave\Documents\Arduino Projects\libraries\arduino_443169

exit status 1

Error compiling for board NodeMCU 1.0 (ESP-12E Module).

c:/users/dave/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: core\core.a(core_esp8266_main.cpp.o):(.text._ZL9loop_taskP11ETSEventTag+0xc): undefined reference to `cont_run'

c:/users/dave/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: core\core.a(core_esp8266_main.cpp.o): in function `_ZL9loop_taskP11ETSEventTag':

C:\Users\Dave\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/core_esp8266_main.cpp:272: undefined reference to `cont_run'

c:/users/dave/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: core\core.a(core_esp8266_main.cpp.o): in function `can_yield':

C:\Users\Dave\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/core_esp8266_main.cpp:116: undefined reference to `cont_suspend'

c:/users/dave/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: core\core.a(core_esp8266_main.cpp.o): in function `__esp_suspend':

C:\Users\Dave\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/core_esp8266_main.cpp:127: undefined reference to `cont_suspend'

c:/users/dave/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: core\core.a(core_esp8266_main.cpp.o): in function `__yield':

C:\Users\Dave\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/core_esp8266_main.cpp:185: undefined reference to `cont_suspend'

c:/users/dave/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: core\core.a(Schedule.cpp.o): in function `_ZN7esp826613InterruptLockD4Ev':

C:\Users\Dave\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/interrupts.h:29: undefined reference to `cont_suspend'

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for "U8g2lib.h"
Used: C:\Users\Dave\Documents\Arduino Projects\libraries\U8g2
Not used: C:\Users\Dave\Documents\Arduino Projects\libraries\arduino_443169

exit status 1

Error compiling for board NodeMCU 1.0 (ESP-12E Module).

There are a lot of "undefined" references flagged up, but I have no idea how to interpret them. Any help would be appreciated here...

This is the sample code I am using .....

#include <Arduino.h>
#include <Wire.h>
#include <U8g2lib.h>

U8G2_SSD1306_128X64_NONAME_F_SW_I2C
u8g2(U8G2_R0,/*clock=*/14,/*data=*/12,U8X8_PIN_NONE);

void setup() {
  u8g2.begin();
}

void loop() {
  u8g2.clearBuffer();
  u8g2.setFont(u8g2_font_7x14B_tr);
  u8g2.drawStr(0,10,"Hello, ideaspark");
  u8g2.sendBuffer();
  delay(1000);
}

That error is the most significant. Something happened earlier to mess up your installation. I THINK it can be fixed by uninstalling / installing the IDE again. NOTE ONLY do that via the 'official' uninstall Win tool.

may be possibly removing the esp8266 board package and reinstalling it rather than the IDE (this is an add-on, not living inside the IDE)

As far as I know, there is no option to only install the platform folders. The only downside to an uninstall/install is losing prefs including boards. Just save board URLs to a text file.

what I meant for OP to try is to go in the board manager, searching for the ESP8266 and click the uninstall (delete?) button

and then install it again.

Okay

DUH, of course. I think that will work, I hope @abtrain lets us know.
An uninstall is only needed if the level 1 (builtin) libs are broken, and that is extremely unlikely.

https://forum.arduino.cc/t/compiler-ide-bug-ar-exe-unable-to-rename-core-core-a-reason-file-exists/493301/5

Re-Installing the board seems to have worked, compile successful, but now the upload to the device is failing....

"A fatal esptool.py error occurred: Failed to connect to ESP8266: Timed out waiting for packet header_
"

Do I need to press the "Flash" button at an appropriate time ???

YES, when you see Connecting, but almost anytime before that will be ok.

Ok,so I'm hitting the FLASH button when I see "Connecting". The blue LED blinks several times, but the IDE can't connect, and it times out.

My COM port is set to 115200 baud, should it be different ?

EDIT : I have determined that the board's baud rate is 74880, by pressing the reset button and watching the Serial Monitor.

I get ...

ets Jan 8 2013,rst cause:2, boot mode:(7,7)

waiting for host

Now if I could only set the IDE upload speed to the same, I might get success, but I don't have that speed option on the IDE...

2024-08-16_130133

Can I change the Baud rate on the Ideaspark ?

The baud rate at this point in the process is automatic, you don't need to do anything.
If that is all your output, I don't recognize it so can't help. When someone else tries to help, post the output between code tags.

OK Thanks for that....

I've found info on Stack Exchange about setting a Baud Rate permanently on the ESP, but the board doesn't appear to be accepting any AT commands.

[arduino nano - How to change baudrate of ESP8266 (12e) permanently? - Arduino Stack Exchange]

Think I might have a duff board ....

are you sure you have the correct COM port?

  1. if you run the Device Manager does COM port appear/disappear as plug/unplug the microcontroller? if not do you get any message, e.g. "USB device not recognized"
  2. disconnect everything (sensors/relays etc) from the board
  3. Try a different USB port
  4. try a different USB cable (some are charge only)

try EN / BOOT/ RST button combinations

Yes, I have the correct COM port.

I'm using the IDE Serial Monitor to look at waht the board does on RESET, and I get this response from the board.

 ets Jan  8 2013,rst cause:2, boot mode:(7,7)

waiting for host

I've tried several AT commands, and get no responses at all...

The more you 'play' with it the less likely it will work. I have up[loaded hundreds of times to dozens of different boards, and I have NEVER had to manipulate the board in any way. I have had to install correct drivers, I have had to select the right port (on a Mac so trivial) and lots of times had to hold down a boot button or simply retry 5 or 6 times before it 'took'. Get a new board and just use it as is.

are you sure the AT command code is loaded into the ESP-12E?
have you attempted to load your own program? e.g. the code in post 1 or a simple program such as blink?

The IDE won't connect, it just keeps timing out ....

Ahhh, something else must be wrong here....

Another project I've recently worked won't connect to a LOLIN(Wemos) D1 R2 & Mini....

Getting the same error.

Think I'll restart the PC and see if that helps...

Restarting the PC certainly did help me to connect and upload to my Wemos D1 Mini project, so I'm hoping the ESP project will too, but I've got an issue with the Wemos project to resolve, so might as well do it now....

1 Like