This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0G3507: Defining heap in SDK linker file not working as expected.

Part Number: MSPM0G3507

Hi MSP Team,

Asking on behalf of a customer currently evaluating MSPM0G:

I have noticed that using the SDK and the linker-file that comes with it, mspm0g3507.lds (ti/devices/msp/m0p/linker_files/gcc/mspm0g3507.lds) does not configure size of the heap.

 

I can see at the top of that file that these are defined:

_Min_Heap_Size  = 0x200;      /* required amount of heap  */  

_Min_Stack_Size = 0x80; /* required amount of stack */

 

But they are not used anywhere in the actual the linker file. Thus the heap size end up being 0bytes.

 

I tried setting the heap (as described in this page) to 0x200 (using ". = . + _Min_Heap_Size;"):

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/925701/ccs-cc2640r2f-firmware-update-using-position-independent-executable-code

 

But I am still not able to allocate memory from the heap. In one our MCU packages used for handling i2c properties the command realloc() is used and that seems to fail. 

If I run the same code for allocating memory using ticlang instead, it works as expected, and memory is allocated. I can however not find the linker-file that ticlang is using.

 

Do you know what is causing this and do you have a working version of the linker file that actually uses _Min_Heap_Size and _Min_Stack_Size?

I have used mspm0_sdk_0_57_00_00_eng when I get this problem.

Please advice.

Thanks and regards,

/ Wolfgang