martinberlin / eink-calendar

A very easy, almost zero-configuration, ESP8266/ESP32 E-ink calendar. Caution: UNMAINTAINED Please use CalEPD / Cale-idf
http://cale.es
MIT License
103 stars 9 forks source link

Fail to build t5s with GDEW027C44 screen #18

Closed kalon33 closed 3 years ago

kalon33 commented 4 years ago

When trying to build for t5s with GDEW027C44 e-ink screen in platformio, I got an error, here's the log:

> Executing task: platformio run <

Processing lolin_d32 (platform: espressif32@1.11.1; board: lolin_d32; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/lolin_d32.html
PLATFORM: Espressif 32 (1.11.1) > WEMOS LOLIN D32
HARDWARE: ESP32 160MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 2.10004.191002 (1.0.4) 
 - tool-esptoolpy 1.20600.0 (2.6.0) 
 - toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <GxEPD> 3.1.0
|   |-- <SPI> 1.0
|   |-- <Adafruit GFX Library> 1.10.0
|   |   |-- <Adafruit BusIO> 1.4.1
|   |   |   |-- <Wire> 1.0.1
|   |   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0.1
|   |   |-- <SPI> 1.0
|-- <Adafruit GFX Library> 1.10.0
|   |-- <Adafruit BusIO> 1.4.1
|   |   |-- <Wire> 1.0.1
|   |   |-- <SPI> 1.0
|   |-- <Wire> 1.0.1
|   |-- <SPI> 1.0
|-- <Button2> 1.0.0+sha.fed9e73
|-- <ESP8266Audio> 1.5.1+sha.93a540d
|   |-- <SPI> 1.0
|   |-- <FS> 1.0
|   |-- <SPIFFS> 1.0
|   |   |-- <FS> 1.0
|   |-- <HTTPClient> 1.2
|   |   |-- <WiFi> 1.0
|   |   |-- <WiFiClientSecure> 1.0
|   |   |   |-- <WiFi> 1.0
|   |-- <SD(esp32)> 1.0.5
|   |   |-- <FS> 1.0
|   |   |-- <SPI> 1.0
|-- <Adafruit BusIO> 1.4.1
|   |-- <Wire> 1.0.1
|   |-- <SPI> 1.0
|-- <Wire> 1.0.1
|-- <HTTPClient> 1.2
|   |-- <WiFi> 1.0
|   |-- <WiFiClientSecure> 1.0
|   |   |-- <WiFi> 1.0
|-- <SD(esp32)> 1.0.5
|   |-- <FS> 1.0
|   |-- <SPI> 1.0
|-- <SPIFFS> 1.0
|   |-- <FS> 1.0
|-- <Config>
|-- <ESPmDNS> 1.0
|   |-- <WiFi> 1.0
|-- <SPI> 1.0
|-- <WiFi> 1.0
Building in release mode
Compiling .pio/build/lolin_d32/src/main.cpp.o
Archiving .pio/build/lolin_d32/lib633/libWire.a
Indexing .pio/build/lolin_d32/lib633/libWire.a
Archiving .pio/build/lolin_d32/libc06/libAdafruit BusIO.a
Indexing .pio/build/lolin_d32/libc06/libAdafruit BusIO.a
Compiling .pio/build/lolin_d32/libee3/Adafruit GFX Library/glcdfont.c.o
Compiling .pio/build/lolin_d32/lib087/GxEPD/GxEPD.cpp.o
Compiling .pio/build/lolin_d32/lib087/GxEPD/GxFont_GFX.cpp.o
Compiling .pio/build/lolin_d32/lib087/GxEPD/GxGDE0213B1/GxGDE0213B1.cpp.o
Compiling .pio/build/lolin_d32/lib087/GxEPD/GxGDEH0154D67/GxGDEH0154D67.cpp.o
Archiving .pio/build/lolin_d32/libee3/libAdafruit GFX Library.a
Compiling .pio/build/lolin_d32/lib087/GxEPD/GxGDEH0213B72/GxGDEH0213B72.cpp.o
Compiling .pio/build/lolin_d32/lib087/GxEPD/GxGDEH0213B73/GxGDEH0213B73.cpp.o
Indexing .pio/build/lolin_d32/libee3/libAdafruit GFX Library.a
Compiling .pio/build/lolin_d32/lib087/GxEPD/GxGDEH029A1/GxGDEH029A1.cpp.o
src/main.cpp:100:1: error: 'GxEPD_Class' does not name a type
 GxEPD_Class display(io, EINK_RST, EINK_BUSY );
 ^
src/main.cpp: In function 'void displayInit()':
src/main.cpp:119:5: error: 'display' was not declared in this scope
     display.init(115200);
     ^
src/main.cpp: In function 'void displayMessage(String, int)':
src/main.cpp:132:3: error: 'display' was not declared in this scope
   display.setTextColor(GxEPD_WHITE);
   ^
src/main.cpp: In function 'void displayClean()':
src/main.cpp:141:3: error: 'display' was not declared in this scope
   display.fillScreen(GxEPD_WHITE);
   ^
src/main.cpp: In function 'uint32_t skip(WiFiClient&, int32_t)':
src/main.cpp:154:15: warning: unused variable 'v' [-Wunused-variable]
       int16_t v = client.read();
               ^
src/main.cpp: In function 'bool parsePathInformation(char*, char**, char*, unsigned int*, bool*)':
src/main.cpp:241:27: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
     host[hostname_length] = NULL;
                           ^
src/main.cpp: In function 'void handleWebToDisplay(char*, String, bool)':
src/main.cpp:306:3: error: 'display' was not declared in this scope
   display.fillScreen(GxEPD_WHITE);
   ^
src/main.cpp:427:58: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
             uint32_t got = read(client, input_buffer, get);
                                                          ^
src/main.cpp:163:10: note: candidate 1: uint32_t read(WiFiClient&, uint8_t*, int32_t)
 uint32_t read(WiFiClient& client, uint8_t* buffer, int32_t bytes)
          ^
In file included from /home/nicolas/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/newlib/stdlib.h:11:0,
                 from /home/nicolas/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:26,
                 from lib/Config/Config.h:1,
                 from src/main.cpp:1:
/home/nicolas/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/newlib/sys/unistd.h:149:32: note: candidate 2: int read(int, void*, size_t)
 _READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte ));
                                ^
/home/nicolas/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/newlib/_ansi.h:65:30: note: in definition of macro '_EXFUN'
 #define _EXFUN(name, proto)  name proto
                              ^
src/main.cpp:431:76: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
               uint32_t gotmore = read(client, input_buffer + got, get - got);
                                                                            ^
src/main.cpp:163:10: note: candidate 1: uint32_t read(WiFiClient&, uint8_t*, int32_t)
 uint32_t read(WiFiClient& client, uint8_t* buffer, int32_t bytes)
          ^
In file included from /home/nicolas/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/newlib/stdlib.h:11:0,
                 from /home/nicolas/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:26,
                 from lib/Config/Config.h:1,
                 from src/main.cpp:1:
/home/nicolas/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/newlib/sys/unistd.h:149:32: note: candidate 2: int read(int, void*, size_t)
 _READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte ));
                                ^
/home/nicolas/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/newlib/_ansi.h:65:30: note: in definition of macro '_EXFUN'
 #define _EXFUN(name, proto)  name proto
                              ^
src/main.cpp:509:77: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t {aka unsigned int}' [-Wformat=]
     bytes_read,millisBmp-millisIni, millisEnd-millisBmp, millisEnd-millisIni);
                                                                             ^
src/main.cpp:341:14: warning: unused variable 'creatorBytes' [-Wunused-variable]
     uint32_t creatorBytes = read32(client);
              ^
src/main.cpp:274:12: warning: unused variable 'startTime' [-Wunused-variable]
   uint32_t startTime = millis();
            ^
src/main.cpp: In function 'void loop()':
src/main.cpp:677:7: error: 'display' was not declared in this scope
       display.powerDown();
       ^
*** [.pio/build/lolin_d32/src/main.cpp.o] Error 1
================================================================================ [FAILED] Took 3.42 seconds ================================================================================
The terminal process "platformio 'run'" terminated with exit code: 1.

When I replace the proper define with another screen (for example GDEW027W3), it builds properly (but screen doesn't work of course...)

An idea how to fix this?

martinberlin commented 4 years ago

Hello @kalon33 I just pulled master from zero, found one error, but it's about this library: Compiling .pio/build/lolin_d32/libd7c/GxEPD/GxEPD.cpp.o In file included from .pio/libdeps/lolin_d32/Adafruit GFX Library/Adafruit_GrayOLED.cpp:20:0: .pio/libdeps/lolin_d32/Adafruit GFX Library/Adafruit_GrayOLED.h:30:32: fatal error: Adafruit_I2CDevice.h: No such file or directory

Just deleted Adafruit_GrayOLED header and cpp file.

I copied: Config.h.dist > Config.h and just uncommented:

define GDEW027C44 // 2.7" b/w/r

And updated: EINK_HAS_COLOR to true

I hit on build and it compiles: Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [== ] 23.2% (used 75916 bytes from 327680 bytes) Flash: [==========] 99.2% (used 1560518 bytes from 1572864 bytes) esptool.py v2.6 ==================================================== [SUCCESS] Took 72.07 seconds

Try deleting the library folder completely: .pio/libdeps/lolin_d32/GxEPD and let it download again. For me it looks that it's not finding the include of GxEPD but it should be there if you check the library folders.

In another topic: PLATFORM: Espressif 32 (1.11.1) > WEMOS LOLIN D32 >Your framework looks outdated

Mine reports: PLATFORM: Espressif 32 (1.12.4) > WEMOS LOLIN D32

Just go to Platformio logo -> Platforms -> Updates And update the Espressif32 framework to last version (Just in case)

gorzynsk commented 3 years ago

I get following errors trying to compile T5 version

`> Executing task: C:\Users\gorzy.platformio\penv\Scripts\pio.exe run <

Processing lolin_d32 (platform: espressif32@1.11.1; board: lolin_d32; framework: arduino)

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/lolin_d32.html
PLATFORM: Espressif 32 (1.11.1) > WEMOS LOLIN D32 HARDWARE: ESP32 160MHz, 320KB RAM, 4MB Flash DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:


compilation terminated. [.pio\build\lolin_d32\lib9a8\Adafruit GFX Library@src-ac08a74c2b277f63bd79d3b6a68484c8\Adafruit_GrayOLED.cpp.o] Error 1 src\main.cpp: In function 'uint32_t skip(WiFiClient&, int32_t)': src\main.cpp:154:15: warning: unused variable 'v' [-Wunused-variable] int16_t v = client.read(); ^ src\main.cpp: In function 'bool parsePathInformation(char, char, char, unsigned int, bool)': src\main.cpp:241:27: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null] host[hostname_length] = NULL; ^ src\main.cpp: In function 'void handleWebToDisplay(char, String, bool)': src\main.cpp:427:58: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: uint32_t got = read(client, input_buffer, get); ^ src\main.cpp:163:10: note: candidate 1: uint32_t read(WiFiClient&, uint8_t, int32_t) uint32_t read(WiFiClient& client, uint8_t buffer, int32_t bytes) ^ In file included from C:/Users/gorzy/.platformio/packages/framework-arduinoespressif32@2.10004.191002/tools/sdk/include/newlib/stdlib.h:11:0, from C:/Users/gorzy/.platformio/packages/framework-arduinoespressif32@2.10004.191002/cores/esp32/WString.h:26, from lib/Config/Config.h:1, from src\main.cpp:1: C:/Users/gorzy/.platformio/packages/framework-arduinoespressif32@2.10004.191002/tools/sdk/include/newlib/sys/unistd.h:149:32: note: candidate 2: int read(int, void, size_t)
_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void
__buf, size_t __nbyte ));
^ C:/Users/gorzy/.platformio/packages/framework-arduinoespressif32@2.10004.191002/tools/sdk/include/newlib/_ansi.h:65:30: note: in definition of macro '_EXFUN'

define _EXFUN(name, proto) name proto

                          ^

src\main.cpp:431:76: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: uint32_t gotmore = read(client, input_buffer + got, get - got); ^ src\main.cpp:163:10: note: candidate 1: uint32_t read(WiFiClient&, uint8_t, int32_t) uint32_t read(WiFiClient& client, uint8_t buffer, int32_t bytes) ^ In file included from C:/Users/gorzy/.platformio/packages/framework-arduinoespressif32@2.10004.191002/tools/sdk/include/newlib/stdlib.h:11:0, from C:/Users/gorzy/.platformio/packages/framework-arduinoespressif32@2.10004.191002/cores/esp32/WString.h:26, from lib/Config/Config.h:1, from src\main.cpp:1: C:/Users/gorzy/.platformio/packages/framework-arduinoespressif32@2.10004.191002/tools/sdk/include/newlib/sys/unistd.h:149:32: note: candidate 2: int read(int, void, size_t)
_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void
__buf, size_t __nbyte ));
^ C:/Users/gorzy/.platformio/packages/framework-arduinoespressif32@2.10004.191002/tools/sdk/include/newlib/_ansi.h:65:30: note: in definition of macro '_EXFUN'

define _EXFUN(name, proto) name proto

                          ^

src\main.cpp:509:77: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t {aka unsigned int}' [-Wformat=] bytes_read,millisBmp-millisIni, millisEnd-millisBmp, millisEnd-millisIni); ^ src\main.cpp:341:14: warning: unused variable 'creatorBytes' [-Wunused-variable]
uint32_t creatorBytes = read32(client); ^ src\main.cpp:274:12: warning: unused variable 'startTime' [-Wunused-variable] uint32_t startTime = millis(); ^ src\main.cpp:494:28: warning: 'colored' may be used uninitialized in this function [-Wmaybe-uninitialized] else if (colored && with_color) ^ src\main.cpp:490:11: warning: 'whitish' may be used uninitialized in this function [-Wmaybe-uninitialized] if (whitish) ^ ============================= [FAILED] Took 53.89 seconds ============================= The terminal process "C:\Users\gorzy.platformio\penv\Scripts\pio.exe 'run'" terminated with exit code: 1.`

Removing GrayOLED gives me: `> Executing task: C:\Users\gorzy.platformio\penv\Scripts\pio.exe run <

Processing lolin_d32 (platform: espressif32@1.11.1; board: lolin_d32; framework: arduino)

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/lolin_d32.html PLATFORM: Espressif 32 (1.11.1) > WEMOS LOLIN D32 HARDWARE: ESP32 160MHz, 320KB RAM, 4MB Flash DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:

Terminal will be reused by tasks, press any key to close it. `

martinberlin commented 3 years ago

Hi, Just go to .pio/libdeps folder, find the Adafruit library, and delete this file. This is a problem with Adafruit GFX dependency. The only way to solve it would be to fork it and remove this file. Tell me if it worked.

gorzynsk commented 3 years ago

I admit I cluttered my comment. There were two logs from compilation. One with GrayOled, and second one showing errors after removing GrayOled files.

martinberlin commented 3 years ago

Sorry to be more clear, delete both the cpp and the header file: Adafruit_GrayOLED.h -> delete Adafruit_GrayOLED.cpp -> delete

If this is an annoyance I will just fork Adafruit and completely wipe out this two. platformio_adafruit_delete_2_FILES

martinberlin commented 3 years ago

Alternatively this can be solved adding: https://github.com/adafruit/Adafruit_BusIO.git

Just pushed it to the master branch. Just reopen if still does not compile!

gorzynsk commented 3 years ago

I have to miss some step because compilation still fails. I would be grateful for checking my list.

By looking at your screenshot I noticed:

Here are my logs and screen:

cale_t5_compilation_log.txt

cale_t5_compilation_screenshot

martinberlin commented 3 years ago

lib/Config/config.h:11:1: error: unknown type name 'String' String bearer2 = "";

Strange, I don't get that! Anyways let's try something simpler, use branch :+1:

https://github.com/martinberlin/eink-calendar/tree/cale

Just fill in Wifi user / pass and try to create an account in cale.es so you get a Screen URL.

If that does not work just send me an email to martin@luckycloud.de and we make some screen sharing session. I recommend this branch since in the T5 branch I prepared 3 screens but also used ESP8266 audio library since I recorded some MP3 in Spiffs and I was making a toy for my daughter. So maybe the best is to start with a simple branch, that just renders an image from Wifi and does not have any additional libraries.

martinberlin commented 3 years ago

Didn't had any more feedback so I'm clossing here. If you want to add something please reopen