Dear support,
To make a long story short, I was provided two examples from TI in their MCSDK. One was using a linker script and the other was using a config file. Inside the code I am using, there is a flash test where there is a serie of memory allocations of huge size (65536 bytes). When I ported this code from the place it was using linker to the one using a cfg file, the code does not work anymore. Here is the cfg file: 5282.mts.cfg
I found this very interesting post (http://e2e.ti.com/support/embedded/bios/f/355/p/103991/367927.aspx#367927) but I still have a few questions:
1) In the cfg file I provided, is the heap allocated (BIOS.heapSize = 0x3000) common to all the threads created within the application?
2) If I load the same program in different cores, will all the core use the same section in memory to use malloc and free?
3) according the the mapping of the memory, in which section of the memory is this heap located?
Program.sectMap["systemHeap"] = {loadSegment: "MSMCSRAM", loadAlign:128}; /* XDC Heap .. eg Memory_alloc () */
Program.sectMap[".sysmem"] = "MSMCSRAM"; /* Malloc heap */
4) Is this a better way to allocate a head?
/*
** Create a Heap.
*/
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var heapMemParams = new HeapMem.Params();
heapMemParams.size = 0x300000;
heapMemParams.sectionName = "systemHeap";
Program.global.heap0 = HeapMem.create(heapMemParams);
/* This is the default memory heap. */
Memory.defaultHeapInstance = Program.global.heap0;
Thanks for your feedback
Aymeric