Heap space
Posted: Fri Jan 20, 2017 10:19 am
Hello all,
I'm trying to combine wifi, ble, openssl and a library that needs a tls connection.
Everything works fine without ble enabled.
With ble enabled I don't have enough heap space to create a ssl object.
I figure from calling a few esp_get_free_heap_size() that my program + the ssl connection uses about 55kb.
Wifi uses about ~40kB, Ble also uses about ~40kB.
I end up with 20kB free heap space, which is about 10~20kB short of what I need.
I only use ble for scanning advertisements, so I was thinking I might cut some of the bt functionality. Maybe cut some of the stack size.
My question is what is the easiest way to create some heap space?
What can I cut in Ble, i'm looking at the "bt/bluedroid/include/bt_target.h" which enables some functionality if i'm not mistaken.
"bt/bluedroid/osi/include/thread.h" defines the stack size for btu,btc,hci_host and hci_h4. Don't really have a clue what btc and btu do, any documentation?
Can I move stuff to the flash? if so how?
I'd love some suggestions. trial and error is so slow.
Thanks!
I'm trying to combine wifi, ble, openssl and a library that needs a tls connection.
Everything works fine without ble enabled.
With ble enabled I don't have enough heap space to create a ssl object.
I figure from calling a few esp_get_free_heap_size() that my program + the ssl connection uses about 55kb.
Wifi uses about ~40kB, Ble also uses about ~40kB.
I end up with 20kB free heap space, which is about 10~20kB short of what I need.
I only use ble for scanning advertisements, so I was thinking I might cut some of the bt functionality. Maybe cut some of the stack size.
My question is what is the easiest way to create some heap space?
What can I cut in Ble, i'm looking at the "bt/bluedroid/include/bt_target.h" which enables some functionality if i'm not mistaken.
"bt/bluedroid/osi/include/thread.h" defines the stack size for btu,btc,hci_host and hci_h4. Don't really have a clue what btc and btu do, any documentation?
Can I move stuff to the flash? if so how?
I'd love some suggestions. trial and error is so slow.
Thanks!