TI中文支持网
TI专业的中文技术问题搜集分享网站

CC2640 ICall_malloc

实际使用过程中,发现调用ICall_malloc函数返回NULL,也就是内存分配失败。

我们想通过扩大heap来解决,

请问heap size在哪里调整呢?

感谢!

Alvin Chen:

请看:
www.ti.com/…/swru393e.pdf

Software Developer’s Guide For BLE-Stack.中的2.8 Accessing Preprocessor Symbols和9.6.1 Determining the Auto Heap Size和Determining the Auto Heap Size
The following procedure can be used to view the size of the ICall heap when the auto heap size feature is
enabled (HEAPMGR_SIZE=0).
At runtime, view the value of the global memory symbol HEAPMGR_SIZE after ICall_init() has been
executed in main(). The value of HEAPMGR_SIZE is the total size of the ICall heap. See
HEAPMGR_INIT() in heapmgr.h for the source code implementation.
In IAR: View -> Watch -> Watch 1, add HEAPMGR_SIZE
In CCS Debug Session: View -> Expressions, add HEAPMGR_SIZE

此外可以适当的优化:
e2e.ti.com/…/1472658

赞(0)
未经允许不得转载:TI中文支持网 » CC2640 ICall_malloc
分享到: 更多 (0)