diy-esp32-epub-reader: m5paper compile error

Hi, I was trying to compile and test your project on my m5paper, but I can’t get it to work. After cloning it, I selected the correct env task for m5paper, but it gave me a lot of compilation errors:

In file included from src/boards/Lilygo_t5_47.cpp:2:
lib/Fonts/regular_font.h:2:10: fatal error: epd_driver.h: No such file or directory

********************************************************************
* Looking for epd_driver.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:epd_driver.h"
* Web  > https://platformio.org/lib/search?query=header:epd_driver.h
*
********************************************************************

 #include "epd_driver.h"
          ^~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/m5_paper/src/boards/controls/EpdiyV6ButtonControls.o
*** [.pio/build/m5_paper/src/boards/Lilygo_t5_47.o] Error 1
Compiling .pio/build/m5_paper/src/boards/controls/GPIOButtonControls.o
In file included from src/boards/controls/EpdiyV6ButtonControls.cpp:1:
src/boards/controls/EpdiyV6ButtonControls.h:2:10: fatal error: pca9555.h: No such file or directory

*****************************************************************
* Looking for pca9555.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:pca9555.h"
* Web  > https://platformio.org/lib/search?query=header:pca9555.h
*
*****************************************************************

 #include "pca9555.h"
          ^~~~~~~~~~~
compilation terminated.
*** [.pio/build/m5_paper/src/boards/controls/EpdiyV6ButtonControls.o] Error 1
In file included from lib/Epub/Renderer/M5PaperRenderer.h:6,
                 from src/boards/M5Paper.cpp:2:
lib/Epub/Renderer/EpdiyFrameBufferRenderer.h:3:10: fatal error: epd_driver.h: No such file or directory

********************************************************************
* Looking for epd_driver.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:epd_driver.h"
* Web  > https://platformio.org/lib/search?query=header:epd_driver.h
*
********************************************************************

 #include <epd_driver.h>
          ^~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/m5_paper/src/boards/M5Paper.o] Error 1
In file included from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:53:6: error: conflicting declaration of 'DIR* opendir(const char*)' with 'C' linkage
 DIR *opendir(const char *);
      ^~~~~~~
In file included from /Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:39,
                 from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/framework-espidf/components/newlib/platform_include/sys/dirent.h:53:6: note: previous declaration with 'C++' linkage
 DIR* opendir(const char* name);
      ^~~~~~~
In file included from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:56:3: error: conflicting declaration of 'dirent* readdir(DIR*)' with 'C' linkage
   readdir(DIR *);
   ^~~~~~~
In file included from /Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:39,
                 from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/framework-espidf/components/newlib/platform_include/sys/dirent.h:54:16: note: previous declaration with 'C++' linkage
 struct dirent* readdir(DIR* pdir);
                ^~~~~~~
In file included from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:58:6: error: conflicting declaration of 'int readdir_r(DIR*, dirent*, dirent**)' with 'C' linkage
 int  readdir_r(DIR *__restrict, struct dirent *__restrict,
      ^~~~~~~~~
In file included from /Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:39,
                 from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/framework-espidf/components/newlib/platform_include/sys/dirent.h:59:5: note: previous declaration with 'C++' linkage
 int readdir_r(DIR* pdir, struct dirent* entry, struct dirent** out_dirent);
     ^~~~~~~~~
In file included from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:61:7: error: conflicting declaration of 'void rewinddir(DIR*)' with 'C' linkage
 void  rewinddir(DIR *);
       ^~~~~~~~~
In file included from /Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:39,
                 from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/framework-espidf/components/newlib/platform_include/sys/dirent.h:57:6: note: previous declaration with 'C++' linkage
 void rewinddir(DIR* pdir);
      ^~~~~~~~~
In file included from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:72:7: error: conflicting declaration of 'void seekdir(DIR*, long int)' with 'C' linkage
 void  seekdir(DIR *, long);
       ^~~~~~~
In file included from /Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:39,
                 from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/framework-espidf/components/newlib/platform_include/sys/dirent.h:56:6: note: previous declaration with 'C++' linkage
 void seekdir(DIR* pdir, long loc);
      ^~~~~~~
In file included from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:73:7: error: conflicting declaration of 'long int telldir(DIR*)' with 'C' linkage
 long  telldir(DIR *);
       ^~~~~~~
In file included from /Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:39,
                 from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/framework-espidf/components/newlib/platform_include/sys/dirent.h:55:6: note: previous declaration with 'C++' linkage
 long telldir(DIR* pdir);
      ^~~~~~~
In file included from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:76:6: error: conflicting declaration of 'int closedir(DIR*)' with 'C' linkage
 int  closedir(DIR *);
      ^~~~~~~~
In file included from /Users/sn0wst0rm/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/dirent.h:39,
                 from lib/Epub/EpubList/EpubIndex.h:13,
                 from src/main.cpp:9:
/Users/sn0wst0rm/.platformio/packages/framework-espidf/components/newlib/platform_include/sys/dirent.h:58:5: note: previous declaration with 'C++' linkage
 int closedir(DIR* pdir);
     ^~~~~~~~
*** [.pio/build/m5_paper/src/main.o] Error 1
================================================================================== [FAILED] Took 6.32 seconds ==================================================================================

Environment    Status    Duration
-------------  --------  ------------
m5_paper       FAILED    00:00:06.320

I noticed that in platform.ini config file, in the m5paper env section, there was not specified anywhere the m5stack/M5EPD library. I tried adding it as a dependency but as I thought it did not work because it is written to be built against the Arduino framework, while you use espidf.

Can you please tell me how you did get it to compile? It would be really appreciated!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23

Most upvoted comments

I ported over the minimum required to send a full frame buffer over. Seems to work ok.

I’m away from the computer for the weekend, but the code should build as we run a GitHub action to check in every commit.

I’ll investigate Monday when I’m back in.

On Fri, Nov 26, 2021 at 15:09, Riccardo Calì @.***> wrote:

@cgreening https://github.com/cgreening regarding the m5paper EPD driver, how did you get it working without using the framework provided by m5stack? I don’t really like developing with the Arduino Framework so if some port for the espressif framework is available I’d like to test it.

Thanks for the help!

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/atomic14/diy-esp32-epub-reader/issues/74#issuecomment-980047187, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMTAHTHG42ABG5TJMFDELUN6PJLANCNFSM5IZUN25Q .