Skip to content
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

ESP32S3 cannot compile in any way due to conflicts #149

Open
markeby opened this issue Dec 8, 2023 · 8 comments
Open

ESP32S3 cannot compile in any way due to conflicts #149

markeby opened this issue Dec 8, 2023 · 8 comments

Comments

@markeby
Copy link

markeby commented Dec 8, 2023

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
Copy link

Ditto. I am using Arduino IDE 2.2

@mpboddie
Copy link

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
Copy link

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
Copy link

@JMWilton, I believe the FS_end and FS_start issue may be something different. Try #143 (comment)

@mpboddie
Copy link

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

This should solve your issue.

@ayushsharma82
Copy link
Owner

@markeby Did you get it working?

@grantnorwood
Copy link

@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
Copy link

mathieucarbou commented Mar 3, 2024

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 )

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

6 participants