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.

error #10099-D #10010: program will not fit into available memory f28335

Other Parts Discussed in Thread: TMS320F28335

Hello,

i'm working with F28335 and CCS v6.1. and i have problem with showing message on my screen. I can not use puts() or printf()
there is my code and screen.


**** Build of configuration Debug for project project1 ****

' '
'Building target: project1.out'
'Invoking: C2000 Linker'
"G:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.6/bin/cl2000" -v28 -ml -mt --float_support=fpu32 -O4 --opt_for_speed=5 --preinclude="G:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/include/stdio.h" -g --diag_warning=225 --display_error_number --diag_wrap=off -z -m"project1.map" --stack_size=0x400 --warn_sections -i"G:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.6/lib" -i"G:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.6/include" --reread_libs --display_error_number --diag_wrap=off --xml_link_info="project1_linkInfo.xml" --rom_model -o "project1.out" "./DSP2833x_ADC_cal.obj" "./DSP2833x_CodeStartBranch.obj" "./DSP2833x_DefaultIsr.obj" "./DSP2833x_EQep.obj" "./DSP2833x_GlobalVariableDefs.obj" "./DSP2833x_Gpio.obj" "./DSP2833x_PieCtrl.obj" "./DSP2833x_PieVect.obj" "./DSP2833x_SysCtrl.obj" "./DSP2833x_usDelay.obj" "./main.obj" "../28335_RAM_lnk.cmd" "../DSP2833x_Headers_nonBIOS.cmd" -l"libc.a"
<Linking>
warning #10247-D: creating output section ".cio" without a SECTIONS specification
warning #10210-D: creating ".esysmem" section with default size of 0x400; use the -heap option to change the default size

"../28335_RAM_lnk.cmd", line 130: error #10099-D: program will not fit into available memory. run placement with alignment/blocking fails for section ".stack" size 0x400 page 1. Available memory ranges:
>> Compilation failure
RAMM1 size: 0x400 unused: 0x0 max hole: 0x0
error #10010: errors encountered during linking; "project1.out" not built
gmake: *** [project1.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

#include "DSP2833x_Device.h"
#include "DSP2833x_Examples.h"
#include <stdio.h>


void delay_loop(void);
//void prin(void);

void main(void)
{

InitSysCtrl();

EALLOW;
GpioCtrlRegs.GPCPUD.bit.GPIO87=0;
GpioCtrlRegs.GPCPUD.bit.GPIO86=1;
GpioCtrlRegs.GPCMUX2.bit.GPIO87=0;
GpioCtrlRegs.GPCDIR.bit.GPIO87=1;
EDIS;

puts("fd");
while(1)
{

if (GpioDataRegs.GPCDAT.bit.GPIO86==1)
{GpioDataRegs.GPCSET.bit.GPIO87=1;
}
else GpioDataRegs.GPCCLEAR.bit.GPIO87=1;

}

}

void delay_loop(void)
{
volatile long i;
for (i=0; i<1000000; ) {i=i+2;}
}

  • Hello Denys,

    The attached linker cmd file should fix your issue.

    Stephen

  • Hello Denys,

    I keep getting an error when I try to attach the file.  Please see linker cmd file contents below.

    Stephen

    MEMORY
    {
    PAGE 0 :
       /* BEGIN is used for the "boot to SARAM" bootloader mode      */
    
       BEGIN      : origin = 0x000000, length = 0x000002     /* Boot to M0 will go here                      */
       RAMM0M1    : origin = 0x000050, length = 0x0007B0
       RAMLALL    : origin = 0x008000, length = 0x010000
       ZONE7A     : origin = 0x200000, length = 0x00FC00    /* XINTF zone 7 - program space */
       CSM_RSVD   : origin = 0x33FF80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
       CSM_PWL    : origin = 0x33FFF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA            */
       ADC_CAL    : origin = 0x380080, length = 0x000009
       RESET      : origin = 0x3FFFC0, length = 0x000002
       IQTABLES   : origin = 0x3FE000, length = 0x000b50
       IQTABLES2  : origin = 0x3FEB50, length = 0x00008c
       FPUTABLES  : origin = 0x3FEBDC, length = 0x0006A0
       BOOTROM    : origin = 0x3FF27C, length = 0x000D44
    
    
    PAGE 1 :
       /* BOOT_RSVD is used by the boot ROM for stack.               */
       /* This section is only reserved to keep the BOOT ROM from    */
       /* corrupting this area during the debug process              */
    
       BOOT_RSVD  : origin = 0x000002, length = 0x00004E     /* Part of M0, BOOT rom will use this for stack */
       ZONE7B     : origin = 0x20FC00, length = 0x000400     /* XINTF zone 7 - data space */
    }
    
    
    SECTIONS
    {
       /* Setup for "boot to SARAM" mode:
          The codestart section (found in DSP28_CodeStartBranch.asm)
          re-directs execution to the start of user code.  */
       codestart        : > BEGIN,     PAGE = 0
       ramfuncs         : > RAMLALL,     PAGE = 0
       
    #ifdef __TI_COMPILER_VERSION
       #if __TI_COMPILER_VERSION >= 15009000
        .TI.ramfunc : {} > RAML0,      PAGE = 0
       #endif
    #endif    
       
       .text            : > RAMLALL,     PAGE = 0
       .cinit           : > RAMLALL,     PAGE = 0
       .pinit           : > RAMLALL,     PAGE = 0
       .switch          : > RAMLALL,     PAGE = 0
    
       .stack           : > RAMM0M1,     PAGE = 0
       .ebss            : > RAMLALL,     PAGE = 0
       .econst          : > RAMLALL,     PAGE = 0
       .esysmem         : > RAMLALL,     PAGE = 0
    
       IQmath           : > RAMLALL,     PAGE = 0
       IQmathTables     : > IQTABLES,    PAGE = 0, TYPE = NOLOAD
    
       /* Uncomment the section below if calling the IQNexp() or IQexp()
          functions from the IQMath.lib library in order to utilize the
          relevant IQ Math table in Boot ROM (This saves space and Boot ROM
          is 1 wait-state). If this section is not uncommented, IQmathTables2
          will be loaded into other memory (SARAM, Flash, etc.) and will take
          up space, but 0 wait-state is possible.
       */
       /*
       IQmathTables2    : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
       {
    
                  IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)
    
       }
       */
    
       FPUmathTables    : > FPUTABLES, PAGE = 0, TYPE = NOLOAD
    
       ZONE7DATA        : > ZONE7B,    PAGE = 1
    
       .reset           : > RESET,     PAGE = 0, TYPE = DSECT /* not used                    */
       csm_rsvd         : > CSM_RSVD   PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
       csmpasswds       : > CSM_PWL    PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
    
       /* Allocate ADC_cal function (pre-programmed by factory into TI reserved memory) */
       .adc_cal     : load = ADC_CAL,  PAGE = 0, TYPE = NOLOAD
    
    }
    

  • Hello,

    you cmd help me, but problem is still the same. i can not see any message on my screen when press button
    there are my screens of mistakes and warnings

  • Are you using the simulator?

  • firstly, i've changed cmd file, after debug it and resume
  • Are you trying to send the putc to the serial port? If you want to send the printf data to the serial port, you will have to redefine the putc() function. Create a file called putc.c and put a putc() function in it.  Also, make sure the putc.h file is listed above "${CG_TOOL_ROOT}/include" in the Include Options.

    Stephen

    Example:

    // The ComSend function is a function that sends the character to the serial port.
    int putc(int ch)
    {
    int ItemsSent;
       ItemsSent = ComSend(portname,ch);
       return ItemsSent; 
     }

  • If you are using CCSv5, you can select the "F283x CPU Cycle Accurate Simulator" as your target int the target configuration file (e.g. TMS320F28335.ccxml).

    The target simulator is not part of CCSv6.  However, you could port the simulator to CCSv6. Please see  e2e.ti.com/.../1827380

  • Also, did you enable CIO in your Debug Configuration:

    Stephen

  • Also, if you want to select a specific serial port, you should use fprintf and fputc.  A specific serial port is selected by setting the fd value of the FILE structure.

  • Change your command file to the following (I added.cio : > RAMALL, PAGE = 0)::

    MEMORY
    {
    PAGE 0 :
       /* BEGIN is used for the "boot to SARAM" bootloader mode      */
    
       BEGIN      : origin = 0x000000, length = 0x000002     /* Boot to M0 will go here                      */
       RAMM0M1      : origin = 0x000050, length = 0x0007B0
       RAMALL      : origin = 0x008000, length = 0x010000
       //RAML1      : origin = 0x009000, length = 0x001000
       //RAML2      : origin = 0x00A000, length = 0x001000
       //RAML3      : origin = 0x00B000, length = 0x001000
       ZONE7A     : origin = 0x200000, length = 0x00FC00    /* XINTF zone 7 - program space */
       CSM_RSVD   : origin = 0x33FF80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
       CSM_PWL    : origin = 0x33FFF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA            */
       ADC_CAL    : origin = 0x380080, length = 0x000009
       RESET      : origin = 0x3FFFC0, length = 0x000002
       IQTABLES   : origin = 0x3FE000, length = 0x000b50
       IQTABLES2  : origin = 0x3FEB50, length = 0x00008c
       FPUTABLES  : origin = 0x3FEBDC, length = 0x0006A0
       BOOTROM    : origin = 0x3FF27C, length = 0x000D44
    
    
    PAGE 1 :
       /* BOOT_RSVD is used by the boot ROM for stack.               */
       /* This section is only reserved to keep the BOOT ROM from    */
       /* corrupting this area during the debug process              */
    
       BOOT_RSVD  : origin = 0x000002, length = 0x00004E     /* Part of M0, BOOT rom will use this for stack */
       //RAMM1      : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
       //RAML4      : origin = 0x00C000, length = 0x001000
       //RAML5      : origin = 0x00D000, length = 0x001000
       //RAML6      : origin = 0x00E000, length = 0x001000
       //RAML7      : origin = 0x00F000, length = 0x001000
       ZONE7B     : origin = 0x20FC00, length = 0x000400     /* XINTF zone 7 - data space */
    }
    
    
    SECTIONS
    {
       /* Setup for "boot to SARAM" mode:
          The codestart section (found in DSP28_CodeStartBranch.asm)
          re-directs execution to the start of user code.  */
       codestart        : > BEGIN,     PAGE = 0
       ramfuncs         : > RAMALL,    PAGE = 0
       .text            : > RAMALL,    PAGE = 0
       .cinit           : > RAMALL,    PAGE = 0
       .pinit           : > RAMALL,    PAGE = 0
       .switch          : > RAMALL,    PAGE = 0
       .cio             : > RAMALL,    PAGE = 0
    
       .stack           : > RAMM0M1,   PAGE = 0
       .ebss            : > RAMALL,    PAGE = 0
       .econst          : > RAMALL,    PAGE = 0
       .esysmem         : > RAMALL,    PAGE = 0
    
       IQmath           : > RAMALL,    PAGE = 0
       IQmathTables     : > IQTABLES,  PAGE = 0, TYPE = NOLOAD
    
       /* Uncomment the section below if calling the IQNexp() or IQexp()
          functions from the IQMath.lib library in order to utilize the
          relevant IQ Math table in Boot ROM (This saves space and Boot ROM
          is 1 wait-state). If this section is not uncommented, IQmathTables2
          will be loaded into other memory (SARAM, Flash, etc.) and will take
          up space, but 0 wait-state is possible.
       */
       /*
       IQmathTables2    : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
       {
    
                  IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)
    
       }
       */
    
       FPUmathTables    : > FPUTABLES, PAGE = 0, TYPE = NOLOAD
    
       //DMARAML4         : > RAML4,     PAGE = 1
       //DMARAML5         : > RAML5,     PAGE = 1
      // DMARAML6         : > RAML6,     PAGE = 1
       //DMARAML7         : > RAML7,     PAGE = 1
    
       ZONE7DATA        : > ZONE7B,    PAGE = 1
    
       .reset           : > RESET,     PAGE = 0, TYPE = DSECT /* not used                    */
       csm_rsvd         : > CSM_RSVD   PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
       csmpasswds       : > CSM_PWL    PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
    
       /* Allocate ADC_cal function (pre-programmed by factory into TI reserved memory) */
       .adc_cal     : load = ADC_CAL,   PAGE = 0, TYPE = NOLOAD
    
    }

  • Hello Denys,

    Did my post fix your problem? If so, please select verify.

    Thanks,
    Stephen
  • Last cmdcode is correct. everything is working. only small warning is occured.