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.

TMS320F28P650DH: Freeing .esysmem if not used

Part Number: TMS320F28P650DH

Hi Experts,

If malloc() and free() are not used, I presume the heap is not used in App, in this case, can we free the .esysmem spaces? 

We searched through the .map file and found that there are some FPU functions that used the heap, can we free .esysmem spaces in this case?

Regards,

Hang

 

  • Hi Hang,

    I think we shouldn't remove the .esysmem section if map file indicates it is used by FPU functions.

    I think the FPU utilizes the heap for temporary storage or for initialization. If in case we remove it and if these libraries are trying to use it, you might encounter a fault or some memory corruption issues.

    Let me loop an FPU expert for more details.

    Thanks

    Aswin

  • Hang,

    Can you indicate which FPU functions are using the heap?

    Thanks,

    Sira

  • Hi Sira,

    I believe customer goes throughed the symbols and find that malloc and free are used, but not knowing where, I can share with you the linkinfo internally.

    Nevertheless, customer was reducing the size of .essymem to free spaces anym and so far it works. the question is that how much can they free safely?

    To answer this, I believe the next step would be finding how much heap are actually, by FPU lib or anything else (Customer application does not use malloc at all).

    How can we find out who's using the heap and how much it's used by maximum? Although this might be dynamic, maybe we can still have an estimation since this it's only used in TI libs.

    Regards,

    Hang

  • I believe one way of know about the actual heap usesage would be fillling the .esysem with specific characters and checks howmuch spaces are altered during run time, is it correct?

    If so, we need to fill the .esysmem ealiy. for simplicity sake, we can fill it at the first line of the main(), however, this does not includes the c_int00 codes. Is there any heap usage in the C_in00? If so maybe we need to fill the .esysmem using assembly even beofre the the C_int00.  

  • Hi Sira,

    Is there any update on this?

    Is there any heap usage in the C_in00?
  • Hang,

    I can confirm that our F28 FPU DSP library does not use any heap. So you should be able to delete esysmem altogether.