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.

you will need to write Flash code to initialize ram memory.

Other Parts Discussed in Thread: CCSTUDIO, TMS320F2810

HI

I'm new to CCStudio and Firmware industry as well. I use tms320f2810, Ethernet daughter card - eZdsk.91C111 and some other peripherals also. my project is working as expected in ram mode. when i load the project into flash it gives the following warning and nothing was working.

"Because of this contains initialized ram data it may run successfully under code composer studio but not as a stand alone system."
"If your Flash program requieres initialized data in ram,you will need to write Flash code to initialize ram memory."

In my project i'm using two .cmd files. 1 for f2810 and other 1 was given by Ethernet daughter card - eZdsk.91C111manufacturer. I'm not sure that weather we can use several .cmd files into 1 project. these are those 2 files.

 

1. Ethernet daughter card - eZdsk.91C111manufacturer's .cmd file


MEMORY
{
 
   PAGE 0 : RESET(R)    : origin = 0x000000, length = 0x2
   PAGE 0 : L1RAM(R)    : origin = 0x009000, length = 0x1000
   PAGE 0 : POFFCHIP(R) : origin = 0x100000, length = 0x8000
   PAGE 0 : BEGIN       : origin = 0x3F8000, length = 0x00002
   PAGE 0 : BOOT(R)     : origin = 0x3f8002, length = 0x7E
   PAGE 0 : PROG(R)     : origin = 0x3f8080, length = 0x1f80
   PAGE 1 : XINTF1      : origin = 0x004000, length = 0x2000
   PAGE 1 : XINTF2(RW)  : origin = 0x080000, length = 0x80000
   PAGE 1 : OFFCHIP(RW) : origin = 0x108000, length = 0x8000
   PAGE 1 : OTP(RW)     : origin = 0x3d7800, length = 0x800
   PAGE 1 : XINTF7(RW)  : origin = 0x3fc000, length = 0x4000 /* MPNMC =1 */
}
 
SECTIONS
{
 
   .boot        : > BOOT,     PAGE = 0
   {
      -lrts2800_ml.lib<boot.obj> (.text)
   }
   
 
   .nettextfast : > POFFCHIP, PAGE = 0 /* fast netlib code               */
   .nettextslow : > POFFCHIP, PAGE = 0 /* slow netlib code               */
   .switch      : > POFFCHIP, PAGE = 0
   .const       : > OFFCHIP,  PAGE = 1
   .bss         : > OFFCHIP,  PAGE = 1
   .cio         : > OFFCHIP,  PAGE = 1
 
   .sysmem      : > OFFCHIP,  PAGE = 1
}

 

2.f2810 .cmd file


MEMORY
{
PAGE 0:    /* Program Memory */
           /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */

   ZONE0       : origin = 0x002000, length = 0x002000     /* XINTF zone 0 */
   ZONE1       : origin = 0x004000, length = 0x002000     /* XINTF zone 1 */
   RAML0       : origin = 0x008000, length = 0x001000     /* on-chip RAM block L0 */
   ZONE2       : origin = 0x080000, length = 0x080000     /* XINTF zone 2 */
 /*  ZONE6       : origin = 0x100000, length = 0x080000     /* XINTF zone 6 */   
   OTP         : origin = 0x3D7800, length = 0x000800     /* on-chip OTP */
   FLASHJ      : origin = 0x3D8000, length = 0x002000     /* on-chip FLASH */
   FLASHI      : origin = 0x3DA000, length = 0x002000     /* on-chip FLASH */
   FLASHH      : origin = 0x3DC000, length = 0x004000     /* on-chip FLASH */
   FLASHG      : origin = 0x3E0000, length = 0x004000     /* on-chip FLASH */
   FLASHF      : origin = 0x3E4000, length = 0x004000     /* on-chip FLASH */  
 
   FLASHE      : origin = 0x3E8000, length = 0x006400     /* on-chip FLASH */
   FLASHD      : origin = 0x3EE400, length = 0x001C00     /* on-chip FLASH */
   FLASHC      : origin = 0x3F0000, length = 0x004000     /* on-chip FLASH */
   FLASHA      : origin = 0x3F6000, length = 0x001F80     /* on-chip FLASH */
   CSM_RSVD    : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
   BEGIN       : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
   CSM_PWL     : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */
  
/* ZONE7       : origin = 0x3FC000, length = 0x003FC0     /* XINTF zone 7 available if MP/MCn=1 */
   ROM         : origin = 0x3FF000, length = 0x000FC0     /* Boot ROM available if MP/MCn=0 */
   RESET       : origin = 0x3FFFC0, length = 0x000002     /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
   VECTORS     : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */

PAGE 1 :  
   RAMM0       : origin = 0x000000, length = 0x000400     /* on-chip RAM block M0 */
   RAMM1       : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
   RAML1       : origin = 0x009000, length = 0x0020E4     /* on-chip RAM block L1 */
   FLASHB      : origin = 0x3F4000, length = 0x002000     /* on-chip FLASH */
   RAMH0       : origin = 0x3F8000, length = 0x002000     /* on-chip RAM block H0 */
}
 
SECTIONS
{

   .cinit              : > FLASHC      PAGE = 0  
   .pinit              : > FLASHA,     PAGE = 0
   /*.text               : > FLASHA      PAGE = 0*/
   .text               : > FLASHE      PAGE = 0

   codestart           : > BEGIN       PAGE = 0
   ramfuncs            : LOAD = FLASHD,
                         RUN = RAML0,
                         LOAD_START(_RamfuncsLoadStart),
                         LOAD_END(_RamfuncsLoadEnd),
                         RUN_START(_RamfuncsRunStart),
                         PAGE = 0

   csmpasswds          : > CSM_PWL     PAGE = 0
   csm_rsvd            : > CSM_RSVD    PAGE = 0
  
   /* Allocate uninitalized data sections: */
   .stack              : > RAMM0       PAGE = 1
   .ebss               : > RAML1       PAGE = 1
   .esysmem            : > RAMH0       PAGE = 1
   .econst             : > FLASHB      PAGE = 1
      

   /* Allocate IQ math areas: */
   IQmath              : > FLASHC      PAGE = 0                  /* Math Code */
   IQmathTables        : > ROM         PAGE = 0, TYPE = NOLOAD   /* Math Tables In ROM */
   .reset              : > RESET,      PAGE = 0, TYPE = DSECT
   vectors             : > VECTORS     PAGE = 0, TYPE = DSECT

}

what should i have to do to over come this issue?

 

Thank you

sumraj

  • Hi Sumraj,

     

    I am not familar with the Ethernet daughter card you describe, but I can suggest a couple things that should help you.

    • Since you are using the 2810,start using only the f2810.cmd file
      • You will need to change the f2810 to include the sections in the "eZdsk.91C111manufacturer's .cmd " that the ethernet code is using

       .nettextfast : > POFFCHIP, PAGE = 0 /* fast netlib code               */
       .nettextslow : > POFFCHIP, PAGE = 0 /* slow netlib code               */

    1.  
      • Move these sections to FLASH

       .nettextfast : > FLASHC, PAGE = 0 /* fast netlib code               */
       .nettextslow : > FLASHC, PAGE = 0 /* slow netlib code               */

    • If you want to run some of the code from RAM to improve the execution speed of that section of code, load that section into flash and run from RAM.
      • Comment out the FLASHC load

    /*   .nettextfast : > FLASHC, PAGE = 0 /* fast netlib code               */

    •  
      • Use the RAMFUNCs structure that already exists. 

       ramfuncs            : LOAD = FLASHD,
                             RUN = RAML0,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart),
                             PAGE = 0

    •  
      • I am not sure of the function names that come with the ethernet package that you are using, but you will need to add a line of code to identify the "fast netlib code" to be placed in the Ramfuncs section.  You can see examples of loading code in flash and running from RAM by looking at the 281x flash example code.  Here's the default installation address: "C:\tidcs\c28\dsp281x\v100\DSP281x_examples\flash\Example_281xFlash.c".

    // Functions that will be run from RAM need to be assigned to
    // a different section.  This section will then be mapped using
    // the linker cmd file.
    #pragma CODE_SECTION(fast_netlib_func, "ramfuncs");

     

  • Hi

    thank you Jeff Stafford. But still i have issue. I couldn't able to solve it.

    my actual problems is explained here. Even they have answer there i couldn't understand. could any one guide me to link sections to the flash memory?


    Thank you

    regards,

    Sumraj