ayushsharma82 / ElegantOTA

OTA updates made slick and simple for everyone!
https://elegantota.pro
GNU Affero General Public License v3.0
558 stars 111 forks source link

ESP32S3 cannot compile in any way due to conflicts #149

Closed markeby closed 1 day ago

markeby commented 7 months ago

Async Demo will not compile. There is no way I could find to eliminate the conflicts. I changed the order of include files many different ways. This will not build!

C:\Users\markeby\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32s3/include/nghttp/port/include/http_parser.h:95:6: error: 'HTTP_DELETE' conflicts with a previous declaration XX(0, DELETE, DELETE) \ ^ C:\Users\markeby\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32s3/include/nghttp/port/include/http_parser.h:138:45: note: in definition of macro 'XX'

define XX(num, name, string) HTTP_##name = num,

                                         ^~~

C:\Users\markeby\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32s3/include/nghttp/port/include/http_parser.h:139:3: note: in expansion of macro 'HTTP_METHOD_MAP' HTTP_METHOD_MAP(XX) ^~~~~~~ In file included from B:\Arduino Music\Synth32\Disp32\WebOTA.cpp:10: C:\Users\markeby\Documents\Arduino\libraries\ESPAsyncWebServer\src/ESPAsyncWebServer.h:64:3: note: previous declaration 'WebRequestMethod HTTP_DELETE' HTTP_DELETE = 0b00000100,

JMWilton commented 6 months ago

Ditto. I am using Arduino IDE 2.2

mpboddie commented 6 months ago

Same here, using platformIO in VSCode. I'm looking back in the code to confirm, but I think that ELEGANTOTA_USE_ASYNC_WEBSERVER should be set to 1 and that isn't happening.

JMWilton commented 6 months ago

Arduino IDE 2.2.1 Additional Boards Manager: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json Board: NodeMCU 0.9 (ESP-12 Module) Libraries: AsyncTCP by dvarrel 1.1.4 installed ESPAsyncTCP by dvarrel 1.2.4 installed ElegantOTA by Ayush Sharma 3.1.0 installed

Error Messages: c:\Users\Joseph Wilton\Documents\Arduino\libraries\ElegantOTA\src\ElegantOTA.cpp: In lambda function: c:\Users\Joseph Wilton\Documents\Arduino\libraries\ElegantOTA\src\ElegantOTA.cpp:76:71: error: 'FS_end' was not declared in this scope uint32_t update_size = mode == OTA_MODE_FILESYSTEM ? ((size_t)FS_end - (size_t)FS_start) : ((ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000); ^ c:\Users\Joseph Wilton\Documents\Arduino\libraries\ElegantOTA\src\ElegantOTA.cpp:76:88: error: 'FS_start' was not declared in this scope uint32_t update_size = mode == OTA_MODE_FILESYSTEM ? ((size_t)FS_end - (size_t)FS_start) : ((ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000); ^

exit status 1

Compilation error: exit status 1

mpboddie commented 6 months ago

@JMWilton, I believe the FS_end and FS_start issue may be something different. Try https://github.com/ayushsharma82/ElegantOTA/issues/143#issuecomment-1817520212

mpboddie commented 6 months ago

@markeby try the instructions here, https://docs.elegantota.pro/async-mode/

This should solve your issue.

ayushsharma82 commented 6 months ago

@markeby Did you get it working?

grantnorwood commented 6 months ago

@markeby try the instructions here, https://docs.elegantota.pro/async-mode/

This should solve your issue.

Following the async docs and using the example code does not compile. Using the latest PlatformIO, building produces a ton of #error "include FreeRTOS.h" must appear in source files before "..." errors, beginning with this one:

In file included from .pio/libdeps/nodemcu-32s/AsyncTCP/src/AsyncTCP.h:29,
                 from src/main.cpp:29:
/Users/SomeUser/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/freertos/include/freertos/semphr.h:31:6: error: #error "include FreeRTOS.h" must appear in source files before "include semphr.h"
     #error "include FreeRTOS.h" must appear in source files before "include semphr.h"

I resolved the various conflicts with a previous declaration errors by ensuring that AsyncTCP wasn't listed twice in /.pio/libdeps. Make sure that you're not listing AsyncTCP in your lib_deps, as ESPAsyncWebServer already brings that lib in for you.

lib_deps = 
  ayushsharma82/ElegantOTA@^3.1.0
  https://github.com/me-no-dev/ESPAsyncWebServer.git
  ; https://github.com/me-no-dev/AsyncTCP.git
build_flags=-DELEGANTOTA_USE_ASYNC_WEBSERVER=1

I also tried going into my /.pio/libdeps/*/ElegantOTA and updating the #define ELEGANTOTA_USE_ASYNC_WEBSERVER 1 flag myself _(instead of using the build_flags)_, but without success.

mathieucarbou commented 4 months ago

FYI here is what I am using on a big project using ElegantOTA, ESH-DASH and which works on ESP32, ESP32S, ESP32S2, ESP32S3, with and without ethernet:

-D ELEGANTOTA_USE_ASYNC_WEBSERVER

lib_deps =
  bblanchon/ArduinoJson @ 7.0.3
  esphome/AsyncTCP-esphome @ 2.1.3
  mathieucarbou/ESP Async WebServer @ 2.7.0
  https://github.com/ayushsharma82/ElegantOTA

( ref )

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 day ago

This issue was closed because it has been stalled for 5 days with no activity.