This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640 ICall_malloc

Other Parts Discussed in Thread: BLE-STACK

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

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

请问heap size在哪里调整呢?

感谢!

  • 请看:
    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