Not enough memory for BLE and A2DP?

User avatar
Micrified
Posts: 8
Joined: Thu Aug 29, 2019 1:26 pm

Not enough memory for BLE and A2DP?

Postby Micrified » Sat Oct 12, 2019 2:40 pm

My project currently has my ESP32-WROOM-32 performing the following tasks for me:
  • Acting as a WiFi station/client
  • Running BLE so that I may communicate to it using a mobile application I made
I wanted to enable Bluetooth Classic A2DP so that I could port over the music streaming example. However, after enabling dual mode in MenuConfig I realized I can't flash to the ESP32 anymore:

Code: Select all

E (585) esp_image: Image length 1166704 doesn't fit in partition length 1048576
E (585) boot: Factory app partition is not bootable
E (587) boot: No bootable app partitions in the partition table
Unfortunately it seems my project already is using quite a bit of memory. Without A2DP I have the following image size:

Code: Select all

Wrote 995632 bytes (639189 compressed) at 0x00010000 in 14.7 seconds (effective 543.0 kbit/s)...
Hash of data verified.
Is there anything I can do to get all three working on the ESP32? I'm not sure if there is anything I can disable in MenuConfig or remove that would save me space. I would really like all three to work (ideally).

Does anyone have any advice or examples where this is done? Is there a way to easily remove WiFi using Menuconfig (I only saw a switch for LwIP). I don't want to remove it but I would still like to know how.

Thanks in advanced! ;)
Micrified (Netherlands)

chegewara
Posts: 815
Joined: Wed Jun 14, 2017 9:00 pm

Re: Not enough memory for BLE and A2DP?

Postby chegewara » Sat Oct 12, 2019 5:27 pm

Use custom partitions in menuconfig.

User avatar
Micrified
Posts: 8
Joined: Thu Aug 29, 2019 1:26 pm

Re: Not enough memory for BLE and A2DP?

Postby Micrified » Sat Oct 12, 2019 6:12 pm

Thanks for answering!!

Can you elaborate a bit more on how that works? Is there an example somewhere?

EDIT: Found this searching https://docs.espressif.com/projects/esp ... ables.html, I'll try it and get back
Micrified (Netherlands)

User avatar
Micrified
Posts: 8
Joined: Thu Aug 29, 2019 1:26 pm

Re: Not enough memory for BLE and A2DP?

Postby Micrified » Sat Oct 12, 2019 8:59 pm

Okay so by following the ESP guide for partitions I was able to successfully increase it such that my application fits.

Thank you for mentioning the partitions. I didn't know about them! ;)

I should let you know that the command

Code: Select all

idf.py partition_table
Does not actually show me my partition. I had to look at some stuff printed when invoking flash and monitor to understand what it looked like. The guide told me that running that would also show me my table (but it didn't). FYI I'm running ESP-IDF V4.0.
Micrified (Netherlands)

Who is online

Users browsing this forum: No registered users and 16 guests