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.

CCS/TMS320C5515: Memory Block Configuration for TMSC5515

Part Number: TMS320C5515

Tool/software: Code Composer Studio

Hi, I am working on a project using the TMSC5515 with Code Composer Studio. According to the datasheet the C5515 has 320K Bytes of on-chip RAM. However when I try to initialize an Int16 Array of size 96000 (enough for a 2 second delay line at 48kHz sample rate), I get an error:

Description Resource Path Location Type
gmake: *** [main.obj] Error 1 audioTests C/C++ Problem

This is not very descriptive, but I figured out the problem is based on the array size.

96000 * 2 Bytes (16 bit integer) = 182K Bytes, which the chip should have enough RAM to handle. At first I thought this was because of the fact that SARAM consists of 32 4K X 16 bit blocks, but I was able to instantiate an array of size 24000 without any problems, so clearly creating an array larger than this block size is possible. 

How to I configure the on chip memory to allow a large array size?

Thanks!

  • Hi Emmett,
    Yes, that is certainly not a very descriptive error. I'm guessing you are getting some linker placement error, which makes sense if you are using the evm5515.gel file since the linker command file has broken up SARAM into 32 blocks. You can try tweaking the linker command file to reconfigure the linker map so that you can fit that large array. See the below article for more information on how to tweak your linker command file:
    processors.wiki.ti.com/.../Linker_Command_File_Primer

    Thanks
    ki
  • Thanks for the quick reply. I have the following standard lnkx.cmd file that I am working with, it appears that .data (Initialized Variables) and .sysmem (dynamic memory) are both allocated to DARAM0|SARAM0|SARAM1. That seems like it would give the array access to enough memory. What do I need change?

    /******************************************************************************/
    /* LNKX.CMD - COMMAND FILE FOR LINKING C PROGRAMS IN LARGE/HUGE MEMORY MODEL  */
    /*                                                                            */
    /* Usage:                                                                     */
    /*  cl55 <src files> -z -o<out file> -m<map file> lnkx.cmd -l<RTS library>   */
    /*                                                                            */
    /* Description: This file is a sample command file that can be used for       */
    /*              linking programs built with the C Compiler.  Use it as a      */
    /*              guideline; you  may want to change the allocation scheme      */
    /*              according to the size of your program and the memory layout   */
    /*              of your target system.                                        */
    /*                                                                            */
    /*   Notes: (1) You must specify the directory in which <RTS library> is      */
    /*              located.  Either add a "-i<directory>" line to this file      */
    /*              file, or use the system environment variable C55X_C_DIR to    */
    /*              specify a search path for the libraries.                      */
    /*                                                                            */
    /******************************************************************************/
    
    -stack    0x2000      /* Primary stack size   */
    -sysstack 0x1000      /* Secondary stack size */
    -heap     0x2000      /* Heap area size       */
    
    -c                    /* Use C linking conventions: auto-init vars at runtime */
    -u _Reset             /* Force load of reset interrupt handler                */
    
    /* SPECIFY THE SYSTEM MEMORY MAP */
    
    MEMORY
    {
     PAGE 0:  /* ---- Unified Program/Data Address Space ---- */
    
      MMR    (RWIX): origin = 0x000000, length = 0x0000c0  /* MMRs */
      DARAM0 (RWIX): origin = 0x0000c0, length = 0x00ff40  /*  64KB - MMRs */
      SARAM0 (RWIX): origin = 0x010000, length = 0x010000  /*  64KB */
      SARAM1 (RWIX): origin = 0x020000, length = 0x020000  /* 128KB */
      SARAM2 (RWIX): origin = 0x040000, length = 0x00FE00  /*  64KB */
      VECS   (RWIX): origin = 0x04FE00, length = 0x000200  /*  512B */
      PDROM   (RIX): origin = 0xff8000, length = 0x008000  /*  32KB */
    
     PAGE 2:  /* -------- 64K-word I/O Address Space -------- */
    
      IOPORT (RWI) : origin = 0x000000, length = 0x020000
    }
     
    /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
    
    SECTIONS
    {
       .text     >> SARAM1|SARAM2|SARAM0  /* Code                        */
    
       /* Both stacks must be on same physical memory page               */
       .stack    >  DARAM0                /* Primary system stack        */
       .sysstack >  DARAM0                /* Secondary system stack      */
    
       .data     >> DARAM0|SARAM0|SARAM1  /* Initialized vars            */
       .bss      >> DARAM0|SARAM0|SARAM1  /* Global & static vars        */
       .const    >> DARAM0|SARAM0|SARAM1  /* Constant data               */
       .sysmem   >  DARAM0|SARAM0|SARAM1  /* Dynamic memory (malloc)     */
       .switch   >  SARAM2                /* Switch statement tables     */
       .cinit    >  SARAM2                /* Auto-initialization tables  */
       .pinit    >  SARAM2                /* Initialization fn tables    */
       .cio      >  SARAM2                /* C I/O buffers               */
       .args     >  SARAM2                /* Arguments to main()         */
    
        vectors  >  VECS                  /* Interrupt vectors           */
    
       .ioport   >  IOPORT PAGE 2         /* Global & static ioport vars */
    }