espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.44k stars 7.38k forks source link

arduino-esp32 for specific ESP-IDF #5361

Closed superuser789 closed 3 years ago

superuser789 commented 3 years ago

I am trying to build micropython project which is based on ESPIDFv3.3.2 - 9e70825d1e1cbf7988cf36981774300066580ea7. I am using some libraries from arduino-esp32 in my project. Building micropython with latest arduino-esp32 or any other releases always shows compilation error. For getting specific ESP-IDF for particular arduino-esp32, I checkout the specific ESP-IDF commit from CONFIG_ARDUINO_IDF_COMMIT.

How can I do that in reverse i.e. getting compatible arduino-esp32 for ESP-IDF v3.3.2 - 9e70825d1e1cbf7988cf36981774300066580ea7 ?

me-no-dev commented 3 years ago

you can try to use the release/v1.0 branch of this repo, but you might need to go further back. Posting some of those build errors might help

superuser789 commented 3 years ago

you can try to use the release/v1.0 branch of this repo, but you might need to go further back. Posting some of those build errors might help

Here is the common error, I am getting :


root@localhost:~/twatch# idf.py reconfigure && idf.py build
Note: You are using Python 3.7.3. Python 3 support is new, please report any problems you encounter. Search for 'Setting the Python Interpreter' in the ESP-IDF docs if you want to use Python 2.7.
Checking Python dependencies...
Python requirements from /root/esp/esp-idf/requirements.txt are satisfied.
Running cmake in directory /root/twatch/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized /root/twatch"...
Warn about uninitialized values.
-- Building for target esp32
-- ccache will be used for faster builds
-- Building empty aws_iot component due to configuration
-- Component names: soc log heap xtensa-debug-module app_trace freertos vfs newlib esp_ringbuf driver esp_event ethernet mbedtls micro-ecc efuse bootloader_support partition_table app_update spi_flash nvs_flash lwip tcpip_adapter pthread smartconfig_ack wpa_supplicant espcoredump esp32 cxx console mdns esp_adc_cal wear_levelling sdmmc fatfs spiffs openssl nimble bt arduino ArduinoJson AsyncTCP ESP32Ping ESP8266_Spiram ESP8266Audio ESP8266SAM ESPAsyncWebServer IRremoteESP8266 TTGO_TWatch_Library micropython pubsubclient asio jsmn aws_iot bootloader coap nghttp esp-tls tcp_transport esp_http_client esp_http_server esp_https_ota esp_https_server esptool_py expat freemodbus idf_test json libsodium mqtt protobuf-c protocomm ulp unity wifi_provisioning main
-- Component paths: /root/esp/esp-idf/components/soc;/root/esp/esp-idf/components/log;/root/esp/esp-idf/components/heap;/root/esp/esp-idf/components/xtensa-debug-module;/root/esp/esp-idf/components/app_trace;/root/esp/esp-idf/components/freertos;/root/esp/esp-idf/components/vfs;/root/esp/esp-idf/components/newlib;/root/esp/esp-idf/components/esp_ringbuf;/root/esp/esp-idf/components/driver;/root/esp/esp-idf/components/esp_event;/root/esp/esp-idf/components/ethernet;/root/esp/esp-idf/components/mbedtls;/root/esp/esp-idf/components/micro-ecc;/root/esp/esp-idf/components/efuse;/root/esp/esp-idf/components/bootloader_support;/root/esp/esp-idf/components/partition_table;/root/esp/esp-idf/components/app_update;/root/esp/esp-idf/components/spi_flash;/root/esp/esp-idf/components/nvs_flash;/root/esp/esp-idf/components/lwip;/root/esp/esp-idf/components/tcpip_adapter;/root/esp/esp-idf/components/pthread;/root/esp/esp-idf/components/smartconfig_ack;/root/esp/esp-idf/components/wpa_supplicant;/root/esp/esp-idf/components/espcoredump;/root/esp/esp-idf/components/esp32;/root/esp/esp-idf/components/cxx;/root/esp/esp-idf/components/console;/root/esp/esp-idf/components/mdns;/root/esp/esp-idf/components/esp_adc_cal;/root/esp/esp-idf/components/wear_levelling;/root/esp/esp-idf/components/sdmmc;/root/esp/esp-idf/components/fatfs;/root/esp/esp-idf/components/spiffs;/root/esp/esp-idf/components/openssl;/root/esp/esp-idf/components/nimble;/root/esp/esp-idf/components/bt;/root/twatch/components/arduino;/root/twatch/components/ArduinoJson;/root/twatch/components/AsyncTCP;/root/twatch/components/ESP32Ping;/root/twatch/components/ESP8266_Spiram;/root/twatch/components/ESP8266Audio;/root/twatch/components/ESP8266SAM;/root/twatch/components/ESPAsyncWebServer;/root/twatch/components/IRremoteESP8266;/root/twatch/components/TTGO_TWatch_Library;/root/twatch/components/micropython;/root/twatch/components/pubsubclient;/root/esp/esp-idf/components/asio;/root/esp/esp-idf/components/jsmn;/root/esp/esp-idf/components/aws_iot;/root/esp/esp-idf/components/bootloader;/root/esp/esp-idf/components/coap;/root/esp/esp-idf/components/nghttp;/root/esp/esp-idf/components/esp-tls;/root/esp/esp-idf/components/tcp_transport;/root/esp/esp-idf/components/esp_http_client;/root/esp/esp-idf/components/esp_http_server;/root/esp/esp-idf/components/esp_https_ota;/root/esp/esp-idf/components/esp_https_server;/root/esp/esp-idf/components/esptool_py;/root/esp/esp-idf/components/expat;/root/esp/esp-idf/components/freemodbus;/root/esp/esp-idf/components/idf_test;/root/esp/esp-idf/components/json;/root/esp/esp-idf/components/libsodium;/root/esp/esp-idf/components/mqtt;/root/esp/esp-idf/components/protobuf-c;/root/esp/esp-idf/components/protocomm;/root/esp/esp-idf/components/ulp;/root/esp/esp-idf/components/unity;/root/esp/esp-idf/components/wifi_provisioning;/root/twatch/main
CMake Warning at /root/esp/esp-idf/tools/cmake/crosstool_version_check.cmake:28 (message):
  Xtensa toolchain /root/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
  crosstool-ng version crosstool-ng-1.22.0-97-gc752ad5d doesn't match
  supported version crosstool-ng-1.22.0-80-g6c4433a.  Check Getting Started
  documentation or proceed at own risk.
Call Stack (most recent call first):
  /root/esp/esp-idf/tools/cmake/idf_functions.cmake:214 (crosstool_version_check)
  /root/esp/esp-idf/tools/cmake/idf_functions.cmake:373 (idf_verify_environment)
  /root/esp/esp-idf/tools/cmake/project.cmake:173 (idf_import_components)
  CMakeLists.txt:16 (project)

-- IDF_VER: v3.3.2
-- Project is not inside a git repository,                         will not use 'git describe' to determine PROJECT_VER.
-- Project version: 1
-- Adding linker script /root/twatch/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script /root/esp/esp-idf/components/esp32/ld/esp32.rom.ld
-- Adding linker script /root/esp/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script /root/esp/esp-idf/components/esp32/ld/esp32.rom.libgcc.ld
-- Building empty aws_iot component due to configuration
-- Component libraries:
-- Configuring done
-- Generating done
-- Build files have been written to: /root/twatch/build
Note: You are using Python 3.7.3. Python 3 support is new, please report any problems you encounter. Search for 'Setting the Python Interpreter' in the ESP-IDF docs if you want to use Python 2.7.
Checking Python dependencies...
Python requirements from /root/esp/esp-idf/requirements.txt are satisfied.
Running ninja in directory /root/twatch/build
Executing "ninja all"...
[9/1099] Performing build step for 'bootloader'
ninja: no work to do.
[34/1097] Building C object esp-idf/arduino/CMakeFiles/idf_component_arduino.dir/cores/esp32/esp32-hal-rmt.c.obj
../components/arduino/cores/esp32/esp32-hal-rmt.c: In function 'rmtLoop':
../components/arduino/cores/esp32/esp32-hal-rmt.c:243:9: warning: unused variable 'channel' [-Wunused-variable]
     int channel = rmt->channel;
         ^
[77/1097] Building CXX object esp-idf/arduino/CMakeFiles/idf_component_arduino.dir/libraries/WiFi/src/ETH.cpp.obj
FAILED: esp-idf/arduino/CMakeFiles/idf_component_arduino.dir/libraries/WiFi/src/ETH.cpp.obj
ccache /root/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++  -DARDUINO=10805 -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="\"TTGO T-Watch\"" -DARDUINO_TWATCH_BASE -DARDUINO_VARIANT=\"twatch\" -DBOARD_HAS_PSRAM -DESP32 -DESP_PLATFORM -DF_CPU=240000000L -DGCC_NOT_5_2_0=0 -DHAVE_CONFIG_H -DIDF_VER=\"v3.3.2\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -I../components/arduino/variants/esp32 -I../components/arduino/cores/esp32 -I../components/arduino/libraries/ArduinoOTA/src -I../components/arduino/libraries/AsyncUDP/src -I../components/arduino/libraries/AzureIoT/src -I../components/arduino/libraries/BLE/src -I../components/arduino/libraries/BluetoothSerial/src -I../components/arduino/libraries/DNSServer/src -I../components/arduino/libraries/EEPROM/src -I../components/arduino/libraries/ESP32/src -I../components/arduino/libraries/ESPmDNS/src -I../components/arduino/libraries/FFat/src -I../components/arduino/libraries/FS/src -I../components/arduino/libraries/HTTPClient/src -I../components/arduino/libraries/HTTPUpdate/src -I../components/arduino/libraries/NetBIOS/src -I../components/arduino/libraries/Preferences/src -I../components/arduino/libraries/SD_MMC/src -I../components/arduino/libraries/SD/src -I../components/arduino/libraries/SimpleBLE/src -I../components/arduino/libraries/SPIFFS/src -I../components/arduino/libraries/SPI/src -I../components/arduino/libraries/Ticker/src -I../components/arduino/libraries/Update/src -I../components/arduino/libraries/WebServer/src -I../components/arduino/libraries/WiFiClientSecure/src -I../components/arduino/libraries/WiFi/src -I../components/arduino/libraries/Wire/src -I../components/arduino/tools/sdk/include/wifi_provisioning -I../components/arduino/tools/sdk/include/protocomm -I../components/arduino/cores/esp32/libb64 -Iconfig -I/root/esp/esp-idf/components/spi_flash/include -I/root/esp/esp-idf/components/mbedtls/port/include -I/root/esp/esp-idf/components/mbedtls/mbedtls/include -I/root/esp/esp-idf/components/esp32/include -I/root/esp/esp-idf/components/driver/include -I/root/esp/esp-idf/components/esp_ringbuf/include -I/root/esp/esp-idf/components/tcpip_adapter/include -I/root/esp/esp-idf/components/lwip/include/apps -I/root/esp/esp-idf/components/lwip/include/apps/sntp -I/root/esp/esp-idf/components/lwip/lwip/src/include -I/root/esp/esp-idf/components/lwip/port/esp32/include -I/root/esp/esp-idf/components/lwip/port/esp32/include/arch -I/root/esp/esp-idf/components/lwip/include_compat -I/root/esp/esp-idf/components/vfs/include -I/root/esp/esp-idf/components/esp_event/include -I/root/esp/esp-idf/components/log/include -I/root/esp/esp-idf/components/efuse/include -I/root/esp/esp-idf/components/efuse/esp32/include -I/root/esp/esp-idf/components/newlib/platform_include -I/root/esp/esp-idf/components/newlib/include -I/root/esp/esp-idf/components/freertos/include -I/root/esp/esp-idf/components/app_trace/include -I/root/esp/esp-idf/components/heap/include -I/root/esp/esp-idf/components/soc/esp32/include -I/root/esp/esp-idf/components/soc/include -I/root/esp/esp-idf/components/mdns/include -I/root/esp/esp-idf/components/console -I/root/esp/esp-idf/components/ethernet/include -I/root/esp/esp-idf/components/esp_adc_cal/include -I/root/esp/esp-idf/components/fatfs/src -I/root/esp/esp-idf/components/wear_levelling/include -I/root/esp/esp-idf/components/sdmmc/include -I/root/esp/esp-idf/components/nvs_flash/include -I/root/esp/esp-idf/components/app_update/include -I/root/esp/esp-idf/components/bootloader_support/include -I/root/esp/esp-idf/components/spiffs/include -I/root/esp/esp-idf/components/openssl/include -I/root/esp/esp-idf/components/bt/include -I/root/esp/esp-idf/components/bt/bluedroid/api/include/api -I/root/esp/esp-idf/components/bt/common/osi/include -mlongcalls   -mfix-esp32-psram-cache-issue -mlongcalls -Og -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector -ggdb -std=gnu++11 -fno-rtti -fexceptions -MD -MT esp-idf/arduino/CMakeFiles/idf_component_arduino.dir/libraries/WiFi/src/ETH.cpp.obj -MF esp-idf/arduino/CMakeFiles/idf_component_arduino.dir/libraries/WiFi/src/ETH.cpp.obj.d -o esp-idf/arduino/CMakeFiles/idf_component_arduino.dir/libraries/WiFi/src/ETH.cpp.obj -c ../components/arduino/libraries/WiFi/src/ETH.cpp
../components/arduino/libraries/WiFi/src/ETH.cpp: In member function 'IPAddress ETHClass::dnsIP(uint8_t)':
../components/arduino/libraries/WiFi/src/ETH.cpp:196:37: error: conversion from 'const ip_addr_t* {aka const ip_addr*}' to non-scalar type 'ip_addr_t {aka ip_addr}' requested
     ip_addr_t dns_ip = dns_getserver(dns_no);
                                     ^
[86/1097] Building CXX object esp-idf/arduino/CMakeFiles/idf_component_arduino.dir/libraries/WiFi/src/WiFiProv.cpp.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
me-no-dev commented 3 years ago

you can try commit 6e5be7883811ba910743ebd0215708ca658bbaeb for that ETH change. In a similar way if you have other errors, just check when they were changed in the file and back one commit

stale[bot] commented 3 years ago

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.