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.

Not enough memory, how to set heap stack to use malloc() function on dsk 6416?

Other Parts Discussed in Thread: CCSTUDIO

Hi All,

I am using dsk6416 board and part of my project requires to load two arrays from the host pc to the target dsp board via RTDX. I successfully implemented the RTDX interface, but I now have problem with the available memory, I know that the  default is 1K bytes.

Can you please guide me how to set up the heap size for dynamic memory allocation on the DSK6416. I am using CCSv3.1.

Cheers.



  • Hi,

    You can set the heap size in the project build options for the Linker:

    Note that you are using unsupported version of the tools. CCSv3.1 and RTDX. While the old CCS version is not that big a deal since you can move to later versions of the tool when you ready, RTDX may be more problematic since support for it has been completely dropped and we will not be able to help you if you decided to move migrate your code to a later version of CCS and encounter issues with RTDX.

    Thanks

    ki

  • Ki-Soo Lee, Thanks for your reply, I will try your suggested steps and will let update you with my progress.

    What heap size do you suggest for two integer arrays having 204800 numbers each?  I know that in C and int takes up to 4 bytes.

    Thanks in advance for your support. 

  • Hi All, 

    I did as the previous step suggested and set the heap size from the build options window under the linker tab. However I still didnt have enough memory for my array. 

    I did set a configuration file in which I went to System->MEM- Memory Section Manager-> SRAM -> ticked enable a heap in memory and set the heap size to 0x00008000. After saving and trying to build the configuration I received around 30 errors as shown below:

    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 44: warning:
    multiple definitions of SECTION named '.text'
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 45: warning:
    multiple definitions of SECTION named '.cio'
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 46: warning:
    multiple definitions of SECTION named '.bss'
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 48: warning:
    multiple definitions of SECTION named '.stack'
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 49: warning:
    multiple definitions of SECTION named '.cinit'
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 50: warning:
    multiple definitions of SECTION named '.data'
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 51: warning:
    multiple definitions of SECTION named '.far'
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 52: warning:
    multiple definitions of SECTION named '.switch'
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 55: warning:
    multiple definitions of SECTION named '.pinit'
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 56: warning:
    multiple definitions of SECTION named '.const'
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 57: warning:
    multiple definitions of SECTION named '.rtdx_text'
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 58: warning:
    multiple definitions of SECTION named '.rtdx_data'
    >> error: memory types ISRAM and VECS on page 0 overlap
    >> error: memory types SDRAM and BMEM on page 0 overlap
    >> warning: can't find a memory area named 'VECS' on page 0 for allocation of
    '.intvecs'
    >> error: can't find any memory areas for allocation of '.intvecs'
    >> error: can't allocate '.intvecs' into 'VECS' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.text'
    >> error: can't find any memory areas for allocation of '.text'
    >> error: can't allocate '.text' into 'BMEM' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.cio'
    >> error: can't find any memory areas for allocation of '.cio'
    >> error: can't allocate '.cio' into 'BMEM' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.bss'
    >> error: can't find any memory areas for allocation of '.bss'
    >> error: can't allocate '.bss' into 'BMEM' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.sysmem'
    >> error: can't find any memory areas for allocation of '.sysmem'
    >> error: can't allocate '.sysmem' into 'BMEM' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.stack'
    >> error: can't find any memory areas for allocation of '.stack'
    >> error: can't allocate '.stack' into 'BMEM' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.cinit'
    >> error: can't find any memory areas for allocation of '.cinit'
    >> error: can't allocate '.cinit' into 'BMEM' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.data'
    >> error: can't find any memory areas for allocation of '.data'
    >> error: can't allocate '.data' into 'BMEM' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.far'
    >> error: can't find any memory areas for allocation of '.far'
    >> error: can't allocate '.far' into 'BMEM' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.switch'
    >> error: can't find any memory areas for allocation of '.switch'
    >> error: can't allocate '.switch' into 'BMEM' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.const'
    >> error: can't find any memory areas for allocation of '.const'
    >> error: can't allocate '.const' into 'BMEM' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.rtdx_text'
    >> error: can't find any memory areas for allocation of '.rtdx_text'
    >> error: can't allocate '.rtdx_text' into 'BMEM' (page 0)
    >> warning: can't find a memory area named 'BMEM' on page 0 for allocation of
    '.rtdx_data'
    >> error: can't find any memory areas for allocation of '.rtdx_data'
    >> error: can't allocate '.rtdx_data' into 'BMEM' (page 0)
    >> C:\CCStudio_v3.1\examples\dsk6416\rtdx\shared\c6416.cmd, line 32: warning:
    absolute symbol _RTDX_interrupt_mask being redefined
    >> error: errors in input - ./Debug/Control_DSP.out not built

    >> Compilation failure

    Build Complete,
    30 Errors, 26 Warnings, 0 Remarks.

    Thanks for your support. 

    Josef

  • Hi Josef,

    I didn't realize you are using a BIOS project. BIOS usually generates it's own command file. Hence you have multiple definitions of various sections between the BIOS generated command file and the c6416.cmd file you have as part of your project. I'm assuming you do not need the latter then.