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.

C55xx Loader problem for C5515 eZdsp

Hi.

When I compile and link my code it all goes well. But when I load it I get the following error:

C55xx: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.

 

The main sections from the memory map are the following:

         name            origin    length      used     unused   attr    fill
                        (bytes)   (bytes)    (bytes)   (bytes)
----------------------  --------  ---------  --------  --------  ----  --------
PAGE 0:
  MMR                   00000000   000000c0  00000000  000000c0  RWIX
  DARAM0                000000c0   0000ff40  00007cf4  0000824c  RWIX
  SARAM0                00010000   00010000  00000000  00010000  RWIX
  SARAM1                00020000   00020000  00004451  0001bbaf  RWIX
  SARAM2                00040000   00010000  0000067e  0000f982  RWIX
  PDROM                 00fe0000   0001ff00  00000000  0001ff00  R IX
  VECS                  00ffff00   00000100  00000100  00000000  R IX

PAGE 2:
  IOPORT                00000000   00020000  00000000  00020000  RWI

 

My .cmd file is:

-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 = 0x010000  /*  64KB */

  PDROM  (RIX) : origin = 0xFE0000, length = 0x01FF00  /* Internal PDROM */
  VECS   (RIX) : origin = 0xFFFF00, length = 0x000100  /* 256B int vec   */

 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 */
}

 

What am I doing wrong? Thanks for all your help.

Andreas