Post by Jason on Feb 26, 2022 5:44:59 GMT -8
I've been trying to compile SDL_ESP32_WirelessSG3Extender.ino in anticipation of receiving my BT moisture sensors. My compile fails due to the following line in Utility.h:
The error message I receive is:
I'm using the stable release of the ESP32 library within Arduino IDE 1.8.13 and compiling for the Adafruit ESP32 Feather board. I was able to get past the error by adding the following line to the top of Utility.h:
Unfortunately, that led to another compiler error in SDL_ESP32_WirelessSG3Extender.ino. I am now receiving the following error:
The WiFi library being used by the compiler is:
Here is the full error message returned by the compiler:
Adafruit ESP32 Feather platform is based on the WROOM32 module as far as I know. As a result, I tried a few other boards built on the same WROOM32 module and the errors are consistent as far as I can tell.
Any chance you can spot what I'm doing wrong?!?
Thanks,
Jason
myTm = localtime(&myTime);
The error message I receive is:
'localtime' was not declared in this scope
I'm using the stable release of the ESP32 library within Arduino IDE 1.8.13 and compiling for the Adafruit ESP32 Feather board. I was able to get past the error by adding the following line to the top of Utility.h:
#include <time.h>
Unfortunately, that led to another compiler error in SDL_ESP32_WirelessSG3Extender.ino. I am now receiving the following error:
'g_wifi_default_wps_crypto_funcs' was not declared in this scope
The WiFi library being used by the compiler is:
/Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi
Here is the full error message returned by the compiler:
Arduino: 1.8.13 (Mac OS X), Board: "Adafruit ESP32 Feather, 80MHz, 921600, None, Default"
sketch/OWMAdafruit_GFX.cpp:45: warning: "pgm_read_word" redefined
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
In file included from /Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/cores/esp32/WString.h:29,
from /Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/cores/esp32/Arduino.h:159,
from sketch/OWMAdafruit_GFX.h:5,
from sketch/OWMAdafruit_GFX.cpp:35:
/Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/cores/esp32/pgmspace.h:39: note: this is the location of the previous definition
#define pgm_read_word(addr) ({ \
/Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:222:25: warning: extra tokens at end of #include directive
#include <Preferences.h>;
^
sketch/Seeed_AMG8833_driver.cpp: In member function 's32 AMG8833::read_pixel_temperature_reg_value(u16*)':
sketch/Seeed_AMG8833_driver.cpp:159:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
In file included from sketch/OneWire.cpp:144:
sketch/util/OneWire_direct_gpio.h: In function 'void directModeInput(uint32_t)':
sketch/util/OneWire_direct_gpio.h:161:26: error: 'rtc_gpio_desc' was not declared in this scope
uint32_t rtc_reg(rtc_gpio_desc[pin].reg);
^~~~~~~~~~~~~
sketch/OWMAdafruit_GFX.cpp: In member function 'virtual size_t Adafruit_GFX::write(uint8_t)':
sketch/OWMAdafruit_GFX.cpp:45:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
^
sketch/OWMAdafruit_GFX.cpp:46:42: note: in expansion of macro 'pgm_read_word'
#define pgm_read_pointer(addr) ((void *)pgm_read_word(addr))
^~~~~~~~~~~~~
sketch/OWMAdafruit_GFX.cpp:481:42: note: in expansion of macro 'pgm_read_pointer'
GFXglyph *glyph = &(((GFXglyph *)pgm_read_pointer(&gfxFont->glyph))[c2]);
^~~~~~~~~~~~~~~~
sketch/OWMAdafruit_GFX.cpp: In member function 'void Adafruit_GFX::drawChar(int16_t, int16_t, unsigned char, uint16_t, uint16_t, uint8_t)':
sketch/OWMAdafruit_GFX.cpp:45:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
^
sketch/OWMAdafruit_GFX.cpp:46:42: note: in expansion of macro 'pgm_read_word'
#define pgm_read_pointer(addr) ((void *)pgm_read_word(addr))
^~~~~~~~~~~~~
sketch/OWMAdafruit_GFX.cpp:540:39: note: in expansion of macro 'pgm_read_pointer'
GFXglyph *glyph = &(((GFXglyph *)pgm_read_pointer(&gfxFont->glyph))[c]);
^~~~~~~~~~~~~~~~
sketch/OWMAdafruit_GFX.cpp:45:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
^
sketch/OWMAdafruit_GFX.cpp:46:42: note: in expansion of macro 'pgm_read_word'
#define pgm_read_pointer(addr) ((void *)pgm_read_word(addr))
^~~~~~~~~~~~~
sketch/OWMAdafruit_GFX.cpp:541:35: note: in expansion of macro 'pgm_read_pointer'
uint8_t *bitmap = (uint8_t *)pgm_read_pointer(&gfxFont->bitmap);
^~~~~~~~~~~~~~~~
sketch/util/OneWire_direct_gpio.h:161:26: note: suggested alternative: 'rtc_io_desc'
uint32_t rtc_reg(rtc_gpio_desc[pin].reg);
^~~~~~~~~~~~~
rtc_io_desc
sketch/OWMAdafruit_GFX.cpp: In member function 'void Adafruit_GFX::getTextBounds(char*, int16_t, int16_t, int16_t*, int16_t*, uint16_t*, uint16_t*)':
sketch/OWMAdafruit_GFX.cpp:45:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
^
sketch/OWMAdafruit_GFX.cpp:46:42: note: in expansion of macro 'pgm_read_word'
#define pgm_read_pointer(addr) ((void *)pgm_read_word(addr))
^~~~~~~~~~~~~
sketch/OWMAdafruit_GFX.cpp:697:36: note: in expansion of macro 'pgm_read_pointer'
glyph = &(((GFXglyph *)pgm_read_pointer(&gfxFont->glyph))[c]);
^~~~~~~~~~~~~~~~
sketch/util/OneWire_direct_gpio.h: In function 'void directModeOutput(uint32_t)':
sketch/util/OneWire_direct_gpio.h:189:26: error: 'rtc_gpio_desc' was not declared in this scope
uint32_t rtc_reg(rtc_gpio_desc[pin].reg);
^~~~~~~~~~~~~
sketch/OWMAdafruit_GFX.cpp: In member function 'void Adafruit_GFX::getTextBounds(const __FlashStringHelper*, int16_t, int16_t, int16_t*, int16_t*, uint16_t*, uint16_t*)':
sketch/OWMAdafruit_GFX.cpp:45:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
^
sketch/OWMAdafruit_GFX.cpp:46:42: note: in expansion of macro 'pgm_read_word'
#define pgm_read_pointer(addr) ((void *)pgm_read_word(addr))
^~~~~~~~~~~~~
sketch/OWMAdafruit_GFX.cpp:786:36: note: in expansion of macro 'pgm_read_pointer'
glyph = &(((GFXglyph *)pgm_read_pointer(&gfxFont->glyph))[c]);
^~~~~~~~~~~~~~~~
sketch/util/OneWire_direct_gpio.h:189:26: note: suggested alternative: 'rtc_io_desc'
uint32_t rtc_reg(rtc_gpio_desc[pin].reg);
^~~~~~~~~~~~~
rtc_io_desc
/Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:244: warning: "WPS_CONFIG_INIT_DEFAULT" redefined
#define WPS_CONFIG_INIT_DEFAULT(type) { \
In file included from /Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:236:
/Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/tools/sdk/esp32/include/wpa_supplicant/esp_supplicant/include/esp_wps.h:75: note: this is the location of the previous definition
#define WPS_CONFIG_INIT_DEFAULT(type) { \
SDL_ESP32_WirelessSG3Extender:246:34: error: 'g_wifi_default_wps_crypto_funcs' was not declared in this scope
.crypto_funcs = &g_wifi_default_wps_crypto_funcs, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:249:27: note: in expansion of macro 'WPS_CONFIG_INIT_DEFAULT'
esp_wps_config_t config = WPS_CONFIG_INIT_DEFAULT(ESP_WPS_MODE);
^~~~~~~~~~~~~~~~~~~~~~~
SDL_ESP32_WirelessSG3Extender:247:3: error: 'esp_wps_config_t' has no non-static data member named 'crypto_funcs'
}
^
/Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:249:27: note: in expansion of macro 'WPS_CONFIG_INIT_DEFAULT'
esp_wps_config_t config = WPS_CONFIG_INIT_DEFAULT(ESP_WPS_MODE);
^~~~~~~~~~~~~~~~~~~~~~~
/Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino: In function 'void MQTTreconnect(bool)':
/Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:496:17: warning: division by zero [-Wdiv-by-zero]
j = 343 / 0;
~~~~^~~
In file included from /Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:523:
sketch/SDL_ESP32_BC24_GETIP.h: In function 'bool WPSGetIP(long int)':
SDL_ESP32_BC24_GETIP.h:134:25: error: no matching function for call to 'onEvent(void (&)(arduino_event_id_t, system_event_info_t))'
WiFi.onEvent(WiFiEvent);
^
In file included from /Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi/src/WiFiSTA.h:28,
from /Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi/src/WiFi.h:32,
from /Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:220:
/Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi/src/WiFiGeneric.h:147:21: note: candidate: 'wifi_event_id_t WiFiGenericClass::onEvent(WiFiEventCb, arduino_event_id_t)' <near match>
wifi_event_id_t onEvent(WiFiEventCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX);
^~~~~~~
/Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi/src/WiFiGeneric.h:147:21: note: conversion of argument 1 would be ill-formed:
In file included from /Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:523:
SDL_ESP32_BC24_GETIP.h:134:16: error: invalid conversion from 'void (*)(arduino_event_id_t, system_event_info_t)' to 'WiFiEventCb' {aka 'void (*)(arduino_event_id_t)'} [-fpermissive]
WiFi.onEvent(WiFiEvent);
^~~~~~~~~
In file included from /Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi/src/WiFiSTA.h:28,
from /Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi/src/WiFi.h:32,
from /Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:220:
/Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi/src/WiFiGeneric.h:149:21: note: candidate: 'wifi_event_id_t WiFiGenericClass::onEvent(WiFiEventSysCb, arduino_event_id_t)' <near match>
wifi_event_id_t onEvent(WiFiEventSysCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX);
^~~~~~~
/Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi/src/WiFiGeneric.h:149:21: note: conversion of argument 1 would be ill-formed:
In file included from /Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:523:
SDL_ESP32_BC24_GETIP.h:134:16: error: invalid conversion from 'void (*)(arduino_event_id_t, system_event_info_t)' to 'WiFiEventSysCb' {aka 'void (*)(arduino_event_t*)'} [-fpermissive]
WiFi.onEvent(WiFiEvent);
^~~~~~~~~
In file included from /Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:658:
sketch/aRestFunctions.h: In function 'int rebootExtender(String)':
sketch/aRestFunctions.h:137:13: warning: division by zero [-Wdiv-by-zero]
j = 343 / 0;
~~~~^~~
sketch/aRestFunctions.h: In function 'int checkSystem(String)':
sketch/aRestFunctions.h:156:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
In file included from /Users/jason/Documents/ArduinoProjects/SDL_ESP32_WirelessSG3Extender/SDL_ESP32_WirelessSG3Extender.ino:658:
sketch/aRestFunctions.h: In function 'int resetExt(String)':
sketch/aRestFunctions.h:638:5: error: 'system_restart' was not declared in this scope
system_restart();
^~~~~~~~~~~~~~
sketch/aRestFunctions.h:638:5: note: suggested alternative: 'system_event_t'
system_restart();
^~~~~~~~~~~~~~
system_event_t
Multiple libraries were found for "WiFi.h"
Used: /Users/jason/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi
Not used: /Applications/Arduino.app/Contents/Java/libraries/WiFi
Not used: /Users/jason/Documents/ArduinoProjects/libraries/WiFiNINA
exit status 1
'g_wifi_default_wps_crypto_funcs' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Adafruit ESP32 Feather platform is based on the WROOM32 module as far as I know. As a result, I tried a few other boards built on the same WROOM32 module and the errors are consistent as far as I can tell.
Any chance you can spot what I'm doing wrong?!?
Thanks,
Jason