Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

configTOTAL_HEAP_SIZE increase

Posted by kkoovalsky on January 31, 2017

I'm programming STM32F407VET which contains 192KB of RAM. Default value of configTOTALHEAPSIZE is (sizet)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 heap4.c


configTOTAL_HEAP_SIZE increase

Posted by rtel on January 31, 2017

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


configTOTAL_HEAP_SIZE increase

Posted by kkoovalsky on February 3, 2017

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


configTOTAL_HEAP_SIZE increase

Posted by rtel on February 3, 2017

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


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS