vincasmiliunas / ESP8266-Arduino-SHT21

SHT21/Si7021 for ESP8266 Arduino
The Unlicense
1 stars 0 forks source link

Error on lib code when try compile #1

Open jirmjos opened 6 years ago

jirmjos commented 6 years ago

Wemos D1 mini board. Wiring sensor : SDA=D2, SCL=D1

Fatal error: can't create core\WString.cpp.o: Invalid argument

Triyed your library but not luck :-(

Seems something broken on library code when try compiling your example sketch.

Regards

vincasmiliunas commented 6 years ago

Hi,

I tested the library and it compiles fine with an older I had and the newest SDKs both for ESP8266 and ESP32. This is on Linux, the path gives away you are running Windows, but there shouldn't be any differences.

The error message originates from the SDK code. Looks like you have mismatched configuration files or toolchain/gcc version. You should setup a fresh installation with the newest Arduino IDE, clean library and the newest ESP8266 SDK version. You also need to run the get.py script for the SDK to download the newest toolchain.

Something is interferencing with Arduino's ability in using the toolchain to compile the C++ SDK source code, so starting anew should help to remedy that. It could also be programming unrelated issues, such as running of out disk space, etc.

The ESP8266 SDK source code https://github.com/esp8266/Arduino does not contain a core/WString.cpp file, neither does ESP32, they do not have the "core" folder. Google shows that you could possibly be targeting ATtiny, or some other non-ESP microcontroller. Be sure to select the correct entry in the menu Tools -> Board: Wemos D1, or just Generic ESP8266 Module. Judging by the error message you shouldn't be able to compile other sketches too, not only this library. WString the Arduino string class, the Sht21 library doesn't directly even reference it. It's a failure to compile the SDK, not this library.

So, you should try doing a clean reinstall with the correct ESP8266 SDK and updated toolchain - http://esp8266.github.io/Arduino/versions/2.0.0/doc/installing.html

Hope this helps.

jirmjos commented 6 years ago

Thank you so much for your quick reply.

Sure you are rigth and the issue seems raised because my Arduino IDE installation and ESP8266 SDK is not with defaults.

In last few months I needed "personalized" install for SDK becuase some librarys I needed use have some particularities about SDK, but any other bad side effect is later detected and all my daily compilations where always fine.

In next days I can reinstall all the wole Arduino IDE and ESP8266 SDK and I hope can use all defaults for all my compilations, so then I can again try your library because I like your library aproach and I use extensively SHT sensors.

Again thanks for your good work and help.

vincasmiliunas commented 6 years ago

That's great to hear, good luck!