SWRA845 June 2026 CC2340R5 , CC2744R7-Q1 , CC2745P10-Q1 , CC2745R10-Q1 , CC2745R7-Q1
In BLE applications, the question of how much Heap space to allocate to the protocol stack often arises. Developers may address this question by using the .map file and ROV to observe the Heap usage.
Once the project is imported and built, a .map file with the corresponding project name is visible in the Release/Debug folder under the project directory. This file shows the detailed usage of SRAM, Flash, and CCFG/SCFG on the chip.

This figure shows the used and unused space of the project under the current configuration. The generation of this file corresponds to the .cmd file located in the project directory. Free-RTOS is extensively used in the SimpleLink F3 SDK, and there is an allocation of Free-RTOS Heap space via SysConfig, which allows users to increase or decrease the allocated Heap space depending on their specific requirements. When searching for .bss in the .map file, you may find that the Heap managed by Free-RTOS is allocated in the .bss section.

The .bss section points to the RAM space in the .cmd file.


After reviewing the .map file, to determine how much Heap space to allocate to the protocol stack for our applications, we can monitor the peak Heap consumption using ROV while maintaining four simultaneous connections, taking BLE in the peripheral role as an example. Open CCS 20.x, select the project you want to test, right-click it, and click Debug Project.

After properly connecting and starting the debugging process, click View -> Run Time Object on the toolbar to launch the ROV feature. Select Heap in the Module Name list and select either Basic or Detailed on the right. Run the code normally, and connect four peer devices to the emulation device in sequence. In the example code environment, the peak Heap consumption under four simultaneous connections is observed to be 13440 bytes (13kB). In this case, to ensure the program runs normally, at least 13440 bytes must be allocated for the Heap.


For issues that may occur in the code, it's also recommended to use ROV to check for stack overflow first, which is helpful in resolving the issue. The procedure is similar, but select System Stack from the ROV Module Name list and check the execution of Tasks at the same time. If the System Stack indicates a Stack Overflow, proceed to examine the Tasks.