STM32F746-DISCO heap problems
Posted: Mon May 22, 2017 12:27 pm
Hello,
I am developing an application an the STM32F746-discovery board with ChibiOS. Now I am having trouble with the heap memory.
When setting the CH_CFG_MEMCORE_SIZE to zero to let ChibiOS manage all the available RAM, the '__heap_base__' is set to 0x2001 0080 and '__heap_end__' is set to 0x2005 0000. The problem is that this is not the free RAM but that is all the RAM (even one address in the reserved space).
Now when using this configuration allocating from memory goes wrong. When creating a dynamic thread, weird things happen. eg. When using SPI the data send from the thread created from the heap is incorrect.
When setting the CH_CFG_MEMCORE_SIZE to 0xCB38 (that is the maximum heap size the compiler let's me allocate). Everything works just fine.
I have no idea why this is happening...
I am developing an application an the STM32F746-discovery board with ChibiOS. Now I am having trouble with the heap memory.
When setting the CH_CFG_MEMCORE_SIZE to zero to let ChibiOS manage all the available RAM, the '__heap_base__' is set to 0x2001 0080 and '__heap_end__' is set to 0x2005 0000. The problem is that this is not the free RAM but that is all the RAM (even one address in the reserved space).
Now when using this configuration allocating from memory goes wrong. When creating a dynamic thread, weird things happen. eg. When using SPI the data send from the thread created from the heap is incorrect.
When setting the CH_CFG_MEMCORE_SIZE to 0xCB38 (that is the maximum heap size the compiler let's me allocate). Everything works just fine.
I have no idea why this is happening...