FreeRTOS heap size issue?

guggech wrote on Wednesday, January 03, 2018:

Hi, I am using FreeRTOS with an Atmel xmega256D3 and using Atmel studio. I am running into a strange issue and hoping that somebody might have some idea on what is going on. I currently have my heap size set 7700 and things seems to work. When I increase the heap size to 7800 or 7900 without excedding the memory boundary, the program does not work, it either keeps resetting, freeze after the power up cycle. I am running 10 tasks which have all been check for stack space.

rtel wrote on Wednesday, January 03, 2018:

Check the linker script is describing the memory layout of your chip
correctly. Perhaps you are trying to use memory that is not physically

guggech wrote on Thursday, January 04, 2018:

Is the heap allocated from the high memory to low or the other way?

rtel wrote on Friday, January 05, 2018:

Can’t say for sure if you are using heap_3.c as that maps to the
malloc() implementation provided by your compiler, but in all other
cases it is low to high.

richard_damon wrote on Friday, January 05, 2018:

Depends on which heap you are using. heap3.c uses the systems malloc function, which depends on the implementation. The other version use a static array, whose size is set in FreeRTOSConfig.h