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.

Memory allocation on TMS570LS31HDK

Other Parts Discussed in Thread: HALCOGEN

Hi All,


I am doing malloc()  for a size of 5 Kilo Bytes. I am unable to allocate memory with this size. Maximum I am able to allocate for a size of 1 Kilo Bytes.

Is there any memory limitation on the board?

For my program, I require 300 Kilo Bytes of Heap memory. Code and data sizes will be around 900 Kilo Bytes. Is it possible to do this on this board?

I require bare minimum functionality on the board. I have program in the following manner.

main()

{

     // memory allocations

    // Instantiating the handle

    // File inputs and outputs (PCM)

    // Processing the data in a loop

    // Freeing the memory allocations

}

}

  • You must set the heap size in the linker command file. The default size is 2KB (but 8 bytes are used by the system).  Here is an example of setting the heap to 8KB in a HalCoGen generated linker command file (sys_link.cmd).

    /* USER CODE BEGIN (1) */

    --heap_size=0x2000 /* setting heap to 8KB */

    /* USER CODE END */


    See section 8.4.16 of the ARM Assembly Language Tools User's Guide for more information: http://www.ti.com/lit/ug/spnu118o/spnu118o.pdf

    Best regards,
    Bob Crosby