m5stack / M5EPD

M5Paper Arduino Library
MIT License
168 stars 53 forks source link

Unable to build with arduino-esp32 m5paper definition #60

Open ZeroChaos- opened 2 months ago

ZeroChaos- commented 2 months ago

Describe the bug

The m5stack board definitions are based on arduino-esp32 2.x but I want some newer wifi stuff so I tried building with the now upstream arduino-esp32 m5paper board target and it fails.

To reproduce

Select board arduino-esp32 -> m5paper

make a sketch:

#include <M5EPD.h>

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Compile fails

Expected behavior

Compile should work :-)

Screenshots

Compiling sketch...
/home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/bin/xtensa-esp32-elf-g++ -MMD -c @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/cpp_flags -w -Os -Werror=return-type -DF_CPU=240000000L -DARDUINO=10819 -DARDUINO_M5STACK_PAPER -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"M5STACK_PAPER\"" "-DARDUINO_VARIANT=\"m5stack_paper\"" -DARDUINO_PARTITION_default_16MB "-DARDUINO_HOST_OS=\"linux\"" "-DARDUINO_FQBN=\"esp32:esp32:m5stack_paper:PSRAM=enabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=16M,UploadSpeed=1500000,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -DARDUINO_USB_CDC_ON_BOOT=0 @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/defines -I/home/zero/Arduino/sketch_sep25a -iprefix /home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/ @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/includes -I/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/qio_qspi/include -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/cores/esp32 -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/variants/m5stack_paper -I/home/zero/Arduino/libraries/M5EPD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Wire/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPI/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/FS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPIFFS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/HTTPClient/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Network/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/NetworkClientSecure/src @/tmp/arduino_build_381827/build_opt.h @/tmp/arduino_build_381827/file_opts /tmp/arduino_build_381827/sketch/sketch_sep25a.ino.cpp -o /tmp/arduino_build_381827/sketch/sketch_sep25a.ino.cpp.o
Compiling libraries...
Compiling library "M5EPD"
/home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/bin/xtensa-esp32-elf-gcc -MMD -c @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/c_flags -w -Os -Werror=return-type -DF_CPU=240000000L -DARDUINO=10819 -DARDUINO_M5STACK_PAPER -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"M5STACK_PAPER\"" "-DARDUINO_VARIANT=\"m5stack_paper\"" -DARDUINO_PARTITION_default_16MB "-DARDUINO_HOST_OS=\"linux\"" "-DARDUINO_FQBN=\"esp32:esp32:m5stack_paper:PSRAM=enabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=16M,UploadSpeed=1500000,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -DARDUINO_USB_CDC_ON_BOOT=0 @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/defines -I/home/zero/Arduino/sketch_sep25a -iprefix /home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/ @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/includes -I/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/qio_qspi/include -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/cores/esp32 -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/variants/m5stack_paper -I/home/zero/Arduino/libraries/M5EPD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Wire/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPI/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/FS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPIFFS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/HTTPClient/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Network/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/NetworkClientSecure/src @/tmp/arduino_build_381827/build_opt.h @/tmp/arduino_build_381827/file_opts /home/zero/Arduino/libraries/M5EPD/src/font_render.c -o /tmp/arduino_build_381827/libraries/M5EPD/font_render.c.o
/home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/bin/xtensa-esp32-elf-g++ -MMD -c @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/cpp_flags -w -Os -Werror=return-type -DF_CPU=240000000L -DARDUINO=10819 -DARDUINO_M5STACK_PAPER -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"M5STACK_PAPER\"" "-DARDUINO_VARIANT=\"m5stack_paper\"" -DARDUINO_PARTITION_default_16MB "-DARDUINO_HOST_OS=\"linux\"" "-DARDUINO_FQBN=\"esp32:esp32:m5stack_paper:PSRAM=enabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=16M,UploadSpeed=1500000,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -DARDUINO_USB_CDC_ON_BOOT=0 @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/defines -I/home/zero/Arduino/sketch_sep25a -iprefix /home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/ @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/includes -I/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/qio_qspi/include -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/cores/esp32 -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/variants/m5stack_paper -I/home/zero/Arduino/libraries/M5EPD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Wire/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPI/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/FS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPIFFS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/HTTPClient/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Network/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/NetworkClientSecure/src @/tmp/arduino_build_381827/build_opt.h @/tmp/arduino_build_381827/file_opts /home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp -o /tmp/arduino_build_381827/libraries/M5EPD/M5EPD_Canvas.cpp.o
/home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/bin/xtensa-esp32-elf-g++ -MMD -c @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/cpp_flags -w -Os -Werror=return-type -DF_CPU=240000000L -DARDUINO=10819 -DARDUINO_M5STACK_PAPER -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"M5STACK_PAPER\"" "-DARDUINO_VARIANT=\"m5stack_paper\"" -DARDUINO_PARTITION_default_16MB "-DARDUINO_HOST_OS=\"linux\"" "-DARDUINO_FQBN=\"esp32:esp32:m5stack_paper:PSRAM=enabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=16M,UploadSpeed=1500000,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -DARDUINO_USB_CDC_ON_BOOT=0 @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/defines -I/home/zero/Arduino/sketch_sep25a -iprefix /home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/ @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/includes -I/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/qio_qspi/include -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/cores/esp32 -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/variants/m5stack_paper -I/home/zero/Arduino/libraries/M5EPD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Wire/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPI/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/FS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPIFFS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/HTTPClient/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Network/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/NetworkClientSecure/src @/tmp/arduino_build_381827/build_opt.h @/tmp/arduino_build_381827/file_opts /home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp -o /tmp/arduino_build_381827/libraries/M5EPD/M5EPD.cpp.o
/home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/bin/xtensa-esp32-elf-g++ -MMD -c @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/cpp_flags -w -Os -Werror=return-type -DF_CPU=240000000L -DARDUINO=10819 -DARDUINO_M5STACK_PAPER -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"M5STACK_PAPER\"" "-DARDUINO_VARIANT=\"m5stack_paper\"" -DARDUINO_PARTITION_default_16MB "-DARDUINO_HOST_OS=\"linux\"" "-DARDUINO_FQBN=\"esp32:esp32:m5stack_paper:PSRAM=enabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=16M,UploadSpeed=1500000,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -DARDUINO_USB_CDC_ON_BOOT=0 @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/defines -I/home/zero/Arduino/sketch_sep25a -iprefix /home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/ @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/includes -I/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/qio_qspi/include -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/cores/esp32 -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/variants/m5stack_paper -I/home/zero/Arduino/libraries/M5EPD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Wire/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPI/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/FS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPIFFS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/HTTPClient/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Network/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/NetworkClientSecure/src @/tmp/arduino_build_381827/build_opt.h @/tmp/arduino_build_381827/file_opts /home/zero/Arduino/libraries/M5EPD/src/M5EPD_Driver.cpp -o /tmp/arduino_build_381827/libraries/M5EPD/M5EPD_Driver.cpp.o
/home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/bin/xtensa-esp32-elf-g++ -MMD -c @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/cpp_flags -w -Os -Werror=return-type -DF_CPU=240000000L -DARDUINO=10819 -DARDUINO_M5STACK_PAPER -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"M5STACK_PAPER\"" "-DARDUINO_VARIANT=\"m5stack_paper\"" -DARDUINO_PARTITION_default_16MB "-DARDUINO_HOST_OS=\"linux\"" "-DARDUINO_FQBN=\"esp32:esp32:m5stack_paper:PSRAM=enabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=16M,UploadSpeed=1500000,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -DARDUINO_USB_CDC_ON_BOOT=0 @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/defines -I/home/zero/Arduino/sketch_sep25a -iprefix /home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/ @/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/flags/includes -I/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/qio_qspi/include -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/cores/esp32 -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/variants/m5stack_paper -I/home/zero/Arduino/libraries/M5EPD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Wire/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPI/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/FS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SD/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/SPIFFS/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/HTTPClient/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/Network/src -I/home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/NetworkClientSecure/src @/tmp/arduino_build_381827/build_opt.h @/tmp/arduino_build_381827/file_opts /home/zero/Arduino/libraries/M5EPD/src/ffsupport.cpp -o /tmp/arduino_build_381827/libraries/M5EPD/ffsupport.cpp.o
In file included from /home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp:4:
/home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp: In member function 'void M5EPD::BatteryADCBegin()':
/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/soc/esp32/include/soc/adc_channel.h:30:33: error: invalid conversion from 'int' to 'adc1_channel_t' [-fpermissive]
   30 | #define ADC1_GPIO35_CHANNEL     7
      |                                 ^
      |                                 |
      |                                 int
/home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp:6:27: note: in expansion of macro 'ADC1_GPIO35_CHANNEL'
    6 | #define BAT_ADC_CHANNEL   ADC1_GPIO35_CHANNEL
      |                           ^~~~~~~~~~~~~~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp:79:31: note: in expansion of macro 'BAT_ADC_CHANNEL'
   79 |     adc1_config_channel_atten(BAT_ADC_CHANNEL, ADC_ATTEN_DB_11);
      |                               ^~~~~~~~~~~~~~~
In file included from /home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp:3:
/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/driver/deprecated/driver/adc.h:88:52: note:   initializing argument 1 of 'esp_err_t adc1_config_channel_atten(adc1_channel_t, adc_atten_t)'
   88 | esp_err_t adc1_config_channel_atten(adc1_channel_t channel, adc_atten_t atten);
      |                                     ~~~~~~~~~~~~~~~^~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp: In member function 'uint32_t M5EPD::getBatteryRaw()':
/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/soc/esp32/include/soc/adc_channel.h:30:33: error: invalid conversion from 'int' to 'adc1_channel_t' [-fpermissive]
   30 | #define ADC1_GPIO35_CHANNEL     7
      |                                 ^
      |                                 |
      |                                 int
/home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp:6:27: note: in expansion of macro 'ADC1_GPIO35_CHANNEL'
    6 | #define BAT_ADC_CHANNEL   ADC1_GPIO35_CHANNEL
      |                           ^~~~~~~~~~~~~~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp:90:25: note: in expansion of macro 'BAT_ADC_CHANNEL'
   90 |     return adc1_get_raw(BAT_ADC_CHANNEL);
      |                         ^~~~~~~~~~~~~~~
/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/driver/deprecated/driver/adc.h:124:33: note:   initializing argument 1 of 'int adc1_get_raw(adc1_channel_t)'
  124 | int adc1_get_raw(adc1_channel_t channel);
      |                  ~~~~~~~~~~~~~~~^~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp: In member function 'uint32_t M5EPD::getBatteryVoltage()':
/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/soc/esp32/include/soc/adc_channel.h:30:33: error: invalid conversion from 'int' to 'adc1_channel_t' [-fpermissive]
   30 | #define ADC1_GPIO35_CHANNEL     7
      |                                 ^
      |                                 |
      |                                 int
/home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp:6:27: note: in expansion of macro 'ADC1_GPIO35_CHANNEL'
    6 | #define BAT_ADC_CHANNEL   ADC1_GPIO35_CHANNEL
      |                           ^~~~~~~~~~~~~~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD.cpp:99:39: note: in expansion of macro 'BAT_ADC_CHANNEL'
   99 |         adc_raw_value += adc1_get_raw(BAT_ADC_CHANNEL);
      |                                       ^~~~~~~~~~~~~~~
/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/driver/deprecated/driver/adc.h:124:33: note:   initializing argument 1 of 'int adc1_get_raw(adc1_channel_t)'
  124 | int adc1_get_raw(adc1_channel_t channel);
      |                  ~~~~~~~~~~~~~~~^~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp: In function 'bool jpgDecode(jpg_file_decoder_t*, uint32_t (*)(JDEC*, uint8_t*, uint32_t))':
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:864:41: error: invalid conversion from 'uint32_t (*)(JDEC*, uint8_t*, uint32_t)' {aka 'long unsigned int (*)(JDEC*, unsigned char*, long unsigned int)'} to 'UINT (*)(JDEC*, BYTE*, UINT)' {aka 'unsigned int (*)(JDEC*, unsigned char*, unsigned int)'} [-fpermissive]
  864 |     JRESULT jres = jd_prepare(&decoder, reader, work, 3100, jpeg);
      |                                         ^~~~~~
      |                                         |
      |                                         uint32_t (*)(JDEC*, uint8_t*, uint32_t) {aka long unsigned int (*)(JDEC*, unsigned char*, long unsigned int)}
In file included from /home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:741:
/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/esp_rom/include/esp32/rom/tjpgd.h:91:28: note:   initializing argument 2 of 'JRESULT jd_prepare(JDEC*, UINT (*)(JDEC*, BYTE*, UINT), void*, UINT, void*)'
   91 | JRESULT jd_prepare (JDEC*, UINT(*)(JDEC*,BYTE*,UINT), void*, UINT, void*);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:886:32: error: invalid conversion from 'uint32_t (*)(JDEC*, void*, JRECT*)' {aka 'long unsigned int (*)(JDEC*, void*, JRECT*)'} to 'UINT (*)(JDEC*, void*, JRECT*)' {aka 'unsigned int (*)(JDEC*, void*, JRECT*)'} [-fpermissive]
  886 |     jres = jd_decomp(&decoder, jpgWrite, (uint8_t)jpeg->scale);
      |                                ^~~~~~~~
      |                                |
      |                                uint32_t (*)(JDEC*, void*, JRECT*) {aka long unsigned int (*)(JDEC*, void*, JRECT*)}
/home/zero/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-33fbade6/esp32/include/esp_rom/include/esp32/rom/tjpgd.h:92:27: note:   initializing argument 2 of 'JRESULT jd_decomp(JDEC*, UINT (*)(JDEC*, void*, JRECT*), BYTE)'
   92 | JRESULT jd_decomp (JDEC*, UINT(*)(JDEC*,void*,JRECT*), BYTE);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp: In member function 'bool M5EPD_Canvas::drawJpgUrl(String, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, jpeg_div_t)':
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:995:9: error: 'WiFi' was not declared in this scope
  995 |     if (WiFi.status() != WL_CONNECTED) {
      |         ^~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:995:26: error: 'WL_CONNECTED' was not declared in this scope
  995 |     if (WiFi.status() != WL_CONNECTED) {
      |                          ^~~~~~~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:1013:5: error: 'WiFiClient' was not declared in this scope
 1013 |     WiFiClient *stream = http.getStreamPtr();
      |     ^~~~~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:1013:17: error: 'stream' was not declared in this scope; did you mean 'std::io_errc::stream'?
 1013 |     WiFiClient *stream = http.getStreamPtr();
      |                 ^~~~~~
      |                 std::io_errc::stream
In file included from /home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/xtensa-esp32-elf/include/c++/12.2.0/ios:42,
                 from /home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/xtensa-esp32-elf/include/c++/12.2.0/ostream:38,
                 from /home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/xtensa-esp32-elf/include/c++/12.2.0/bits/unique_ptr.h:41,
                 from /home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/xtensa-esp32-elf/include/c++/12.2.0/memory:76,
                 from /home/zero/.arduino15/packages/esp32/hardware/esp32/3.0.5/libraries/FS/src/FS.h:24,
                 from /home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.h:5,
                 from /home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:1:
/home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/xtensa-esp32-elf/include/c++/12.2.0/bits/ios_base.h:204:24: note: 'std::io_errc::stream' declared here
  204 |   enum class io_errc { stream = 1 };
      |                        ^~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp: In member function 'bool M5EPD_Canvas::drawPngUrl(const char*, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, double, uint8_t)':
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:1180:9: error: 'WiFi' was not declared in this scope
 1180 |     if (WiFi.status() != WL_CONNECTED) {
      |         ^~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:1180:26: error: 'WL_CONNECTED' was not declared in this scope
 1180 |     if (WiFi.status() != WL_CONNECTED) {
      |                          ^~~~~~~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:1194:5: error: 'WiFiClient' was not declared in this scope
 1194 |     WiFiClient *stream = http.getStreamPtr();
      |     ^~~~~~~~~~
/home/zero/Arduino/libraries/M5EPD/src/M5EPD_Canvas.cpp:1194:17: error: 'stream' was not declared in this scope; did you mean 'std::io_errc::stream'?
 1194 |     WiFiClient *stream = http.getStreamPtr();
      |                 ^~~~~~
      |                 std::io_errc::stream
/home/zero/.arduino15/packages/esp32/tools/esp-x32/2302/xtensa-esp32-elf/include/c++/12.2.0/bits/ios_base.h:204:24: note: 'std::io_errc::stream' declared here
  204 |   enum class io_errc { stream = 1 };
      |                        ^~~~~~

Environment

Additional context

I am able to easily test from git or custom patches as needed. I would be greatful to get this library compatible with a newer version of arduino-esp32 so I can use the newer wifi settings.

Issue checklist

Tinyu-Zhao commented 1 month ago

Sorry, ours does not support arduino-esp32 2.x yet.

ZeroChaos- commented 1 month ago

I realize that. I don't know how much work it will be to fix it, and reporting bugs and testing is about my skill level with this arduino stuff for the moment. If you want to work on adding support by fixing the reported issue I can test.

Tinyu-Zhao commented 1 month ago

Sorry for the inconvenience. It will be much more convenient for you to read it in conjunction with this document.

ZeroChaos- commented 1 month ago

Thanks. I am out of my depth here but I can read and learn :-)