5.1 FreeRTOS Heap Requirement

ProjectTotal Heap Size
Building Block – Misc.mr_ml_trp_uart85,812
HCI_application75,812
Building Block – Peripheraltwo_set_adv75,812
peripheral_conn75,812
legacy_adv_pathloss75,812
legacy_adv75,812
ext_adv75,812
ble_deep_sleep_adv75,812
peripheral_trp_uart75,812
peripheral_trp_uart_codedPhy75,812
custom_service75,812
Building Block – Central central_ml_trp_uart85,812
legacy_scan75,812
central_conn75,812
central_trp_uart75,812
central_trp_uart_codedPhy75,812
scan_ext_adv75,812
Advanced Applicationsble_throughput75,812
ble_sensor75,812
ble_pxpr_app61,440
ble_pxpm_app61,440
ble_hogps_app61,440
ble_anps_app61,440
ble_anpc_app61,440
ble_ancs_app61,440
Peripheral Applicationstcpip_tcp_server_trp_uart143,360
parallel8080_peripheral_trp_uart100,000
lcc_central_trp_uart100,000
can_peripheral_trp_uart75,812
qei_peripheral_trp_uart75,812
touch_peripheral_trp_uart75,812
usb_cdc_peripheral_trp_uart75,812
The minimum requirement to run the BLE stack with FreeRTOS is 61,440 bytes. Applications configured with a heap size of 75,812 bytes allocate additional memory for data communication and user-added code. Multilink applications require extra space to maintain multiple connections. Peripheral Applications with heap sizes of 100,000 bytes or more are designed to support advanced features. Specifically, the parallel8080_peripheral_trp_uart and lcc_central_trp_uart projects require increased heap size because they run graphics operations, which are memory-intensive. Similarly, the tcpip_tcp_server_trp_uart project requires a larger heap to accommodate the additional memory demands of the TCPIP stack.

Expanding the application with additional peripherals or features will result in larger heap memory consumption. To ensure system stability, it is recommended to track heap usage at runtime using the vPortGetHeapStats() API function. Monitoring available heap space during typical operation helps identify consistent usage patterns and allows for setting an appropriate total heap size for the project.

For further details, refer to the FreeRTOS Heap Memory Management in Reference Documentation from Related Links.