I am working on a system with both Peripheral and Central devices. I am close to having implemented all required functionality and have used the simpleBLECentral and simpleBLEPeripheral examples as a basis.
I have recently hit the available memory limit for the CC2540 on the peripheral side. I have not changed the OSAL heap size and my application allocates all arrays and large data structures using osal_mem_alloc() to minimize usage of memory outside the heap. My application does not have excessive memory use outside the heap.
It appears the BLE stack, particularly the link layer uses a fair chunk of memory outside the heap no doubt for link buffers etc.
Two questions arise:
1. What are the consequences of reducing the heap size by say a few hundred bytes.
2. Which variables in the project settings and within the code itself need to be changed? Should all of the Far:, Far22 and Huge values be changed from 0xFFF to a smaller value?
Thanks