pschatzmann / arduino-audio-tools

Arduino Audio Tools (a powerful Audio library not only for Arduino)
GNU General Public License v3.0
1.54k stars 237 forks source link

"missing initializer for member" warning on ESP32, espidf, platformio #1430

Closed codegrue closed 8 months ago

codegrue commented 8 months ago

Problem Description

Compiling on platformio with espidf, this library generates hundreds of these warnings:

.pio/libdeps/project/audio-tools/src/AudioI2S/I2SESP32.h:183:7: warning: missing initializer for member 'i2s_driver_config_t::total_chan' [-Wmissing-field-initializers]

Device Description

ESP32 development board

Sketch

just including the library in any project causes this at compile time

platformio.ini:

[env]
framework = arduino, espidf
platform = espressif32

Other Steps to Reproduce

No response

What is your development environment

VSCode/Platformio, Windows

I have checked existing issues, discussions and online documentation

pschatzmann commented 8 months ago

Please read the documentation in the Wiki and at least indicate why you don't follow the instructions. It would also help if you provide ESP32 Arduino core version that is pulled by your installation: 2.0.14 would be the most recent version!

codegrue commented 8 months ago

I'm not sure what part of the wiki you were alluding to, but I reviewed it again and inferred this, which seems to have solved the warnings:

build_flags = -Wno-missing-field-initializers

pschatzmann commented 8 months ago

There is a chapter for PlatfomIO: https://github.com/pschatzmann/arduino-audio-tools/wiki/Working-with-PlatformIO

I can't reproduce your issue and I am getting the following version info:

PLATFORM: Espressif 32 (6.5.0+sha.0f5033b) > 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.20014.231204 (2.0.14) 
 - 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
Found 34 compatible libraries
Scanning dependencies...
Dependency Graph
|-- audio-tools @ 0.9.6+sha.b8acbc5
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
esptool.py v4.5.1