I've also got a problem with malloc and fear the runtime is not properly set up.
Behavior here will be highly dependent on which libraries you've selected.
In any case, two things you should check:
- Look at the address returned by first malloc.
Is it in the area you expect (ie, heap in m_data2), or somewhere in m_data? - Beware that over-rides (as used for sizes) of the LD file do not work due to KDS bugs;
linker command line is improperly constructed.
I'll try post something about that here for NXP to ignore.
Check that you really got the space you expected by carefully checking the map.
Hope this helps!
Best Regards, Dave