AnsweredAssumed Answered

SEGGER embOS/Micrium OS-III on STM32F4

Question asked by melamud.michael on Jul 17, 2013
Latest reply on Jul 19, 2013 by melamud.michael
Hi ,

Maybe someone here can help me with the issue that i am having .
I am currently evaluating both embOS and OS-III on STM32F4G-Eval, and i see the same issue on both of them .

After starting my task , when inside the task i am trying to call malloc or even the thread safe version of malloc that is provided by the OS , it fails and returns null , i know that i have plenty of free RAM so i guess this is not the issue , maybe heap de-fragmentation ?

When calling malloc before starting the OS  , malloc works just fine , so i am afraid that is some kind of issue with the OS , but the strangest part is that i am having the same behaviour on both OS`s .

Any idea why?

Edit :

I think that i am on my way to fix the problem .

it seems that setting in the linker script :


_Min_Heap_Size = 0x19000; /* required amount of heap */
_Min_Stack_Size = 0x200; /* required amount of stack */

instead of :

_Min_Heap_Size = 0x00; /* required amount of heap */
_Min_Stack_Size = 0x200; /* required amount of stack */

solves the issue .

I am used to work on a bare metal system , where the _Min_Heap_size was not a issue , it seems that working with OS is different in this aspect.

Thanks
Michael

Outcomes