Skip to content
Commit 540fdad2 authored by Devaraj Ranganna's avatar Devaraj Ranganna
Browse files

aws-iot-example: Use FreeRTOS `heap_4` instaed of `heap_3`

FreeRTOS TCP/IP stack recommends `heap_4` and `BufferAllocation_2`.
https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/tree/V4.0.0-appsec#note



Since FreeRTOS manages the heap, set Mbed TLS memory APIs to use
FreeRTOS heap APIs (mbedtls_platform_set_calloc_free).

In addition, reduce allocated heap size from `0x000b0000` to
`0x00000400`, since FreeRTOS manages heap when `heap_4` configuration is
selected. Ideally, heap size should be 0, however, GNU expects linker
symbol `end` to be available. Hence, set it to `0x400`.

Also, set the FreeRTOS config `configAPPLICATION_ALLOCATED_HEAP` to 0,
indicating FreeRTOS allocates the heap based on `configTOTAL_HEAP_SIZE`
(720896 bytes).

Signed-off-by: Devaraj Ranganna's avatarDevaraj Ranganna <devaraj.ranganna@arm.com>
parent 92544f86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment