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.

CC2530: How to do memory profiling

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK

Hi,

We are running our lighting applications on cc2530 zstack.

I wanted to profile memory usage metrics and got good amount of metrics, like this below. I am printing it via UART.

Memory Metrics
blkMax: 59
blkCnt: 54
blkFree: 15
memAlo: 729
memMax: 1415
Memory Profiling
proCnt: [16, 48, 112, 176, 192, 224, 256, -1, ]
proCur: [34, 1, 3, 1, 0, 0, 0, 0, ]
proMax: [39, 8, 7, 3, 1, 0, 0, 0, ]
proTot: [58, 31, 64, 8, 1, 0, 0, 0, ]

Also I added these defines in compiler preprocessor configs, to get these output
OSALMEM_METRICS=TRUE
OSALMEM_PROFILER=TRUE
OSALMEM_PROFILER_LL=TRUE 

I want to know more about how osal manages heap memory.
And also want to get these statistics below
- How many buckets are there and how many of them are free, in runtime.(sorry if i sound technically wrong).
- How many bytes are free.
- Longest free contiguous space in the heap.

And where can i get these TI documents for these topics.

  • Hi Aakash,

    You can refer to SWRA635 and the Z-Stack 3.0 Developer's Guide.pdf "Heap Memory Management" section from Z-Stack 3.0.2-S\Documents\ for more information.  It appears that you've allowed all OSAL Memory Metrics, thus you would need to further modify the Z-Stack 3.0.2-S\Components\osal\common\OSAL_Memory* layer independently to get the additional metrics you desire.

    Regards,
    Ryan