Hi John,
In addition, Freescale MQX uses its own memory allocation system, which doesn't rely on heap.
The default MQX memory pool, where MQX kernel allocates system memory, is between __KERNEL_DATA_START and __KERNEL_DATA_END (symbols generated during bsp linkage).
It allocates memory using function _mem_alloc_system().
On top of this, in bsp we define malloc() to call _mem_alloc_system().
If you want the MQX kernel to call Thumb library malloc, then you have to define _mem_alloc_system* in preprocessor to be malloc #define _mem_alloc_system malloc and so on. And then disable bsp "duplicate" definition of malloc (either by link order or be removing the duplcate definition from the sources).
If you want to use Thumb library allocation system, you can, but it is your responsibility to give the CodeWarrior necessary linker generated files and so on, whatever the Thumb library allocation system relies on.
You lose TAD, kernel logging and other MQX features related to memory allocation.
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------