Hi
My customer tried to create new TASK on TI RTOS, but malloc() function in the customer's code returned NULL and they couldn't allocate the memory area they need then.
What should they do for the debugging?
Best Regards, Taki
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.
Hi
My customer tried to create new TASK on TI RTOS, but malloc() function in the customer's code returned NULL and they couldn't allocate the memory area they need then.
What should they do for the debugging?
Best Regards, Taki
Taki,
I'd recommend starting with Runtime Object View (ROV) in CCS. This will let you view the stack and heap usage in real-time. You can read an explanation of debugging using ROV in the TI-RTOS Basics SimpleLink Academy: https://dev.ti.com/tirex/explore/node?node=AMtnZk2LTvHnhgseIRtw-w__krol.2c__LATEST (Task 2: Debugging Tools)
Regards,
Daniel
Hi Daniel,
Thank you for replying with useful link. I will suggest the customer to read it.
In the paragraph "Task 2:Debugging Tools", I learned to check the stack usage and heap free space.
1. Are there any other points to check to solve this phenomenon?
2. The customer is using IAR as IDE. Could you provide us any documentations related to the similar debugging tool on IAR?
Best Regards, Taki
Taki,
You can find information about ROV in IAR in the SimpleLink SDK User guide: https://dev.ti.com/tirex/explore/content/simplelink_cc2640r2_sdk_4_30_00_08/docs/ble5stack/ble_user_guide/html/ble-stack-5.x-guide/debugging-index.html?highlight=rov#rov-in-iar
Monitoring the stack and heap is a good place to start. ROV also lets your view the state of every task in your system as well as scan for BIOS errors. Scanning for errors and viewing task state is the next thing I would recommend checking.
Regards,
Daniel