Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues compiling library with Arduino WEB IDE #167

Open
I020006 opened this issue Nov 24, 2021 · 1 comment
Open

Issues compiling library with Arduino WEB IDE #167

I020006 opened this issue Nov 24, 2021 · 1 comment

Comments

@I020006
Copy link

I020006 commented Nov 24, 2021

Description

I use the TimeLib 1.6.1 in my local Arduino IDE 1.8.16 and it does compile fine with my local installation.
If I use the same code, in the Arduino Cloud Editor, I get the following compilation errors - compiling it for the NodeMCU1.0 (ESP_12-E Module):

/usr/local/bin/arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2:baud=115200,dbg=Disabled,eesz=4M,exception=disabled,ip=lm2f,lvl=None____,vt=flash,wipe=none,xtal=80 --libraries /home/builder/opt/libraries/latest --build-cache-path /tmp --output-dir /tmp/680303245/build --build-path /tmp/arduino-build-001A81F5F621F992EC5DD8B712941CC8 /tmp/680303245/MyWortuhr_V05
Using library time_1_6_1 at version 1.6.1 in folder: /home/builder/opt/libraries/time_1_6_1
Using library adafruit_neopixel_1_10_0 at version 1.10.0 in folder: /home/builder/opt/libraries/adafruit_neopixel_1_10_0
In file included from /home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/tools/sdk/libc/xtensa-lx106-elf/include/string.h:163:0,
from /home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/cores/esp8266/Arduino.h:33,
from /home/builder/opt/libraries/latest/time_1_6_1/DateStrings.cpp:12:
/home/builder/opt/libraries/latest/time_1_6_1/DateStrings.cpp: In function 'char* monthStr(uint8_t)':
/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:76:81: error: 'const void*' is not a pointer-to-object type
#define pgm_read_ptr(addr) (reinterpret_cast<const void>(addr))
^
/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/tools/sdk/libc/xtensa-lx106-elf/include/sys/string.h:32:57: note: in definition of macro 'strcpy_P'
#define strcpy_P(dest, src) strncpy_P((dest), (src), SIZE_IRRELEVANT)
^
/home/builder/opt/libraries/latest/time_1_6_1/DateStrings.cpp:72:29: note: in expansion of macro 'pgm_read_ptr'
strcpy_P(buffer, (PGM_P)pgm_read_ptr(&(monthNames_P[month])));
^
/home/builder/opt/libraries/latest/time_1_6_1/DateStrings.cpp: In function 'char* dayStr(uint8_t)':
/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:76:81: error: 'const void*' is not a pointer-to-object type
#define pgm_read_ptr(addr) (reinterpret_cast<const void>(addr))
^
/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/tools/sdk/libc/xtensa-lx106-elf/include/sys/string.h:32:57: note: in definition of macro 'strcpy_P'
#define strcpy_P(dest, src) strncpy_P((dest), (src), SIZE_IRRELEVANT)
^
/home/builder/opt/libraries/latest/time_1_6_1/DateStrings.cpp:86:28: note: in expansion of macro 'pgm_read_ptr'
strcpy_P(buffer, (PGM_P)pgm_read_ptr(&(dayNames_P[day])));
^
Error during build: exit status 1

Steps To Reproduce Problem

Copy the sample code from Time/examples/TimeSerial/TimeSerial.ino to the Arduino Web IDE https://create.arduino.cc/editor.
Try to compile is for NodeMCU1.0 (ESP_12-E Module)

Hardware & Software

Board ESP8266 NodeMCU V3
Shields / modules used:
Arduino IDE version: Arduino Web IDE https://create.arduino.cc/editor
Teensyduino version (if using Teensy)
Version info & package name (from Tools > Boards > Board Manager) NodeMCU1.0 (ESP_12-E Module)
Operating system & version Windows 10
Any other software or hardware?

Arduino Sketch

Time/examples/TimeSerial/TimeSerial.ino

Errors or Incorrect Output

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:76:81: error: 'const void*' is not a pointer-to-object type
#define pgm_read_ptr(addr) (reinterpret_cast<const void>(addr))
^

@SurenBono
Copy link

Try copy pasting the src into the project folder and #include with "timelib.h"...it's been three years since my first problem with compiling it..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants