Romkabouter / ESP32-Rhasspy-Satellite

The repo has implementing an esp32 standalone MQTT audio streamer. Is is desinged to work as a satellite for Rhasspy (https://rhasspy.readthedocs.io/en/latest/). It supports multiple devices
GNU General Public License v3.0
356 stars 64 forks source link

Issue with build #105

Closed tstill88 closed 2 years ago

tstill88 commented 2 years ago

Its my first time using VSCode / Platform io to work with ESP so maybe im missing some basic knowledge.

Im getting the following error when i try to build to the code:

Processing esp32dev (platform: espressif32; 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 (5.1.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:


Environment Status Duration


esp32dev FAILED 00:00:13.113 ==================================================================================== 1 failed, 0 succeeded in 00:00:13.113 ====================================================================================

tstill88 commented 2 years ago

Think i may have moved past that error but now i have this:

Processing esp32dev (platform: espressif32; 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 (5.1.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:

Environment Status Duration


esp32dev FAILED 00:00:40.121 ==================================================================================== 1 failed, 0 succeeded in 00:00:40.121 ====================================================================================

Romkabouter commented 2 years ago

Check this issue:

https://github.com/Romkabouter/ESP32-Rhasspy-Satellite/issues/104

tstill88 commented 2 years ago

I did see that, but i noticed it was back to 6.19.4 again. Ive changed back to 6.19.3 now and unfortunately get another error.

Hopefully getting close to having this working now. Appreciate the help!

PS C:\Users\tstil\OneDrive\Documents\ESP32-Rhasspy-Satellite-7.8.3\PlatformIO> pio run --target upload Processing esp32dev (platform: espressif32; 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 (5.1.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:


Environment Status Duration


esp32dev FAILED 00:00:22.224 ==================================================================================== 1 failed, 0 succeeded in 00:00:22.224 ==================================================================================== PS C:\Users\tstil\OneDrive\Documents\ESP32-Rhasspy-Satellite-7.8.3\PlatformIO> `

Romkabouter commented 2 years ago

This is the same you had before right? It apparently cannot find the M5Atom lib. It should be downloaded, but since you are on windows I not sure if that works. You can always install it manually

tstill88 commented 2 years ago

Yeah thats right. Where does that library need to be installed? Does it need to be in the PlatformIO source folder with the rest of the files?

I can see in the platformio.ini file under lib_deps i have this:

lib_deps = https://github.com/matrix-io/matrixio_hal_esp32.git https://github.com/marvinroger/async-mqtt-client.git https://github.com/me-no-dev/AsyncTCP.git https://github.com/knolleary/pubsubclient.git https://github.com/bblanchon/ArduinoJson.git ESP Async WebServer m5stack/M5Atom fastled/FastLED yveaux/AC101 @ ^0.0.1 celliesprojects/wm8978-esp32 makuna/NeoPixelBus

Sorry for what are just user related problems here!

Romkabouter commented 2 years ago

This is the location on my Mac:

image
tstill88 commented 2 years ago

Yeah that must be it. When i go into PIO and Libraries to add ArduinoJSON 19.6.3 it asks me to pick which project to install it in, and at that point it wipes out all of the other libraries in the esp32dev folder leaving only ArduinoJSON.

If you have any thoughts im all ears otherwise you can probably close this and il try and figure it out. Im all good with ArduinoIDE but never used VSCode / PIO before :) Thanks for your help so far!

tstill88 commented 2 years ago

Ok, i thought i had it fixed. Ive manually installed all of the libraries this time

Seems to be an issue with the WM8978 library i guess? It is installed though

Compiling .pio\build\esp32dev\libe7e\M5Atom\utility\Button.cpp.o In file included from src/Satellite.cpp:146: src/devices/M5AtomEcho.hpp: In member function 'void M5AtomEcho::InitI2SSpeakerOrMic(int)': src/devices/M5AtomEcho.hpp:122:33: warning: 'I2S_COMM_FORMAT_I2S' is deprecated [-Wdeprecated-declarations] Archiving .pio\build\esp32dev\lib3ed\libWire.a .communication_format = I2S_COMM_FORMAT_I2S, ^~~~~~~~~~~~~~~~~~Compiling .pio\build\esp32dev\libe7e\M5Atom\utility\LED_DisPlay.cpp.o ~ In file included from C:/Users/tstil/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/driver/include/driver/i2s.h:16, from src/devices/M5AtomEcho.hpp:6, from src/Satellite.cpp:146: C:/Users/tstil/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/hal/include/hal/i2s_types.h:87:5: note: declared here I2S_COMM_FORMAT_I2S __attribute__((deprecated)) = 0x01, /*!< I2S communication format I2S, correspond toI2S_COMM_FORMAT_STAND_I2S`*/ ^~~~~~~ Compiling .pio\build\esp32dev\libe7e\M5Atom\utility\M5Timer.cpp.o Compiling .pio\build\esp32dev\libe7e\M5Atom\utility\MPU6886.cpp.o In file included from .pio/libdeps/esp32dev/FastLED/src/FastLED.h:67, from .pio/libdeps/esp32dev/M5Atom/src/utility/LED_DisPlay.h:4, from .pio/libdeps/esp32dev/M5Atom/src/utility/LED_DisPlay.cpp:1: .pio/libdeps/esp32dev/FastLED/src/fastspi.h:145:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Compiling .pio\build\esp32dev\libe7e\M5Atom\utility\MahonyAHRS.cpp.o

Compiling .pio\build\esp32dev\libfe6\I2S\I2S.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\Esp32_i2s.c.o Archiving .pio\build\esp32dev\libe7e\libM5Atom.a Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\HsbColor.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\HslColor.cpp.o Archiving .pio\build\esp32dev\libfe6\libI2S.a Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\HtmlColor.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\HtmlColorNameStrings.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\HtmlColorNames.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\HtmlColorShortNames.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\NeoEsp32RmtMethod.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\NeoEsp8266I2sMethodCore.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\NeoEsp8266UartMethod.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\NeoEspBitBangMethod.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\NeoGamma.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\NeoPixelAnimator.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\NeoPixelAvr.c.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\Rgb48Color.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\RgbColor.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\RgbColorBase.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\Rgbw64Color.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\RgbwColor.cpp.o Compiling .pio\build\esp32dev\lib190\NeoPixelBus\internal\SegmentDigit.cpp.o Compiling .pio\build\esp32dev\liba3a\AsyncTCP\AsyncTCP.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\ConnAckPacket.cpp.o Archiving .pio\build\esp32dev\lib190\libNeoPixelBus.a Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\Out\Connect.cpp.o Archiving .pio\build\esp32dev\liba3a\libAsyncTCP.a Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\Out\Disconn.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\Out\OutPacket.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\Out\PingReq.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\Out\PubAck.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\Out\Publish.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\Out\Subscribe.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\Out\Unsubscribe.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\PingRespPacket.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\PubAckPacket.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\PubCompPacket.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\PubRecPacket.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\PubRelPacket.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\PublishPacket.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\SubAckPacket.cpp.o Compiling .pio\build\esp32dev\lib3e6\AsyncMqttClient\AsyncMqttClient\Packets\UnsubAckPacket.cpp.o Compiling .pio\build\esp32dev\lib002\PubSubClient\PubSubClient.cpp.o Archiving .pio\build\esp32dev\lib3e6\libAsyncMqttClient.a Compiling .pio\build\esp32dev\libc5e\AC101\AC101.cpp.o Compiling .pio\build\esp32dev\lib720\FS\FS.cpp.o Compiling .pio\build\esp32dev\lib720\FS\vfs_api.cpp.o Archiving .pio\build\esp32dev\lib002\libPubSubClient.a Compiling .pio\build\esp32dev\libf82\WiFi\WiFi.cpp.o Archiving .pio\build\esp32dev\libc5e\libAC101.a Compiling .pio\build\esp32dev\libf82\WiFi\WiFiAP.cpp.o Compiling .pio\build\esp32dev\libf82\WiFi\WiFiClient.cpp.o Archiving .pio\build\esp32dev\lib720\libFS.a Compiling .pio\build\esp32dev\libf82\WiFi\WiFiGeneric.cpp.o Compiling .pio\build\esp32dev\libf82\WiFi\WiFiMulti.cpp.o Compiling .pio\build\esp32dev\libf82\WiFi\WiFiSTA.cpp.o Compiling .pio\build\esp32dev\libf82\WiFi\WiFiScan.cpp.o Compiling .pio\build\esp32dev\libf82\WiFi\WiFiServer.cpp.o Compiling .pio\build\esp32dev\libf82\WiFi\WiFiUdp.cpp.o Compiling .pio\build\esp32dev\lib5f8\ESP Async WebServer\AsyncEventSource.cpp.o Compiling .pio\build\esp32dev\lib5f8\ESP Async WebServer\AsyncWebSocket.cpp.o Compiling .pio\build\esp32dev\lib5f8\ESP Async WebServer\SPIFFSEditor.cpp.o Archiving .pio\build\esp32dev\libf82\libWiFi.a Compiling .pio\build\esp32dev\lib5f8\ESP Async WebServer\WebAuthentication.cpp.o Compiling .pio\build\esp32dev\lib5f8\ESP Async WebServer\WebHandlers.cpp.o Compiling .pio\build\esp32dev\lib5f8\ESP Async WebServer\WebRequest.cpp.o Compiling .pio\build\esp32dev\lib5f8\ESP Async WebServer\WebResponses.cpp.o Compiling .pio\build\esp32dev\lib5f8\ESP Async WebServer\WebServer.cpp.o Compiling .pio\build\esp32dev\libe58\MATRIXVoiceESP32HAL\everloop.cpp.o Compiling .pio\build\esp32dev\libe58\MATRIXVoiceESP32HAL\matrix_driver.cpp.o Compiling .pio\build\esp32dev\libe58\MATRIXVoiceESP32HAL\microphone_array.cpp.o Compiling .pio\build\esp32dev\libe58\MATRIXVoiceESP32HAL\microphone_core.cpp.o Compiling .pio\build\esp32dev\libe58\MATRIXVoiceESP32HAL\wishbone_bus.cpp.o Compiling .pio\build\esp32dev\lib5dc\wm8978-esp32@1.0.3\WM8978.cpp.o Archiving .pio\build\esp32dev\lib5f8\libESP Async WebServer.a Compiling .pio\build\esp32dev\lib6b0\Update\HttpsOTAUpdate.cpp.o Compiling .pio\build\esp32dev\lib6b0\Update\Updater.cpp.o Archiving .pio\build\esp32dev\libe58\libMATRIXVoiceESP32HAL.a In file included from C:/Users/tstil/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:76, from C:/Users/tstil/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:36, from .pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp:2: .pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp: In member function 'bool WM8978::begin()': .pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp:308:14: error: 'TAG' was not declared in this scope ESP_LOGE(TAG, "No WM8978 dac @ i2c address: 0x%X", WM8978_ADDR); Compiling .pio\build\esp32dev\lib282\ESPmDNS\ESPmDNS.cpp.o ^~~ C:/Users/tstil/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-log.h:159:72: note: in definition of macro 'log_e'

define log_e(format, ...) log_printf(ARDUHAL_LOG_FORMAT(E, format), ##__VA_ARGS__)

                                                                    ^~~~~~~~~~~

.pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp:308:5: note: in expansion of macro 'ESP_LOGE' ESP_LOGE(TAG, "No WM8978 dac @ i2c address: 0x%X", WM8978_ADDR); ^~~~ .pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp:313:14: error: 'TAG' was not declared in this scope ESP_LOGE(TAG, "WM8978 init err: 0x%X", err); ^~~ C:/Users/tstil/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-log.h:159:72: note: in definition of macro 'log_e'

define log_e(format, ...) log_printf(ARDUHAL_LOG_FORMAT(E, format), ##__VA_ARGS__)

                                                                    ^~~~~~~~~~~

.pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp:313:5: note: in expansion of macro 'ESP_LOGE' ESP_LOGE(TAG, "WM8978 init err: 0x%X", err); ^~~~ .pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp: In member function 'bool WM8978::begin(uint8_t, uint8_t, uint32_t)': .pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp:336:38: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: if (!Wire.begin(sda, scl, frequency)) { ^ In file included from .pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp:3: C:/Users/tstil/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:79:10: note: candidate 1: 'bool TwoWire::begin(int, int, uint32_t)' bool begin(int sda=-1, int scl=-1, uint32_t frequency=0); // returns true, if successful init of i2c bus ^~~~~ C:/Users/tstil/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:80:10: note: candidate 2: 'bool TwoWire::begin(uint8_t, int, int, uint32_t)' bool begin(uint8_t slaveAddr, int sda=-1, int scl=-1, uint32_t frequency=0); ^~~~~ In file included from C:/Users/tstil/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:76, from C:/Users/tstil/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:36, from .pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp:2: .pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp:337:14: error: 'TAG' was not declared in this scope ESP_LOGE(TAG, "Wire setup error sda=%i scl=%i frequency=%i", sda, scl, frequency); ^~~ C:/Users/tstil/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-log.h:159:72: note: in definition of macro 'log_e'

define log_e(format, ...) log_printf(ARDUHAL_LOG_FORMAT(E, format), ##__VA_ARGS__)

                                                                    ^~~~~~~~~~~

.pio/libdeps/esp32dev/wm8978-esp32@1.0.3/src/WM8978.cpp:337:5: note: in expansion of macro 'ESP_LOGE' ESP_LOGE(TAG, "Wire setup error sda=%i scl=%i frequency=%i", sda, scl, frequency); ^~~~ *** [.pio\build\esp32dev\lib5dc\wm8978-esp32@1.0.3\WM8978.cpp.o] Error 1 ========================================================================================= [FAILED] Took 215.32 seconds ========================================================================================= Environment Status Duration


esp32dev FAILED 00:03:35.325`

Romkabouter commented 2 years ago

I do not know which device you want to build, but you can remove these lib_deps.

https://github.com/matrix-io/matrixio_hal_esp32.git m5stack/M5Atom fastled/FastLED yveaux/AC101 @ ^0.0.1 celliesprojects/wm8978-esp32 makuna/NeoPixelBus

All of those are device specific, so just keeps the ones your device needs. I do not have windows, so I cannot reproduce this

tstill88 commented 2 years ago

Im building for an M5 Atom Echo.

Im wondering if im getting confused on the library locations? I was copying your photo above within the esp32dev folder, but since im using the M5Atom should it be under that? I see there is another ArduinoJson folder in there, and i dont know if both are being updated to 6.19.3 when i add it to the project folder.

At the moment im only trying to build the code, ive noticed after i deleted the AC101 folder from the esp32dev folder, it reappears when i hit build.

Thanks for your patience....

tstill88 commented 2 years ago

image

Should i be removing all the folders apart from the M5Atmoecho folder?

Romkabouter commented 2 years ago

Should i be removing all the folders apart from the M5Atmoecho folder?

First remove these from the libs_deps in platformio.ini

https://github.com/matrix-io/matrixio_hal_esp32.git fastled/FastLED yveaux/AC101 @ ^0.0.1 celliesprojects/wm8978-esp32 makuna/NeoPixelBus

And then remove the folders, otherwise they will be downloaded again.

tstill88 commented 2 years ago

Success! It was due to the extra libraries. Ive kept FastLED as it wants that but removing the other libraries from the esp32dev and m5athom folder has let me compile the code.

A small victory as now i have to learn Rhasspy, but thanks for your help!