Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

error compile httpUpdate exemple in platformio IDE #9503

Fo170 started this conversation in General
Discussion options

error compile httpUpdate exemple in platformio IDE

platform.ini file :
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_speed = 115200
lib_deps =


I use the following file as a source: https://github.com/espressif/arduino-esp32/blob/master/libraries/HTTPUpdate/examples/httpUpdate/httpUpdate.ino

but I have errors during compilation, however it works well under the arduino ide

Do you have any ideas to solve this problem? Thank you in advance for your suggestions.

image

You must be logged in to vote

Replies: 2 comments

Comment options

Since Platformio is using only stable release (currently core 2.0.16) and you try to use an example from branch master (which is rc candidate 3.0.0). This is not possible Use the examples from branch https://github.com/espressif/arduino-esp32/blob/release/v2.x/libraries/HTTPUpdate/examples/httpUpdate/httpUpdate.ino

pin your platform! Like this

[env:esp32dev]
platform = espressif32 @ 6.7.0
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_speed = 115200
lib_deps =
You must be logged in to vote
0 replies
Comment options

I pinned as you told me in the .ini file

[env:esp32dev]
platform = expressive32 @ 6.7.0
map = esp32dev
framework = arduino
monitor_speed = 115200
upload_speed = 115200
lib_deps =

I even reinstalled the entire esp32 framework.

but I still get the following errors:

  • Executing task: C:\Users\Admin.platformio\penv\Scripts\platformio.exe run

Processing esp32dev (platform: espressif32 @ 6.7.0; board: esp32dev; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (6.7.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:

  • framework-arduinoespressif32 @ 3.20016.0 (2.0.16)
  • tool-esptoolpy @ 1.40501.0 (4.5.1)
  • toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
    LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Warning! Ignoring broken library manifest in C:\Users\Admin.platformio\lib\AutoUpdate_ESP8266
    Found 155 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- Bridge @ 1.7.0
    |-- HTTPUpdate @ 2.0.0
    |-- WiFi @ 2.0.0
    Building in release mode
    Compiling .pio\build\esp32dev\src\main.cpp.o
    Building .pio\build\esp32dev\bootloader.bin
    Generating partitions .pio\build\esp32dev\partitions.bin
    Compiling .pio\build\esp32dev\libacb\Bridge\Bridge.cpp.o
    Compiling .pio\build\esp32dev\libacb\Bridge\BridgeClient.cpp.o
    esptool.py v4.5.1
    Creating esp32 image...
    Merged 1 ELF section
    Successfully created esp32 image.
    Compiling .pio\build\esp32dev\libacb\Bridge\BridgeSSLClient.cpp.o
    In file included from src/main.cpp:14:
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:56:48: error: 'HTTPClient' was not declared in this scope
    using HTTPUpdateRequestCB = std::function<void(HTTPClient*)>;
    ^~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:56:48: note: suggested alternative: 'HttpClient'
    using HTTPUpdateRequestCB = std::function<void(HTTPClient*)>;
    ^~~~~~~~~~
    HttpClient
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:56:60: error: template argument 1 is invalid
    using HTTPUpdateRequestCB = std::function<void(HTTPClient*)>;
    ^
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:77:29: error: 'followRedirects_t' has not been declared
    void setFollowRedirects(followRedirects_t follow)
    ^~~~~~~~~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:88:106: error: 'HTTPUpdateRequestCB' has not been declared t_httpUpdate_return update(WiFiClient& client, const String& url, const String& currentVersion = "", HTTPUpdateRequestCB requestCB = NULL);
    ^~~~~~~~~~~~~~~~~~~
    In file included from src/main.cpp:14:
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:91:67: error: 'HTTPUpdateRequestCB' has not been declared
    const String& currentVersion = "", HTTPUpdateRequestCB requestCB = NULL);
    ^~~~~~~~~~~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:93:112: error: 'HTTPUpdateRequestCB' has not been declared t_httpUpdate_return updateSpiffs(WiFiClient& client, const String& url, const String& currentVersion = "", HTTPUpdateRequestCB requestCB = NULL);
    ^~~~~~~~~~~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:95:32: error: 'HTTPClient' has not been declared
    t_httpUpdate_return update(HTTPClient& httpClient,
    ^~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:97:32: error: 'HTTPUpdateRequestCB' has not been declared
    HTTPUpdateRequestCB requestCB = NULL);
    ^~~~~~~~~~~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:99:38: error: 'HTTPClient' has not been declared
    t_httpUpdate_return updateSpiffs(HTTPClient &httpClient, const String &currentVersion = "", HTTPUpdateRequestCB requestCB = NULL);
    ^~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:99:97: error: 'HTTPUpdateRequestCB' has not been declared
    t_httpUpdate_return updateSpiffs(HTTPClient &httpClient, const String &currentVersion = "", HTTPUpdateRequestCB requestCB = NULL);
    ^~~~~~~~~~~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:111:38: error: 'HTTPClient' has not been declared
    t_httpUpdate_return handleUpdate(HTTPClient& http, const String& currentVersion, bool spiffs = false, HTTPUpdateRequestCB requestCB = NULL);
    ^~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:111:107: error: 'HTTPUpdateRequestCB' has not been declared
    t_httpUpdate_return handleUpdate(HTTPClient& http, const String& currentVersion, bool spiffs = false, HTTPUpdateRequestCB requestCB = NULL);
    ^~~~~~~~~~~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:125:5: error: 'followRedirects_t' does not name a type
    followRedirects_t _followRedirects;
    ^~~~~~~~~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:88:138: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
    t_httpUpdate_return update(WiFiClient& client, const String& url, const String& currentVersion = "", HTTPUpdateRequestCB requestCB = NULL);
    ^~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:91:99: warning: converting to non-pointer type 'int' from
    NULL [-Wconversion-null]
    const String& currentVersion = "", HTTPUpdateRequestCB requestCB = NULL);
    ^~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:93:144: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
    t_httpUpdate_return updateSpiffs(WiFiClient& client, const String& url, const String& currentVersion = "", HTTPUpdateRequestCB requestCB = NULL);
    ^~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:97:64: warning: converting to non-pointer type 'int' from
    NULL [-Wconversion-null]
    HTTPUpdateRequestCB requestCB = NULL);
    ^~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:99:129: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
    t_httpUpdate_return updateSpiffs(HTTPClient &httpClient, const String &currentVersion = "", HTTPUpdateRequestCB requestCB = NULL);
    ^~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:111:139: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
    t_httpUpdate_return handleUpdate(HTTPClient& http, const String& currentVersion, bool spiffs = false, HTTPUpdateRequestCB requestCB = NULL);
    ^~~~
    In file included from src/main.cpp:14:
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h: In member function 'void HTTPUpdate::setFollowRedirects(int)':
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:79:9: error: '_followRedirects' was not declared in this scope
    _followRedirects = follow;
    ^~~~~~~~~~~~~~~~
    C:/Users/Admin/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src/HTTPUpdate.h:79:9: note: suggested alternative: 'setFollowRedirects'
    _followRedirects = follow;
    ^~~~~~~~~~~~~~~~
    setFollowRedirects
    src/main.cpp: In function 'void loop()':
    src/main.cpp:74:81: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
    t_httpUpdate_return ret = httpUpdate.update(client, "http://server/file.bin");
    ^
    Compiling .pio\build\esp32dev\libacb\Bridge\BridgeServer.cpp.o
    Compiling .pio\build\esp32dev\libacb\Bridge\BridgeUdp.cpp.o
    Compiling .pio\build\esp32dev\libacb\Bridge\Console.cpp.o
    *** [.pio\build\esp32dev\src\main.cpp.o] Error 1
    ================================================================== [FAILED] Took 80.44 seconds ==================================================================
  • The terminal process "C:\Users\Admin.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.