martinberlin / cale-platformio

Simple Platformio setup in order to build epaper Firmware using CalEPD and Adafruit GFX, with optional touch support in all Espressif ESP32 MCU variants using ESP-IDF
http://fasani.de
Apache License 2.0
8 stars 0 forks source link

Cannot build example #2

Open enyineer opened 1 year ago

enyineer commented 1 year ago

Hey Martin,

first of all, thank you for your projects!

When trying to build this example I do get the following warnings and errors which lead to the build failing (without changing anything):

.pio/libdeps/esp32dev/FT6X36/FT6X36.cpp: In member function 'bool FT6X36::readData()':
.pio/libdeps/esp32dev/FT6X36/FT6X36.cpp:223:55: error: 'portTICK_RATE_MS' was not declared in this scope; did you mean 'portTICK_PERIOD_MS'?
  223 |     ret = i2c_master_cmd_begin(I2C_NUM_0, cmd, 1000 / portTICK_RATE_MS);
      |                                                       ^~~~~~~~~~~~~~~~
      |                                                       portTICK_PERIOD_MS
Compiling .pio\build\esp32dev\lib715\calepd\epdspi.o
.pio/libdeps/esp32dev/FT6X36/FT6X36.cpp: In member function 'void FT6X36::writeRegister8(uint8_t, uint8_t)':
.pio/libdeps/esp32dev/FT6X36/FT6X36.cpp:297:49: error: 'portTICK_RATE_MS' was not declared in this scope; did you mean 'portTICK_PERIOD_MS'?
  297 |     i2c_master_cmd_begin(I2C_NUM_0, cmd, 1000 / portTICK_RATE_MS);
      |                                                 ^~~~Compiling .pio\build\esp32dev\lib715\calepd\models\color\gdeh0154z90.o
~~~~~~~~~~~~
      |                                                 portTICK_PERIOD_MS
Compiling .pio\build\esp32dev\lib715\calepd\models\color\gdeh042Z21.o
.pio/libdeps/esp32dev/FT6X36/FT6X36.cpp: In member function 'uint8_t FT6X36::readRegister8(uint8_t, uint8_t*)':
.pio/libdeps/esp32dev/FT6X36/FT6X36.cpp:313:65: error: 'portTICK_RATE_MS' was not declared in this scope; did you mean 'portTICK_PERIOD_MS'?
  313 |     esp_err_t ret = i2c_master_cmd_begin(I2C_NUM_0, cmd, 1000 / portTICK_RATE_MS);
      |                                                                 ^~~~~~~~~~~~~~~~
      |                                                                 portTICK_PERIOD_MS
Compiling .pio\build\esp32dev\lib715\calepd\models\color\gdeh042Z96.o
*** [.pio\build\esp32dev\lib141\FT6X36\FT6X36.o] Error 1
.pio/libdeps/esp32dev/FT6X36/L58Touch.cpp: In member function 'void L58Touch::writeRegister8(uint8_t, uint8_t)':
.pio/libdeps/esp32dev/FT6X36/L58Touch.cpp:357:49: error: 'portTICK_RATE_MS' was not declared in this scope; did you mean 'portTICK_PERIOD_MS'?
  357 |     i2c_master_cmd_begin(I2C_NUM_0, cmd, 1000 / portTICK_RATE_MS);
      |                                                 ^~~~~~~~~~~~~~~~
      |                                                 portTICK_PERIOD_MS
.pio/libdeps/esp32dev/FT6X36/L58Touch.cpp: In member function 'uint8_t L58Touch::readRegister8(uint8_t, uint8_t*)':
.pio/libdeps/esp32dev/FT6X36/L58Touch.cpp:383:65: error: 'portTICK_RATE_MS' was not declared in this scope; did you mean 'portTICK_PERIOD_MS'?
  383 |     esp_err_t ret = i2c_master_cmd_begin(I2C_NUM_0, cmd, 1000 / portTICK_RATE_MS);
      |                                                                 ^~~~~~~~~~~~~~~~
      |                                                                 portTICK_PERIOD_MS
.pio/libdeps/esp32dev/FT6X36/L58Touch.cpp: In member function 'void L58Touch::readBytes(uint8_t*, int)':
.pio/libdeps/esp32dev/FT6X36/L58Touch.cpp:407:65: error: 'portTICK_RATE_MS' was not declared in this scope; did you mean 'portTICK_PERIOD_MS'?
  407 |     esp_err_t ret = i2c_master_cmd_begin(I2C_NUM_0, cmd, 1000 / portTICK_RATE_MS);
      |                                                                 ^~~~~~~~~~~~~~~~
      |                                                                 portTICK_PERIOD_MS
*** [.pio\build\esp32dev\lib141\FT6X36\L58Touch.o] Error 1
.pio/libdeps/esp32dev/calepd/epd4spi.cpp: In member function 'virtual void Epd4Spi::init(uint8_t, bool)':
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:73:5: warning: missing initializer for member 'spi_bus_config_t::data4_io_num' [-Wmissing-field-initializers]
   73 |     };
      |     ^
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:73:5: warning: missing initializer for member 'spi_bus_config_t::data5_io_num' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:73:5: warning: missing initializer for member 'spi_bus_config_t::data6_io_num' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:73:5: warning: missing initializer for member 'spi_bus_config_t::data7_io_num' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:73:5: warning: missing initializer for member 'spi_bus_config_t::flags' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:73:5: warning: missing initializer for member 'spi_bus_config_t::intr_flags' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:88:5: warning: missing initializer for member 'spi_device_interface_config_t::command_bits' [-Wmissing-field-initializers]
   88 |     };
      |     ^
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:88:5: warning: missing initializer for member 'spi_device_interface_config_t::address_bits' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:88:5: warning: missing initializer for member 'spi_device_interface_config_t::dummy_bits' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:88:5: warning: missing initializer for member 'spi_device_interface_config_t::duty_cycle_pos' [-Wmissing-field-initializers]        
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:88:5: warning: missing initializer for member 'spi_device_interface_config_t::cs_ena_pretrans' [-Wmissing-field-initializers]       
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:88:5: warning: missing initializer for member 'spi_device_interface_config_t::cs_ena_posttrans' [-Wmissing-field-initializers]      
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:88:5: warning: missing initializer for member 'spi_device_interface_config_t::spics_io_num' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:88:5: warning: missing initializer for member 'spi_device_interface_config_t::pre_cb' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:88:5: warning: missing initializer for member 'spi_device_interface_config_t::post_cb' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epd4spi.cpp: In member function 'virtual void Epd4Spi::reset(uint8_t)':
.pio/libdeps/esp32dev/calepd/epd4spi.cpp:383:25: error: 'portTICK_RATE_MS' was not declared in this scope; did you mean 'portTICK_PERIOD_MS'?
  383 |     vTaskDelay(millis / portTICK_RATE_MS);
      |                         ^~~~~~~~~~~~~~~~
      |                         portTICK_PERIOD_MS
*** [.pio\build\esp32dev\lib715\calepd\epd4spi.o] Error 1
.pio/libdeps/esp32dev/calepd/epdspi.cpp: In member function 'void EpdSpi::init(uint8_t, bool)':
.pio/libdeps/esp32dev/calepd/epdspi.cpp:44:5: warning: missing initializer for member 'spi_bus_config_t::data4_io_num' [-Wmissing-field-initializers]
   44 |     };
      |     ^
.pio/libdeps/esp32dev/calepd/epdspi.cpp:44:5: warning: missing initializer for member 'spi_bus_config_t::data5_io_num' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epdspi.cpp:44:5: warning: missing initializer for member 'spi_bus_config_t::data6_io_num' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epdspi.cpp:44:5: warning: missing initializer for member 'spi_bus_config_t::data7_io_num' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epdspi.cpp:44:5: warning: missing initializer for member 'spi_bus_config_t::flags' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epdspi.cpp:44:5: warning: missing initializer for member 'spi_bus_config_t::intr_flags' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epdspi.cpp:60:5: warning: missing initializer for member 'spi_device_interface_config_t::command_bits' [-Wmissing-field-initializers]
   60 |     };
      |     ^
.pio/libdeps/esp32dev/calepd/epdspi.cpp:60:5: warning: missing initializer for member 'spi_device_interface_config_t::address_bits' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epdspi.cpp:60:5: warning: missing initializer for member 'spi_device_interface_config_t::dummy_bits' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epdspi.cpp:60:5: warning: missing initializer for member 'spi_device_interface_config_t::duty_cycle_pos' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epdspi.cpp:60:5: warning: missing initializer for member 'spi_device_interface_config_t::cs_ena_pretrans' [-Wmissing-field-initializers]        
.pio/libdeps/esp32dev/calepd/epdspi.cpp:60:5: warning: missing initializer for member 'spi_device_interface_config_t::cs_ena_posttrans' [-Wmissing-field-initializers]       
.pio/libdeps/esp32dev/calepd/epdspi.cpp:60:5: warning: missing initializer for member 'spi_device_interface_config_t::pre_cb' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epdspi.cpp:60:5: warning: missing initializer for member 'spi_device_interface_config_t::post_cb' [-Wmissing-field-initializers]
.pio/libdeps/esp32dev/calepd/epdspi.cpp: In member function 'void EpdSpi::reset(uint8_t)':
.pio/libdeps/esp32dev/calepd/epdspi.cpp:161:25: error: 'portTICK_RATE_MS' was not declared in this scope; did you mean 'portTICK_PERIOD_MS'?
  161 |     vTaskDelay(millis / portTICK_RATE_MS);
      |                         ^~~~~~~~~~~~~~~~
      |                         portTICK_PERIOD_MS
*** [.pio\build\esp32dev\lib715\calepd\epdspi.o] Error 1
======================================================================== [FAILED] Took 35.72 seconds ========================================================================

Any ideas? Seems like portTICK_RATE_MS needs to be defined somewhere. Is this a bug with the current version?

martinberlin commented 1 year ago

This is because the component is still in an older version. To fix this you can update CalEPD to latest master. Or just temporarily run a:

  pio run -t menuconfig

And then navigate to Components --> FreeRTOS ---> Enable BACKWARDS_COMPATIBILITY