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.

The ram memory is full is there a way to deallocate it?

Other Parts Discussed in Thread: C2000WARE

Hello folks,

I have a question. I wanted to create some kind of table. for this i created an object with 8 attributes. the object is called spi_motorcontroller_dataFrame so I created an array spi_motoroncontroller_dataFrame as[74] with 74 fields because I have 74 parameters. i have now filled the table with all the parameters, but i think my ram is full as a result. Error message: F28055_nonBIOS_flash.cmd", line 52: error #10099-D: program will not fit into available memory. run placement with alignment/blocking fails for section ".ebss" size 0x586 page 1.

Can it be that I have created the object 74 times and it fills up the RAM memory? can you maybe delete the ram memory or is that a wrong approach what i did. I am also sending a snippet of the source code..
Thanks, people.

SPI_MOTORCONTROLLER_dataFrame as[74] = {0};


SPI_MOTORCONTROLLER_dataFrame INTERFACE_MOTORCONTROLLER_createDataFrame(INTERFACE_MOTORCONTROLLER_Befehl pBefehl, int pDaten)
{

    SPI_MOTORCONTROLLER_dataFrame dateFrame;

    //Parametersatz1
    as[MOTORCONTROLLER_Befehl_Write_P1_HOCHLAUFRAMPE_R]=   (SPI_MOTORCONTROLLER_dataFrame) { 0x01, 0x06, 0x01, 0x80, pDaten & 0xFF, (pDaten >> 8) & 0xFF, 0, 0 };
    as[MOTORCONTROLLER_Befehl_Write_P1_TIEFLAUFRAMPE_R]=   (SPI_MOTORCONTROLLER_dataFrame) { 0x01, 0x06, 0x01, 0x81, pDaten & 0xFF, (pDaten >> 8) & 0xFF, 0, 0 };
    as[MOTORCONTROLLER_Befehl_Write_P1_HOCHLAUFRAMPE_L]=   (SPI_MOTORCONTROLLER_dataFrame) { 0x01, 0x06, 0x01, 0x82, pDaten & 0xFF, (pDaten >> 8) & 0xFF, 0, 0 };
    as[MOTORCONTROLLER_Befehl_Write_P1_TIEFLAUFRAMPE_L]=   (SPI_MOTORCONTROLLER_dataFrame) { 0x01, 0x06, 0x01, 0x83, pDaten & 0xFF, (pDaten >> 8) & 0xFF, 0, 0 };
    as[MOTORCONTROLLER_Befehl_Write_P1_SCHNELLHALTRAMPE]=  (SPI_MOTORCONTROLLER_dataFrame) { 0x01, 0x06, 0x01, 0x84, pDaten & 0xFF, (pDaten >> 8) & 0xFF, 0, 0 };
    as[MOTORCONTROLLER_Befehl_Write_P1_f_maxR]=            (SPI_MOTORCONTROLLER_dataFrame) { 0x01, 0x06, 0x01, 0x85, pDaten & 0xFF, (pDaten >> 8) & 0xFF, 0, 0 };

  • Markus,
    Can you attach the .cmd file you are using, just so I can make sure the assignments?  In the out of box .cmd file in C2000Ware it looks like RAML3 is assigned to data space, but never used.  You could try mapping your .ebss/,esysmem to RAML3 vs RAML2.  Or if we need we can bunch L2/L3 into one assignable region if we need all of it for your data vars.

    Best,
    Matthew

  • Hello Matthew,

    this is my CMD file i use flash nonBIOS cmd

    /**********************************************************************
    * File: F28055_nonBIOS_flash.cmd -- Linker command file for non-DSP/BIOS
    * code with DSP in jump-to-flash boot mode.
    *
    * History:
    *   07/09/12 - original (D. Alter)
    **********************************************************************/
    
    MEMORY
    {
    PAGE 0:    /* Program Memory */
       BEGIN_M0             : origin = 0x000000, length = 0x000002    /* Part of M0SARAM.  Used for "Boot to M0" bootloader mode. */
       L0DPSARAM            : origin = 0x008000, length = 0x000800    /* L0 DPSARAM, Z1 or Z2 secure, CLA Data RAM 2 */
       L3DPSARAM            : origin = 0x009000, length = 0x001000    /* L3 DPSARAM, Z1 or Z2 secure, CLA Prog RAM */
       CLA_ROM          (R) : origin = 0x00F000, length = 0x001000    /* CLA Data ROM */
       DCSM_OTP_Z2_P0   (R) : origin = 0x3D7800, length = 0x000006    /* Part of Z2 OTP.  LinkPointer, JTAG lock, Boot Mode */
       DCSM_ZSEL_Z2_P0  (R) : origin = 0x3D7810, length = 0x000010    /* Part of Z2 OTP.  Z2 password locations, Flash and RAM partitioning */
       DCSM_OTP_Z1_P0   (R) : origin = 0x3D7A00, length = 0x000006    /* Part of Z1 OTP.  LinkPointer, JTAG lock, backup Boot Mode */
       DCSM_ZSEL_Z1_P0  (R) : origin = 0x3D7A10, length = 0x000010    /* Part of Z1 OTP.  Z1 password locations, Flash and RAM partitioning */
       FLASH_ABCDEFGHIJ (R) : origin = 0x3E8000, length = 0x00FFFE    /* FLASH, All sectors combined */
       BEGIN_FLASH      (R) : origin = 0x3F7FFE, length = 0x000002    /* Part of FLASH Sector A.  Used for "Jump to flash" bootloader mode. */
       IQTABLES         (R) : origin = 0x3FDB52, length = 0x000b50    /* Part of Boot ROM */
       IQTABLES2        (R) : origin = 0x3FE6A2, length = 0x00008C    /* Part of Boot ROM */
       IQTABLES3        (R) : origin = 0x3FE72E, length = 0x0000AA    /* Part of Boot ROM */
       RESET            (R) : origin = 0x3FFFC0, length = 0x000002    /* Part of Boot ROM */
    
     PAGE 1 :   /* Data Memory */
       M0SARAM              : origin = 0x000002, length = 0x0003FE    /* M0 SARAM */
       M1SARAM              : origin = 0x000400, length = 0x000400    /* M1 SARAM */
       CLA1_TO_CPU_MSGRAM   : origin = 0x001480, length = 0x000080    /* CLA1 to CPU message RAM */
       CPU_TO_CLA1_MSGRAM   : origin = 0x001500, length = 0x000080    /* CPU to CLA1 message RAM */
       L1DPSARAM            : origin = 0x008800, length = 0x000400    /* L1 DPSARAM, Z1 or Z2 secure, CLA Data RAM 0 */
       L2DPSARAM            : origin = 0x008C00, length = 0x000400    /* L2 DPSARAM, Z1 or Z2 secure, CLA Data RAM 1 */
    }
    
     
    SECTIONS
    {
    /*** Compiler Required Sections ***/
    
      /* Program memory (PAGE 0) sections */
       .text              : > FLASH_ABCDEFGHIJ,        PAGE = 0
       .cinit             : > FLASH_ABCDEFGHIJ,        PAGE = 0
       .const             : > FLASH_ABCDEFGHIJ,        PAGE = 0
       .econst            : > FLASH_ABCDEFGHIJ,        PAGE = 0
       .pinit             : > FLASH_ABCDEFGHIJ,        PAGE = 0
       .reset             : > RESET,                   PAGE = 0, TYPE = DSECT  /* We are not using the .reset section */
       .switch            : > FLASH_ABCDEFGHIJ,        PAGE = 0
    
      /* Data Memory (PAGE 1) sections */
       .bss               : > M0SARAM,                 PAGE = 1
       .ebss              : > M0SARAM,                 PAGE = 1
       .cio               : > M0SARAM,                 PAGE = 1
       .stack             : > M1SARAM,                 PAGE = 1
       .sysmem            : > M1SARAM,                 PAGE = 1
       .esysmem           : > M1SARAM,                 PAGE = 1
    
    /*** User Defined Sections ***/
       codestart          : > BEGIN_FLASH,             PAGE = 0                /* Used by file CodeStartBranch.asm */
    
       dcsm_otp_z1        : > DCSM_OTP_Z1_P0           PAGE = 0
       dcsm_zsel_z1       : > DCSM_ZSEL_Z1_P0          PAGE = 0
    
       dcsm_otp_z2        : > DCSM_OTP_Z2_P0           PAGE = 0
       dcsm_zsel_z2       : > DCSM_ZSEL_Z2_P0          PAGE = 0
    
       secureRamFuncs     :   LOAD = FLASH_ABCDEFGHIJ, PAGE = 0                /* Used by file Flash.c */
                              RUN = L0DPSARAM,         PAGE = 0                /* Load to flash, run from CSM secure RAM */
                              LOAD_START(_secureRamFuncs_loadstart),
                              LOAD_SIZE(_secureRamFuncs_loadsize),
                              RUN_START(_secureRamFuncs_runstart)
    }
    
    /******************* end of file ************************/

  • Are you using the CLA?  I don't see it allocated, so we can use the L1DPSARAM and L2DPSARAM for data vars.

    If this is correct,you can do something like:

    replace this:

       L1DPSARAM            : origin = 0x008800, length = 0x000400    /* L1 DPSARAM, Z1 or Z2 secure, CLA Data RAM 0 */
       L2DPSARAM            : origin = 0x008C00, length = 0x000400    /* L2 DPSARAM, Z1 or Z2 secure, CLA Data RAM 1 */

    with this

    L1L2DPSARAM            : origin = 0x008800, length = 0x000800    /* L1/L2 DPSARAM, Z1 or Z2 secure, CLA Data RAM 0 */

    and replace this

    /* Data Memory (PAGE 1) sections */
       .bss               : > M0SARAM,                 PAGE = 1
       .ebss              : > M0SARAM,                 PAGE = 1
       .cio               : > M0SARAM,                 PAGE = 1
       .stack             : > M1SARAM,                 PAGE = 1
       .sysmem            : > M1SARAM,                 PAGE = 1
       .esysmem           : > M1SARAM,                 PAGE = 1

    With this

    /* Data Memory (PAGE 1) sections */
       .bss               : > L1L2DPSARAM   ,                 PAGE = 1
       .ebss              : > L1L2DPSARAM   ,                 PAGE = 1
       .cio               : > M0SARAM,                 PAGE = 1
       .stack             : > M1SARAM,                 PAGE = 1
       .sysmem            : > L1L2DPSARAM                    PAGE = 1
       .esysmem           : > L1L2DPSARAM   ,                 PAGE = 1

  • Ty Matthew,

    that helped a lot, now i have 2048 bytes instead of 1024.

    where did you find these commands to modify this script. sorry I'm still very new to TI controllers.

  • Markus,

    Please take a look at the C tools Guide https://www.ti.com/lit/SPRU514 

    Best,
    Matthew