Skip to content

unable to compile #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Eisbaeeer opened this issue Feb 21, 2022 · 12 comments
Closed

unable to compile #1

Eisbaeeer opened this issue Feb 21, 2022 · 12 comments

Comments

@Eisbaeeer
Copy link

Eisbaeeer commented Feb 21, 2022

Hi.
I downloaded your example 1:1 and try to compile it.
Get following error (installed the wifimanager lib manually, too).

warning: Calling missing SConscript without error is deprecated. Transition by adding must_exist=False to SConscript calls. Missing SConscript 'C:\lib\esp8266-iot-framework\scripts\preBuild.py' File "C:\Users\lars\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 189, in <module> Compiling .pio\build\esp32dev\src\helloWorld.cpp.o Generating partitions .pio\build\esp32dev\partitions.bin Compiling .pio\build\esp32dev\lib126\AsyncTCP\AsyncTCP.cpp.o Compiling .pio\build\esp32dev\lib30b\FS\FS.cpp.o Compiling .pio\build\esp32dev\lib30b\FS\vfs_api.cpp.o In file included from src\helloWorld.cpp:10:0: .pio\libdeps\esp32dev\WiFiManager/WiFiManager.h:16:25: fatal error: ESP8266WiFi.h: No such file or directory

Edit: Hold on. I used the default iot-framework and not your´s. Will report.

New errors:

`warning: Calling missing SConscript without error is deprecated.
Transition by adding must_exist=False to SConscript calls.
Missing SConscript 'scripts\preBuild.py'
File "C:\Users\lars.platformio\penv\lib\site-packages\platformio\builder\main.py", line 189, in
Compiling .pio\build\esp32dev\lib11a\ESP8266 IoT Framework\WiFiManager.cpp.o
Compiling .pio\build\esp32dev\lib11a\ESP8266 IoT Framework\certStore.cpp.o
Compiling .pio\build\esp32dev\lib11a\ESP8266 IoT Framework\configManager.cpp.o
Compiling .pio\build\esp32dev\lib11a\ESP8266 IoT Framework\dashboard.cpp.o
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/WiFiManager.cpp:5:10: fatal error: ESP8266WiFi.h: No such file or directory



#include <ESP8266WiFi.h>
^~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\esp32dev\lib11a\ESP8266 IoT Framework\WiFiManager.cpp.o] Error 1
In file included from .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/certStore.cpp:1:
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/certStore.h:9:10: fatal error: BearSSLHelpers.h: No such file or directory



#include <BearSSLHelpers.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\esp32dev\lib11a\ESP8266 IoT Framework\certStore.cpp.o] Error 1
In file included from .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:4:
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:31:38: error: 'std::function' has not been declared
void setConfigSaveCallback( std::function<void()> func );
^~~~~~~~
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:31:46: error: expected ',' or '...' before '<' token
void setConfigSaveCallback( std::function<void()> func );
^
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:35:9: error: 'function' in namespace 'std' does
not name a template type
std::function<void()> _configsavecallback;
^~~~~~~~
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:35:4: note: 'std::function' is defined in header ''; did you forget to '#include '?
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:6:1:
+#include

.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:35:4:
std::function<void()> _configsavecallback;
^~~
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp: In member function 'void config::save()':
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:76:10: error: '_configsavecallback' was not declared in this scope
if ( _configsavecallback != NULL) {
^~~~~~~~~~~~~~~~~~~
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:76:10: note: suggested alternative: 'setConfigSaveCallback'
if ( _configsavecallback != NULL) {
^~~~~~~~~~~~~~~~~~~
setConfigSaveCallback
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp: At global scope:
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:42: error: variable or field 'setConfigSaveCallback' declared void
void config::setConfigSaveCallback( std::function<void()> func ) {
^~~~~~~~
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:42: error: 'function' is not a member of 'std'
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:42: note: 'std::function' is defined in header ''; did you forget to '#include '?
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:5:1:
+#include

.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:42:
void config::setConfigSaveCallback( std::function<void()> func ) {
^~~~~~~~
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:59: error: 'func' was not declared in this
scope
void config::setConfigSaveCallback( std::function<void()> func ) {
^~~~
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:59: note: suggested alternative: 'sync'
void config::setConfigSaveCallback( std::function<void()> func ) {
^~~~
sync
*** [.pio\build\esp32dev\lib11a\ESP8266 IoT Framework\configManager.cpp.o] Error 1
========================================= [FAILED] Took 26.73 seconds =========================================`

@Eisbaeeer
Copy link
Author

Did you know about this project?
https://github.com/rjwats/esp8266-react

@aaronse
Copy link
Owner

aaronse commented Feb 28, 2022

Hello @Eisbaeeer , thank you for the pointer, I wasn't aware of esp8266-react that also works on ESP32. Lots of useful features! The UI configurable MQTT feature looks useful for a home lighting project am working on. Taking a deeper look...

Are you still hitting build errors when trying to build these examples using my ESP32 branch forked from maakbaas's framework? https://github.com/aaronse/esp8266-iot-framework/tree/esp32 will try to repro...

@aaronse
Copy link
Owner

aaronse commented Feb 28, 2022

Hey @Eisbaeeer, just pushed couple of config tweaks. The following worked for me (Windows 10). Please excuse the verbose write up, planning to eventually update the doc with this content to help others as well.

  • cd to your usual git/dev enlistment folder, e.g. c:\git, or some temporary scratch folder, e.g. c:\scratch
  • Clone this repo containing example projects, then clone the my ESP32 branch of maakbaas's framework, until if/when ESP32 pull request is approved and submitted.
git clone https://github.com/aaronse/esp-iot-framework-examples
cd esp-iot-framework-examples\helloWorld\lib
git clone --single-branch --branch esp32 https://github.com/aaronse/esp8266-iot-framework
  • Ensure esp8266-iot-framework dependencies are installed, and that the framework UI will build and webpack ok.
cd esp8266-iot-framework
npm install
echo verify freshly cloned framework UI bundle builds successfully
npm run build
  • Open helloworld app in VS Code.
cd ..\..
code .
  • Use PlatformIO Build task within VS Code... Ctrl + Alt + B
    • Build should succeed, but with some warnings caused by code within referenced libraries). Some build warning examples I observed:
    Transition by adding must_exist=False to SConscript calls.
    Missing SConscript 'C:\lib\esp8266-iot-framework\scripts\preBuild.py'
    File "C:\Users\aaron\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 189, in <module>

    C:\Users\aaron\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c: In function 'spiTransferBytesNL':
    C:\Users\aaron\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] ...
    C:\Users\aaron\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]   ...
  • Use PlatformIO Upload task within VS Code.
  • Use PlatformIO Monitor task within VS Code.
    • [2022-02-28] Currently, for fresh device without SSID name/password configured, startup will block for 60secs during startup until connect times out. Look at monitor output traces to observe this. Eventually captive portal will start. imo, cause is bug in the existing WifiManager.cpp startup logic. Expecting startup time to be improved in the esp8266-iot-framework orthogonal to the ESP32 branch edits.

@Eisbaeeer
Copy link
Author

@aaronse I will try it and give you a feedback here. ;-)

@FernandoGarcia
Copy link

FernandoGarcia commented Mar 13, 2022

Hi!

I have successfully installed your version using the step by step provided above with ESP32 Wrover-IE.

I didn't more tests yet.

Thanks!

@FernandoGarcia
Copy link

Applying only the changes below to configManager example I have a crash loop.

#ifdef ESP32
    #include "LITTLEFS.h"
    #define LittleFS LITTLEFS
#elif defined(ESP8266)
    #include "LittleFS.h"
#endif
Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
webServer::begin enter
Calling server.begin();  Will fail on ESP32 if tcp stack not initialized.  Ensure WiFiManager was called first.
assertion "Invalid mbox" failed: file "/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/tcpip.c", line 416, function: tcpip_api_call
abort() was called at PC 0x40108493 on core 1

ELF file SHA256: 0000000000000000

Backtrace: 0x400887bc:0x3ffb1e00 0x40088a39:0x3ffb1e20 0x40108493:0x3ffb1e40 0x401394cf:0x3ffb1e70 0x40174b99:0x3ffb1ea0 0x400dc712:0x3ffb1ef0 0x400d362a:0x3ffb1f10 0x400d4b3e:0x3ffb1f60 0x400ec882:0x3ffb1fb0 0x40089a4a:0x3ffb1fd0

@FernandoGarcia
Copy link

Also remove the initial slash (before lib) in extra_scripts path to fix this warning.

erroraaron

@aaronse
Copy link
Owner

aaronse commented Mar 14, 2022

Applying only the changes below to configManager example I have a crash loop.

#ifdef ESP32
    #include "LITTLEFS.h"
    #define LittleFS LITTLEFS
#elif defined(ESP8266)
    #include "LittleFS.h"
#endif
Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
webServer::begin enter
Calling server.begin();  Will fail on ESP32 if tcp stack not initialized.  Ensure WiFiManager was called first.
assertion "Invalid mbox" failed: file "/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/tcpip.c", line 416, function: tcpip_api_call
abort() was called at PC 0x40108493 on core 1

ELF file SHA256: 0000000000000000

Backtrace: 0x400887bc:0x3ffb1e00 0x40088a39:0x3ffb1e20 0x40108493:0x3ffb1e40 0x401394cf:0x3ffb1e70 0x40174b99:0x3ffb1ea0 0x400dc712:0x3ffb1ef0 0x400d362a:0x3ffb1f10 0x400d4b3e:0x3ffb1f60 0x400ec882:0x3ffb1fb0 0x40089a4a:0x3ffb1fd0

Hello @FernandoGarcia, is configManager example that's crashing calling GUI.begin before WifiManager.begin? If so, try moving GUI.begin after WifiManager.begin, for example see...
https://github.com/aaronse/esp-iot-framework-examples/blob/main/helloWorld/src/helloWorld.cpp

@FernandoGarcia
Copy link

I have it working now.

Now I have the setup in this order:

    LittleFS.begin();
    configManager.begin();
    configManager.setConfigSaveCallback(saveCallback);
    WiFiManager.begin(configManager.data.projectName);
    timeSync.begin();
    GUI.begin();

Thank you!

@aaronse
Copy link
Owner

aaronse commented Mar 16, 2022

Closing as resolved.

@aaronse aaronse closed this as completed Mar 16, 2022
@FernandoGarcia
Copy link

Don't forget to fix the extra_scripts path pointed above. :)

@aaronse aaronse reopened this Mar 16, 2022
@aaronse
Copy link
Owner

aaronse commented Mar 18, 2022

Thanks @FernandoGarcia! done, closing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants