configTOTAL_HEAP_SIZE increase

kkoovalsky wrote on Tuesday, January 31, 2017:

I’m programming STM32F407VET which contains 192KB of RAM. Default value of configTOTAL_HEAP_SIZE is (size_t)15360 (generated from CubeMX), so it’s 61,44 KB. So, why isn’t the rest of RAM used by default? Can I freely increase the size? I use heap_4.c

rtel wrote on Tuesday, January 31, 2017:

I’m not sure how 15.36K becomes 61.44K, but you can set
configTOTAL_HEAP_SIZE to anything you like, until you run out of RAM:
http://www.freertos.org/a00111.html

kkoovalsky wrote on Friday, February 03, 2017:

So, is the calculation good: (size_t)15,36K = 4 * 15,36K, because size_t on STM32 is 4B, isn’t it?

rtel wrote on Friday, February 03, 2017:

Look where configTOTAL_HEAP_SIZE is used. Line 106 at the time of
writing. It is a char array. If configTOTAL_HEAP_SIZE is 1000 the heap
will be 1000 bytes:
https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/MemMang/heap_4.c