-
Notifications
You must be signed in to change notification settings - Fork 46
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
ESP32 Build errors with ESP-IDF v5.1.1 #156
Comments
A little update on the situation. However, at that point, I am starting to get these errors. Getting a bit overwhelmed at this point. Any pointers?
|
I'm having the exact same issue, if I make any progress I'll let you know! |
I managed to fix the error with 'endian' not being recognised by removing the #ifndef from the following lines in BinaryStream.h:
This makes me think that somehow the ESP_PLATFORM definition is not being passed here. |
I have tried this again with the newest commits and the build starts to fail in step 1234 with the main.cpp with the following error message:
|
Hi, @myreauks when you mention
|
Hi, After that I manually added the library folder to the following path: esp-idf/examples/common-components/ |
You can use my fork, should work for esp32, if you'll use a esp32 s3, you'll have to edit the sdkconfig file |
I've gotten this to build using @tobiasguyer's fork (I haven't test it with this official repo yet and I haven't tested it on HW. The build finishes without errors though). I'm using esp-idf-v5.1.1.
The components
This is a new thing for v5 (also introduces the cmake The |
Hi!
Are you using a certain commit of Bell or how did you manage to get past this? |
I didn't actually do anything with Bell. mkdir temp
cd temp
# get idf version 5.1.1 and install it
git clone -b v5.1.1 --recursive https://github.com/espressif/esp-idf.git esp-idf-v5.1.1\n
cd esp-idf-v5.1.1
./install.sh
source ./export.sh
cd ..
# get the forked version of cspot (haven't tested the original version yet)
git clone --recursive https://github.com/tobiasguyer/cspot.git
cd cspot/targets/esp32
code . #make the aforementioned changes to the two cmake files in your favourite editor
# get the two required dependencies
idf.py add-dependency "espressif/led_strip^2.5.2"
idf.py add-dependency "espressif/mdns^1.2.2"
idf.py set-target esp32
idf.py menuconfig # no changes required here
idf.py build
# project build complete |
This is great thanks! It seems that I had accidentally installed a newer version of the idf and that was the problem. Changing to 5.1.1 fixed everything! I will still have to verify the functionality on a board, but seems very promising. |
Thank you. Your patch build well, however on the board (esp32-wrover) I get a core dump directly after wifi connection and cspot starts. No messages between start and crash. |
All good.. i'll update a working repo in the next days.. first problem is the defconf.default, wich doesn't include the psram settings, and zeroconf(the cspot task) needs to be called from a specific core. |
Cool, thank you so much. Looking forward to it and happy to test. |
i've fixed it! let me know if it works for you |
Thank you so much. This is the error I get: |
I'm totally sorry. Sdkconfig.default got somehow lost in the upload. i've just tested a new clone and it works for me. I apologize for all the work you had and i hope, that everything works now. |
Thank you so much @tobiasguyer for your help. I had an issue with my build environment, namely the protobuf version installed. If others run into issues as well, make sure you have the followling:
in the instructions above, make sure you have protobuf installed in version 3.20.1
then continue with the instructions above starting with
Thank you so much for your help. Will try on the device now. |
I finally had the chance to flash this on device. I have not yet connected to a DAC, but Spotify connects successfully to the ESP and starts playing so it seems very promising. |
Thank you @tobiasguyer for the fork and @playduck for the detailed steps. I am not 100% sure what the final CMakeLists.txt should look like as I don't really understand the second change that you make. Currently I have: # The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
# Don't override EXTRA_COMPONENT_DIRS as platformio uses it. Instead we append
# see https://github.com/platformio/platform-espressif32/issues/341
list(APPEND EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
# list(APPEND EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/led_strip)
if(NOT IDF_NO_INCLUDE)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# REQUIRES led_strip mdns spiffs esp_wifi nvs_flash protocol_examples_common
endif()
project(cspot-esp32) As you can see, I commented out the line leosum8@macmini:~/cspot/cspot/targets/esp32$ idf.py set-target esp32
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Build directory '/home/leosum8/cspot/cspot/targets/esp32/build' not found. Nothing to clean.
Executing action: set-target
Set Target to: esp32, new sdkconfig will be created.
Running cmake in directory /home/leosum8/cspot/cspot/targets/esp32/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/leosum8/.espressif/python_env/idf5.3_py3.11_env/bin/python -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=0 /home/leosum8/cspot/cspot/targets/esp32"...
-- Found Git: /usr/bin/git (found version "2.43.0")
CMake Error at /home/leosum8/esp/esp-idf/tools/cmake/project.cmake:465 (message):
Directory specified in EXTRA_COMPONENT_DIRS doesn't exist:
/home/leosum8/esp/esp-idf/examples/common_components/led_strip
Call Stack (most recent call first):
/home/leosum8/esp/esp-idf/tools/cmake/project.cmake:549 (__project_init)
CMakeLists.txt:13 (project)
-- Configuring incomplete, errors occurred!
HINT: The component with path specified in the EXTRA_COMPONENT_DIRS variable has been moved to IDF component manager (or has been removed).
Please look out for component in 'https://components.espressif.com' and add using 'idf.py add-dependency' command.
Refer to the migration guide for more details.
cmake failed with exit code 1, output of the command is in the /home/leosum8/cspot/cspot/targets/esp32/build/log/idf_py_stderr_output_7503 and /home/leosum8/cspot/cspot/targets/esp32/build/log/idf_py_stdout_output_7503 when commenting out and repeating the set-target, I get: leo@macmini:~/cspot/cspot/targets/esp32$ idf.py set-target esp32
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Directory '/home/leo/cspot/cspot/targets/esp32/build' doesn't seem to be a CMake build directory. Refusing to automatically delete files in this directory. Delete the directory manually to 'clean' it. manually removing the folder doesn't get rid of this error, I reappers every time. Despite this error I can continue with menuconfig and start building. But building fails with: ...
[1320/1672] Building CXX object esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/BellHTTPServer.cpp.obj
FAILED: esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/BellHTTPServer.cpp.obj
/home/leosum8/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ -DESP_PLATFORM -DFMT_HEADER_ONLY -DIDF_VER=\"v5.3-dev-1288-g5524b692ee\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DPB_ENABLE_MALLOC -DPB_FIELD_32BIT -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -DUSE_DEFAULT_STDLIB="1 -DTARGET_OS_IPHONE=0" -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/home/leosum8/cspot/cspot/targets/esp32/build/config -I/home/leosum8/cspot/cspot/cspot/bell/main/audio-codec/include -I/home/leosum8/cspot/cspot/cspot/bell/main/audio-dsp/include -I/home/leosum8/cspot/cspot/cspot/bell/main/audio-sinks/include -I/home/leosum8/cspot/cspot/cspot/bell/main/io/include -I/home/leosum8/cspot/cspot/cspot/bell/main/utilities/include -I/home/leosum8/cspot/cspot/cspot/bell/main/platform -I/home/leosum8/cspot/cspot/cspot/bell/external/mqtt/include -I/home/leosum8/cspot/cspot/cspot/bell/main/audio-containers/include -I/home/leosum8/cspot/cspot/cspot/bell/main/audio-sinks/include/esp -I/home/leosum8/cspot/cspot/cspot/bell/external/civetweb/include -I/home/leosum8/cspot/cspot/targets/esp32/build/esp-idf/main/cspot/bell -I/home/leosum8/esp/esp-idf/components/newlib/platform_include -I/home/leosum8/esp/esp-idf/components/freertos/config/include -I/home/leosum8/esp/esp-idf/components/freertos/config/include/freertos -I/home/leosum8/esp/esp-idf/components/freertos/config/xtensa/include -I/home/leosum8/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/home/leosum8/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/leosum8/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -I/home/leosum8/esp/esp-idf/components/freertos/esp_additions/include -I/home/leosum8/esp/esp-idf/components/esp_hw_support/include -I/home/leosum8/esp/esp-idf/components/esp_hw_support/include/soc -I/home/leosum8/esp/esp-idf/components/esp_hw_support/include/soc/esp32 -I/home/leosum8/esp/esp-idf/components/esp_hw_support/port/esp32/. -I/home/leosum8/esp/esp-idf/components/heap/include -I/home/leosum8/esp/esp-idf/components/log/include -I/home/leosum8/esp/esp-idf/components/soc/include -I/home/leosum8/esp/esp-idf/components/soc/esp32 -I/home/leosum8/esp/esp-idf/components/soc/esp32/include -I/home/leosum8/esp/esp-idf/components/hal/platform_port/include -I/home/leosum8/esp/esp-idf/components/hal/esp32/include -I/home/leosum8/esp/esp-idf/components/hal/include -I/home/leosum8/esp/esp-idf/components/esp_rom/include -I/home/leosum8/esp/esp-idf/components/esp_rom/include/esp32 -I/home/leosum8/esp/esp-idf/components/esp_rom/esp32 -I/home/leosum8/esp/esp-idf/components/esp_common/include -I/home/leosum8/esp/esp-idf/components/esp_system/include -I/home/leosum8/esp/esp-idf/components/esp_system/port/soc -I/home/leosum8/esp/esp-idf/components/esp_system/port/include/private -I/home/leosum8/esp/esp-idf/components/xtensa/esp32/include -I/home/leosum8/esp/esp-idf/components/xtensa/include -I/home/leosum8/esp/esp-idf/components/xtensa/deprecated_include -I/home/leosum8/esp/esp-idf/components/esp_timer/include -I/home/leosum8/esp/esp-idf/components/lwip/include -I/home/leosum8/esp/esp-idf/components/lwip/include/apps -I/home/leosum8/esp/esp-idf/components/lwip/include/apps/sntp -I/home/leosum8/esp/esp-idf/components/lwip/lwip/src/include -I/home/leosum8/esp/esp-idf/components/lwip/port/include -I/home/leosum8/esp/esp-idf/components/lwip/port/freertos/include -I/home/leosum8/esp/esp-idf/components/lwip/port/esp32xx/include -I/home/leosum8/esp/esp-idf/components/lwip/port/esp32xx/include/arch -I/home/leosum8/esp/esp-idf/components/lwip/port/esp32xx/include/sys -I/home/leosum8/cspot/cspot/targets/esp32/managed_components/espressif__mdns/include -I/home/leosum8/esp/esp-idf/components/console -I/home/leosum8/esp/esp-idf/components/vfs/include -I/home/leosum8/esp/esp-idf/components/esp_netif/include -I/home/leosum8/esp/esp-idf/components/esp_event/include -I/home/leosum8/esp/esp-idf/components/mbedtls/port/include -I/home/leosum8/esp/esp-idf/components/mbedtls/mbedtls/include -I/home/leosum8/esp/esp-idf/components/mbedtls/mbedtls/library -I/home/leosum8/esp/esp-idf/components/mbedtls/esp_crt_bundle/include -I/home/leosum8/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/everest/include -I/home/leosum8/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m -I/home/leosum8/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -I/home/leosum8/esp/esp-idf/components/pthread/include -I/home/leosum8/esp/esp-idf/components/driver/deprecated -I/home/leosum8/esp/esp-idf/components/driver/i2c/include -I/home/leosum8/esp/esp-idf/components/driver/touch_sensor/include -I/home/leosum8/esp/esp-idf/components/driver/twai/include -I/home/leosum8/esp/esp-idf/components/driver/usb_serial_jtag/include -I/home/leosum8/esp/esp-idf/components/driver/touch_sensor/esp32/include -I/home/leosum8/esp/esp-idf/components/esp_pm/include -I/home/leosum8/esp/esp-idf/components/esp_ringbuf/include -I/home/leosum8/esp/esp-idf/components/esp_driver_gpio/include -I/home/leosum8/esp/esp-idf/components/esp_driver_pcnt/include -I/home/leosum8/esp/esp-idf/components/esp_driver_gptimer/include -I/home/leosum8/esp/esp-idf/components/esp_driver_spi/include -I/home/leosum8/esp/esp-idf/components/esp_driver_mcpwm/include -I/home/leosum8/esp/esp-idf/components/esp_driver_ana_cmpr/include -I/home/leosum8/esp/esp-idf/components/esp_driver_i2s/include -I/home/leosum8/esp/esp-idf/components/esp_driver_sdmmc/include -I/home/leosum8/esp/esp-idf/components/sdmmc/include -I/home/leosum8/esp/esp-idf/components/esp_driver_sdspi/include -I/home/leosum8/esp/esp-idf/components/esp_driver_sdio/include -I/home/leosum8/esp/esp-idf/components/esp_driver_dac/include -I/home/leosum8/esp/esp-idf/components/esp_driver_rmt/include -I/home/leosum8/esp/esp-idf/components/esp_driver_tsens/include -I/home/leosum8/esp/esp-idf/components/esp_driver_sdm/include -I/home/leosum8/esp/esp-idf/components/esp_driver_i2c/include -I/home/leosum8/esp/esp-idf/components/esp_driver_uart/include -I/home/leosum8/esp/esp-idf/components/esp_driver_ledc/include -I/home/leosum8/esp/esp-idf/components/esp_driver_parlio/include -I/home/leosum8/cspot/cspot/cspot/bell/external/opencore-aacdec/src -I/home/leosum8/cspot/cspot/cspot/bell/external/opencore-aacdec/oscl -I/home/leosum8/cspot/cspot/cspot/bell/external/opencore-aacdec/include -I/home/leosum8/cspot/cspot/cspot/bell/external/opus/include -isystem /home/leosum8/cspot/cspot/cspot/bell/external/nanopb -isystem /home/leosum8/cspot/cspot/cspot/bell/external/libhelix-mp3 -isystem /home/leosum8/cspot/cspot/cspot/bell/external/tremor -isystem /home/leosum8/cspot/cspot/cspot/bell/external/cJSON -isystem /home/leosum8/cspot/cspot/cspot/bell/external/fmt/include -isystem /home/leosum8/cspot/cspot/cspot/bell/external/nlohmann_json/include -mlongcalls -Wno-frame-address -std=gnu++20 -fdiagnostics-color=always -Wunused-const-variable -Wchar-subscripts -Wunused-label -Wmaybe-uninitialized -Wmisleading-indentation -Wno-stringop-overflow -Wno-error=format -Wno-format -Wno-stringop-overread -Wno-stringop-overflow -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -Og -fno-shrink-wrap -fmacro-prefix-map=/home/leosum8/cspot/cspot/targets/esp32=. -fmacro-prefix-map=/home/leosum8/esp/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -fdiagnostics-color=always -std=gnu++2b -fexceptions -fno-rtti -MD -MT esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/BellHTTPServer.cpp.obj -MF esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/BellHTTPServer.cpp.obj.d -o esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/BellHTTPServer.cpp.obj -c /home/leosum8/cspot/cspot/cspot/bell/main/io/BellHTTPServer.cpp
In file included from /home/leosum8/cspot/cspot/cspot/bell/main/io/include/BellHTTPServer.h:15,
from /home/leosum8/cspot/cspot/cspot/bell/main/io/BellHTTPServer.cpp:1:
/home/leosum8/cspot/cspot/cspot/bell/external/civetweb/include/CivetServer.h:291:22: error: 'virtual void CivetWebSocketHandler::handleClose(CivetServer*, const mg_connection*)' was hidden [-Werror=overloaded-virtual=]
291 | virtual void handleClose(CivetServer *server,
| ^~~~~~~~~~~
/home/leosum8/cspot/cspot/cspot/bell/main/io/BellHTTPServer.cpp:50:16: note: by 'virtual void WebSocketHandler::handleClose(CivetServer*, mg_connection*)'
50 | virtual void handleClose(CivetServer* server, struct mg_connection* conn) {
| ^~~~~~~~~~~
cc1plus: some warnings being treated as errors
[1329/1672] Building CXX object esp-idf/main/cspot/CMakeFiles/cspot.dir/src/TrackQueue.cpp.obj
/home/leosum8/cspot/cspot/cspot/src/TrackQueue.cpp: In member function 'void cspot::QueuedTrack::stepParseMetadata(Track*, Episode*)':
/home/leosum8/cspot/cspot/cspot/src/TrackQueue.cpp:151:7: warning: unused variable 'alternativeCount' [-Wunused-variable]
151 | int alternativeCount, filesCount = 0;
| ^~~~~~~~~~~~~~~~
/home/leosum8/cspot/cspot/cspot/src/TrackQueue.cpp:152:8: warning: unused variable 'canPlay' [-Wunused-variable]
152 | bool canPlay = false;
| ^~~~~~~
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/leosum8/cspot/cspot/targets/esp32/build/log/idf_py_stderr_output_8386 and /home/leosum8/cspot/cspot/targets/esp32/build/log/idf_py_stdout_output_8386 Any ideas? |
Did you successfully download the dependencies?
My CMake files look like this:
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
# Don't override EXTRA_COMPONENT_DIRS as platformio uses it. Instead we append
# see https://github.com/platformio/platform-espressif32/issues/341
list(APPEND EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
# list(APPEND EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/led_strip)
if(NOT IDF_NO_INCLUDE)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
endif()
project(cspot-esp32)
cmake_minimum_required(VERSION 3.5)
# CMake options
set(CMAKE_CXX_STANDARD 17)
# Main target sources
file(GLOB SOURCES "*.cpp" "*.c")
# Configure the target
idf_component_register(
SRCS ${SOURCES}
INCLUDE_DIRS "."
REQUIRES led_strip mdns spiffs esp_wifi nvs_flash protocol_examples_common
)
idf_build_set_property(COMPILE_OPTIONS "-fdiagnostics-color=always" APPEND)
# Build static library, do not build test executables
option(BUILD_SHARED_LIBS OFF)
option(BUILD_TESTING OFF)
# Import cspot library
add_subdirectory("../../../cspot" ${CMAKE_CURRENT_BINARY_DIR}/cspot)
# Configure the target
target_link_libraries(${COMPONENT_LIB} PUBLIC cspot)
target_compile_options(${COMPONENT_LIB} PRIVATE -std=gnu++17) |
Hi, and thanks for answering! Thanks to your CMakeLists.txt files which I copied the pre-building errors during set-target command went away. However building still fails with the same error. I also tried starting from scratch. ...
[libprotobuf WARNING google/protobuf/compiler/parser.cc:646] No syntax specified for the proto file: protobuf/login5.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
/home/leosum8/cspot/cspot/targets/esp32/build/esp-idf/main/cspot/nanopb/generator/nanopb_generator.py:22: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources # pyinstaller / protobuf 2.5 seem to need these
[730/1672] Running C++ protocol buffer compiler using nanopb plugin on /home/leosum8/cspot/cspot/cspot/protobuf/spirc.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:646] No syntax specified for the proto file: protobuf/spirc.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
/home/leosum8/cspot/cspot/targets/esp32/build/esp-idf/main/cspot/nanopb/generator/nanopb_generator.py:22: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources # pyinstaller / protobuf 2.5 seem to need these
[1274/1672] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/EspPlayer.cpp.obj
/home/leosum8/cspot/cspot/targets/esp32/main/EspPlayer.cpp: In lambda function:
/home/leosum8/cspot/cspot/targets/esp32/main/EspPlayer.cpp:71:19: warning: unused variable 'volume' [-Wunused-variable]
71 | int volume = std::get<int>(event->data);
| ^~~~~~
[1276/1672] Building CXX object esp-idf/main/cspot/CMakeFiles/cspot.dir/src/MercurySession.cpp.obj
/home/leosum8/cspot/cspot/cspot/src/MercurySession.cpp: In member function 'cspot::MercurySession::Response cspot::MercurySession::decodeResponse(const std::vector<unsigned char>&)':
/home/leosum8/cspot/cspot/cspot/src/MercurySession.cpp:222:8: warning: unused variable 'sequenceLength' [-Wunused-variable]
222 | auto sequenceLength = ntohs(extract<uint16_t>(data, 0));
| ^~~~~~~~~~~~~~
/home/leosum8/cspot/cspot/cspot/src/MercurySession.cpp:225:8: warning: unused variable 'partsNumber' [-Wunused-variable]
225 | auto partsNumber = ntohs(extract<uint16_t>(data, 11));
| ^~~~~~~~~~~
[1277/1672] Building CXX object esp-idf/main/cspot/CMakeFiles/cspot.dir/src/AccessKeyFetcher.cpp.obj
/home/leosum8/cspot/cspot/cspot/src/AccessKeyFetcher.cpp: In member function 'void cspot::AccessKeyFetcher::updateAccessKey()':
/home/leosum8/cspot/cspot/cspot/src/AccessKeyFetcher.cpp:123:13: warning: unused variable 'expiresIn' [-Wunused-variable]
123 | int expiresIn = loginResponse.response.ok.access_token_expires_in / 2;
| ^~~~~~~~~
[1280/1672] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/main.cpp.obj
In file included from /home/leosum8/esp/esp-idf/components/driver/deprecated/driver/i2s.h:23,
from /home/leosum8/cspot/cspot/cspot/bell/main/audio-sinks/include/esp/adac.h:12,
from /home/leosum8/cspot/cspot/cspot/bell/main/audio-sinks/include/esp/AC101AudioSink.h:12,
from /home/leosum8/cspot/cspot/targets/esp32/main/main.cpp:44:
/home/leosum8/esp/esp-idf/components/driver/deprecated/driver/adc.h:19:2: warning: #warning "legacy adc driver is deprecated, please migrate to use esp_adc/adc_oneshot.h and esp_adc/adc_continuous.h for oneshot mode and continuous mode drivers respectively" [-Wcpp]
19 | #warning "legacy adc driver is deprecated, please migrate to use esp_adc/adc_oneshot.h and esp_adc/adc_continuous.h for oneshot mode and continuous mode drivers respectively"
| ^~~~~~~
/home/leosum8/esp/esp-idf/components/driver/deprecated/driver/i2s.h:27:2: warning: #warning "This set of I2S APIs has been deprecated, please include 'driver/i2s_std.h', 'driver/i2s_pdm.h' or 'driver/i2s_tdm.h' instead. if you want to keep using the old APIs and ignore this warning, you can enable 'Suppress leagcy driver deprecated warning' option under 'I2S Configuration' menu in Kconfig" [-Wcpp]
27 | #warning "This set of I2S APIs has been deprecated, \
| ^~~~~~~
[1294/1672] Building CXX object esp-idf/main/cspot/CMakeFiles/cspot.dir/src/TrackPlayer.cpp.obj
/home/leosum8/cspot/cspot/cspot/src/TrackPlayer.cpp: In member function 'virtual void cspot::TrackPlayer::runTask()':
/home/leosum8/cspot/cspot/cspot/src/TrackPlayer.cpp:192:15: warning: unused variable 'r' [-Wunused-variable]
192 | int32_t r =
| ^
[1301/1672] Building CXX object esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/BellMQTTClient.cpp.obj
/home/leosum8/cspot/cspot/cspot/bell/main/io/BellMQTTClient.cpp: In member function 'void bell::MQTTClient::connect(const std::string&, uint16_t, const std::string&, const std::string&)':
/home/leosum8/cspot/cspot/cspot/bell/main/io/BellMQTTClient.cpp:36:7: warning: unused variable 'status' [-Wunused-variable]
36 | int status = fcntl(socket.getFd(), F_SETFL,
| ^~~~~~
[1315/1672] Building CXX object esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/HTTPClient.cpp.obj
/home/leosum8/cspot/cspot/cspot/bell/main/io/HTTPClient.cpp: In member function 'void bell::HTTPClient::Response::readResponseHeaders()':
/home/leosum8/cspot/cspot/cspot/bell/main/io/HTTPClient.cpp:66:9: warning: unused variable 'method' [-Wunused-variable]
66 | char *method, *path;
| ^~~~~~
/home/leosum8/cspot/cspot/cspot/bell/main/io/HTTPClient.cpp:66:18: warning: unused variable 'path' [-Wunused-variable]
66 | char *method, *path;
| ^~~~
[1322/1672] Building CXX object esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/BellHTTPServer.cpp.obj
FAILED: esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/BellHTTPServer.cpp.obj
/home/leosum8/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ -DESP_PLATFORM -DFMT_HEADER_ONLY -DIDF_VER=\"v5.3-dev-1288-g5524b692ee\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DPB_ENABLE_MALLOC -DPB_FIELD_32BIT -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -DUSE_DEFAULT_STDLIB="1 -DTARGET_OS_IPHONE=0" -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/home/leosum8/cspot/cspot/targets/esp32/build/config -I/home/leosum8/cspot/cspot/cspot/bell/main/audio-codec/include -I/home/leosum8/cspot/cspot/cspot/bell/main/audio-dsp/include -I/home/leosum8/cspot/cspot/cspot/bell/main/audio-sinks/include -I/home/leosum8/cspot/cspot/cspot/bell/main/io/include -I/home/leosum8/cspot/cspot/cspot/bell/main/utilities/include -I/home/leosum8/cspot/cspot/cspot/bell/main/platform -I/home/leosum8/cspot/cspot/cspot/bell/external/mqtt/include -I/home/leosum8/cspot/cspot/cspot/bell/main/audio-containers/include -I/home/leosum8/cspot/cspot/cspot/bell/main/audio-sinks/include/esp -I/home/leosum8/cspot/cspot/cspot/bell/external/civetweb/include -I/home/leosum8/cspot/cspot/targets/esp32/build/esp-idf/main/cspot/bell -I/home/leosum8/esp/esp-idf/components/newlib/platform_include -I/home/leosum8/esp/esp-idf/components/freertos/config/include -I/home/leosum8/esp/esp-idf/components/freertos/config/include/freertos -I/home/leosum8/esp/esp-idf/components/freertos/config/xtensa/include -I/home/leosum8/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/home/leosum8/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/leosum8/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -I/home/leosum8/esp/esp-idf/components/freertos/esp_additions/include -I/home/leosum8/esp/esp-idf/components/esp_hw_support/include -I/home/leosum8/esp/esp-idf/components/esp_hw_support/include/soc -I/home/leosum8/esp/esp-idf/components/esp_hw_support/include/soc/esp32 -I/home/leosum8/esp/esp-idf/components/esp_hw_support/port/esp32/. -I/home/leosum8/esp/esp-idf/components/heap/include -I/home/leosum8/esp/esp-idf/components/log/include -I/home/leosum8/esp/esp-idf/components/soc/include -I/home/leosum8/esp/esp-idf/components/soc/esp32 -I/home/leosum8/esp/esp-idf/components/soc/esp32/include -I/home/leosum8/esp/esp-idf/components/hal/platform_port/include -I/home/leosum8/esp/esp-idf/components/hal/esp32/include -I/home/leosum8/esp/esp-idf/components/hal/include -I/home/leosum8/esp/esp-idf/components/esp_rom/include -I/home/leosum8/esp/esp-idf/components/esp_rom/include/esp32 -I/home/leosum8/esp/esp-idf/components/esp_rom/esp32 -I/home/leosum8/esp/esp-idf/components/esp_common/include -I/home/leosum8/esp/esp-idf/components/esp_system/include -I/home/leosum8/esp/esp-idf/components/esp_system/port/soc -I/home/leosum8/esp/esp-idf/components/esp_system/port/include/private -I/home/leosum8/esp/esp-idf/components/xtensa/esp32/include -I/home/leosum8/esp/esp-idf/components/xtensa/include -I/home/leosum8/esp/esp-idf/components/xtensa/deprecated_include -I/home/leosum8/esp/esp-idf/components/esp_timer/include -I/home/leosum8/esp/esp-idf/components/lwip/include -I/home/leosum8/esp/esp-idf/components/lwip/include/apps -I/home/leosum8/esp/esp-idf/components/lwip/include/apps/sntp -I/home/leosum8/esp/esp-idf/components/lwip/lwip/src/include -I/home/leosum8/esp/esp-idf/components/lwip/port/include -I/home/leosum8/esp/esp-idf/components/lwip/port/freertos/include -I/home/leosum8/esp/esp-idf/components/lwip/port/esp32xx/include -I/home/leosum8/esp/esp-idf/components/lwip/port/esp32xx/include/arch -I/home/leosum8/esp/esp-idf/components/lwip/port/esp32xx/include/sys -I/home/leosum8/cspot/cspot/targets/esp32/managed_components/espressif__mdns/include -I/home/leosum8/esp/esp-idf/components/console -I/home/leosum8/esp/esp-idf/components/vfs/include -I/home/leosum8/esp/esp-idf/components/esp_netif/include -I/home/leosum8/esp/esp-idf/components/esp_event/include -I/home/leosum8/esp/esp-idf/components/mbedtls/port/include -I/home/leosum8/esp/esp-idf/components/mbedtls/mbedtls/include -I/home/leosum8/esp/esp-idf/components/mbedtls/mbedtls/library -I/home/leosum8/esp/esp-idf/components/mbedtls/esp_crt_bundle/include -I/home/leosum8/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/everest/include -I/home/leosum8/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m -I/home/leosum8/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -I/home/leosum8/esp/esp-idf/components/pthread/include -I/home/leosum8/esp/esp-idf/components/driver/deprecated -I/home/leosum8/esp/esp-idf/components/driver/i2c/include -I/home/leosum8/esp/esp-idf/components/driver/touch_sensor/include -I/home/leosum8/esp/esp-idf/components/driver/twai/include -I/home/leosum8/esp/esp-idf/components/driver/usb_serial_jtag/include -I/home/leosum8/esp/esp-idf/components/driver/touch_sensor/esp32/include -I/home/leosum8/esp/esp-idf/components/esp_pm/include -I/home/leosum8/esp/esp-idf/components/esp_ringbuf/include -I/home/leosum8/esp/esp-idf/components/esp_driver_gpio/include -I/home/leosum8/esp/esp-idf/components/esp_driver_pcnt/include -I/home/leosum8/esp/esp-idf/components/esp_driver_gptimer/include -I/home/leosum8/esp/esp-idf/components/esp_driver_spi/include -I/home/leosum8/esp/esp-idf/components/esp_driver_mcpwm/include -I/home/leosum8/esp/esp-idf/components/esp_driver_ana_cmpr/include -I/home/leosum8/esp/esp-idf/components/esp_driver_i2s/include -I/home/leosum8/esp/esp-idf/components/esp_driver_sdmmc/include -I/home/leosum8/esp/esp-idf/components/sdmmc/include -I/home/leosum8/esp/esp-idf/components/esp_driver_sdspi/include -I/home/leosum8/esp/esp-idf/components/esp_driver_sdio/include -I/home/leosum8/esp/esp-idf/components/esp_driver_dac/include -I/home/leosum8/esp/esp-idf/components/esp_driver_rmt/include -I/home/leosum8/esp/esp-idf/components/esp_driver_tsens/include -I/home/leosum8/esp/esp-idf/components/esp_driver_sdm/include -I/home/leosum8/esp/esp-idf/components/esp_driver_i2c/include -I/home/leosum8/esp/esp-idf/components/esp_driver_uart/include -I/home/leosum8/esp/esp-idf/components/esp_driver_ledc/include -I/home/leosum8/esp/esp-idf/components/esp_driver_parlio/include -I/home/leosum8/cspot/cspot/cspot/bell/external/opencore-aacdec/src -I/home/leosum8/cspot/cspot/cspot/bell/external/opencore-aacdec/oscl -I/home/leosum8/cspot/cspot/cspot/bell/external/opencore-aacdec/include -I/home/leosum8/cspot/cspot/cspot/bell/external/opus/include -isystem /home/leosum8/cspot/cspot/cspot/bell/external/nanopb -isystem /home/leosum8/cspot/cspot/cspot/bell/external/libhelix-mp3 -isystem /home/leosum8/cspot/cspot/cspot/bell/external/tremor -isystem /home/leosum8/cspot/cspot/cspot/bell/external/cJSON -isystem /home/leosum8/cspot/cspot/cspot/bell/external/fmt/include -isystem /home/leosum8/cspot/cspot/cspot/bell/external/nlohmann_json/include -mlongcalls -Wno-frame-address -std=gnu++20 -fdiagnostics-color=always -Wunused-const-variable -Wchar-subscripts -Wunused-label -Wmaybe-uninitialized -Wmisleading-indentation -Wno-stringop-overflow -Wno-error=format -Wno-format -Wno-stringop-overread -Wno-stringop-overflow -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -Og -fno-shrink-wrap -fmacro-prefix-map=/home/leosum8/cspot/cspot/targets/esp32=. -fmacro-prefix-map=/home/leosum8/esp/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -fdiagnostics-color=always -std=gnu++2b -fexceptions -fno-rtti -MD -MT esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/BellHTTPServer.cpp.obj -MF esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/BellHTTPServer.cpp.obj.d -o esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/io/BellHTTPServer.cpp.obj -c /home/leosum8/cspot/cspot/cspot/bell/main/io/BellHTTPServer.cpp
In file included from /home/leosum8/cspot/cspot/cspot/bell/main/io/include/BellHTTPServer.h:15,
from /home/leosum8/cspot/cspot/cspot/bell/main/io/BellHTTPServer.cpp:1:
/home/leosum8/cspot/cspot/cspot/bell/external/civetweb/include/CivetServer.h:291:22: error: 'virtual void CivetWebSocketHandler::handleClose(CivetServer*, const mg_connection*)' was hidden [-Werror=overloaded-virtual=]
291 | virtual void handleClose(CivetServer *server,
| ^~~~~~~~~~~
/home/leosum8/cspot/cspot/cspot/bell/main/io/BellHTTPServer.cpp:50:16: note: by 'virtual void WebSocketHandler::handleClose(CivetServer*, mg_connection*)'
50 | virtual void handleClose(CivetServer* server, struct mg_connection* conn) {
| ^~~~~~~~~~~
cc1plus: some warnings being treated as errors
[1326/1672] Building CXX object esp-idf/main/cspot/bell/CMakeFiles/bell.dir/main/utilities/NanoPBHelper.cpp.obj
/home/leosum8/cspot/cspot/cspot/bell/main/utilities/NanoPBHelper.cpp: In function 'bool vectorWrite(pb_ostream_t*, const pb_byte_t*, size_t)':
/home/leosum8/cspot/cspot/cspot/bell/main/utilities/NanoPBHelper.cpp:12:10: warning: unused variable 'i' [-Wunused-variable]
12 | size_t i;
| ^
[1331/1672] Building CXX object esp-idf/main/cspot/CMakeFiles/cspot.dir/src/TrackQueue.cpp.obj
/home/leosum8/cspot/cspot/cspot/src/TrackQueue.cpp: In member function 'void cspot::QueuedTrack::stepParseMetadata(Track*, Episode*)':
/home/leosum8/cspot/cspot/cspot/src/TrackQueue.cpp:151:7: warning: unused variable 'alternativeCount' [-Wunused-variable]
151 | int alternativeCount, filesCount = 0;
| ^~~~~~~~~~~~~~~~
/home/leosum8/cspot/cspot/cspot/src/TrackQueue.cpp:152:8: warning: unused variable 'canPlay' [-Wunused-variable]
152 | bool canPlay = false;
| ^~~~~~~
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/leosum8/cspot/cspot/targets/esp32/build/log/idf_py_stderr_output_40092 and /home/leosum8/cspot/cspot/targets/esp32/build/log/idf_py_stdout_output_40092
|
If you have installed all the dependencies, and have done a full-clean too, there's the possibility, that you'll have to delete the existing build folder in targets/esp32. Otherwise, there should be a CMakeLog- and CMakeError file in the Build folder, that could help further. |
I verified this working with sound output, but all of a sudden Spotify cannot connect to the ESP32 anymore. Here is the output from the monitor, Spotify just gets stuck to connecting. Tried with desktop app and iOS app.
|
And now it is connecting successfully again. Very mysterious. Edit: it seems that Spotify might have had some sort of an outage. |
An update on the build after I've been using it for a while. It seems to be running a bit unstable at the moment. If I pause a track and then play another, most of the time the player stops working a this point and every request after results in the following line in the monitor: Sometimes this also happens mid-song and the song just stops playing. After this has happened, the player stops responding to any commands. Here is the whole output before getting unresponsive. Any ideas what the cause might be? I am using the PCM5102 audiosink.
|
Sorry for not responding for so long. |
So.. I haven't tested it properly, I just made a serial output of the pcm-stream. |
Thanks! I'll try the newest commit in the coming days and report back. |
I did some testing with commit 050cb32. For sure it works much more stable now, but is still stopping playback after three songs every time. Sometimes earlier than this. But good thing is that I can always resume playing through Spotify without rebooting the ESP. Another thing that was introduced with these changes is that the Spotify UI does not update anymore after the first song has stopped playing. It works fine until then, but any of the subsequent songs do not update to the now playing status. I'll check tomorrow what messages show up in the monitor. |
It seems that the player is not getting info on further tracks, it just stops playing after three tracks even though I would be listening to an album with more tracks. Here is the output at point of stopping:
I also got a crash in the middle of a track with this output, although this might have been my own additions to the main.cpp. I'll investigate.
|
I'm so sorry, i was redoing a lot of the cspot structure and made some mistakes. my current build (master or EventManager-branch) should run stable and with no stop for quite some time. it's still messy, but currently @feelfreelinux is looking over the build. |
Thanks for the update, for some reason it is still playing only three tracks at a time. However, it seems to be very stable, I got just one random crash which I think has something to do with the task size or the buffer size. I'll try playing with those values. Thanks a lot for your efforts! Edit: On further listening, I started getting the same crash repeatedly, here is the trace. Maybe it has something to do with the bell task size.
|
I'm sorry, i hope you haven't tried too much already. I had missunderstood the preloadedTracks structure, and misswrote some lines. |
So.. i've ported my build to espidf v5.3. With 5.1 it had a build error, so be carefull to use the latest espidf. Because of some issues with mbedtls, i had to change quite a lot in cspot/bell. So be sure, to update the submodules after porting to the newest commit. |
Hi!
I've been trying to build the master branch with IDF 4.4 and 5.0 but both fail with varying error messages. Before starting a more in-depth research on the error messages, is there a recommendation on which version of the IDF to use?
Furthermore, has anyone succesfully compiled the master branch on ESP32?
The text was updated successfully, but these errors were encountered: