Page 1 of 1

Large project crashes when including Bluetooth (memory resources short?)

Posted: Tue Mar 16, 2021 10:25 am
by timm_f
Hello,

our project is rather larger.
It includes BT and WiFi and external SPI-RAM.

At this point (after adding a lot of code) it crashes after the bootloader (with Bluetooth included in Firmware).
When removing Bluetooth, everything works as expected.
Our Bluetooth driver code itself is working correctly.

Static internal sram usage of the firmware binary is: dram=70.7% iram=86.5%

Does anyone have inputs on these matters? Any suggestion / hint would be greatly appreciated:

- memory resources short when using bluetooth?
- further analyzation methods?
- ...

BR Timm

Re: Large project crashes when including Bluetooth (memory resources short?)

Posted: Tue Mar 16, 2021 1:56 pm
by StevePeake
Have you checked your partition table is suitable for the app with Bluetooth installed?

I've only recently added BLE libraries to my project, and it has pushed the file size over 1MB. I was using the FACTORY/OTA_0/OTA_1 partition table (3x1MB partitions) which caused problems. I can't remember if it was a crash at boot time though.

Re: Large project crashes when including Bluetooth (memory resources short?)

Posted: Tue Mar 16, 2021 2:29 pm
by timm_f
StevePeake wrote:
Tue Mar 16, 2021 1:56 pm
Have you checked your partition table is suitable for the app with Bluetooth installed?
Hi Steve,
thanks for your reply. Yes, I have already increased te app partition size. The firmware image fits in.
It appears to be a problem with ram resources being short.

It also isn't connected to Bluetooth. I removed another module (httpd) and added bluetooth again.
Same behaviour: crashes directly after bootloader.

Re: Large project crashes when including Bluetooth (memory resources short?)

Posted: Wed Mar 17, 2021 2:27 am
by ESP_Sprite
Posting the logs leading up to the crash, the crash dump as well as a backtrace would help.