pschatzmann / ESP32-A2DP

A Simple ESP32 Bluetooth A2DP Library (to implement a Music Receiver or Sender) that supports Arduino, PlatformIO and Espressif IDF
Apache License 2.0
1.65k stars 270 forks source link

Compilation error: text section exceeds available space in board #575

Closed Sskki-exe closed 3 months ago

Sskki-exe commented 3 months ago

Problem Description

I'm trying to get the examples/bt_music_receiver_with_metadata/bt_music_receiver_with_metadata.ino to run on an ESP32 but the IDE throws an error saying it takes up too much space.

Sketch uses 1884069 bytes (143%) of program storage space. Maximum is 1310720 bytes.
Global variables use 61828 bytes (18%) of dynamic memory, leaving 265852 bytes for local variables. Maximum is 327680 bytes.
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
text section exceeds available space in board

Compilation error: text section exceeds available space in board

Is this to be expected and there's no way to put it on the ESP32? Or is there a way to streamline the code to make it fit on the board? Or is there a way to use an SD card to expand the storage space to fit it all in?

Device Description

ESP32-2432S028 It's an ESP32 with attached TFT display. It also has an micro sd card slot. Using the Esp32 Board library 3.0.1 by Espressif

Sketch

ESP32examples/bt_music_receiver_with_metadata/bt_music_receiver_with_metadata.ino

I also get the same error (except it takes up 1% less space) for this sketch too:

#include "AudioTools.h"
#include "BluetoothA2DPSink.h"

I2SStream i2s;
BluetoothA2DPSink a2dp_sink(i2s);

void setup() {
    a2dp_sink.start("MyMusic");
}

void loop() {
}

Other Steps to Reproduce

No response

Provide your Version of the EP32 Arduino Core (or the IDF Version)

3.0.1

I have checked existing issues, discussions and online documentation

pschatzmann commented 3 months ago

I am starting to get upset that I have to answer the same question over and over and over again! What is so hard in looking up the prior answers ? or reading the documentation ?