/****************************************************************************/
/*  DM8148.cmd                                                              */
/*  Copyright (c) 2012  Texas Instruments Incorporated                      */
/*  Author: Rafael de Souza                                                 */
/*                                                                          */
/*    Description: This file is a sample linker command file that can be    */
/*                 used for linking programs built with the C compiler and  */
/*                 running the resulting .out file on a DM8148.             */
/*                 Use it as a guideline.  You will want to                 */
/*                 change the memory layout to match your specific          */
/*                 target system.  You may want to change the allocation    */
/*                 scheme according to the size of your program.            */
/*                                                                          */
/****************************************************************************/

MEMORY
{

    ARMRAM:       o = 0x402F0400  l = 0x0000FC00  /* 64kB ARM RAM */
    L3OCMC0:      o = 0x40300000  l = 0x00020000  /* 128kB L3 OCMC SRAM */
    DSPSHL2RAM:   o = 0x40800000  l = 0x00040000  /* 256kB Shared DSP L2 RAM */
    DSPSHL1PRAM:  o = 0x40E00000  l = 0x00008000  /* 32kB Shared DSP L1 Program RAM */
    DSPSHL1DRAM:  o = 0x40F00000  l = 0x00008000  /* 32kB Shared DSP L1 Data RAM */
//    DDR0:         o = 0x9A000000  l = 0x2000000  /* 1GB external DDR Bank 0 */
    DDR1:         o = 0xC0000000  l = 0x40000000  /* 1GB external DDR Bank 1 */
 //  M3RAM:        o = 0x55021000  l = 0x000F000  /* 64kB M3 RAM */
    IRAM_MEM:     org = 0x55020000 len = 0x00001000  /* RAM */
   M3RAM:        o = 0x9AF01000  l = 0x0F00000  /* 15M M3 RAM */
 //   IRAM_MEM:     org = 0 len = 0x00001000  /* RAM */
}

SECTIONS
{
	.intvecs 	 > IRAM_MEM
    .text          >  M3RAM
    .stack         >  M3RAM
    .bss           >  M3RAM
    .cio           >  M3RAM
    .const         >  M3RAM
    .data          >  M3RAM
    .switch        >  M3RAM
    .sysmem        >  M3RAM
    .far           >  M3RAM
    .args          >  M3RAM
    .ppinfo        >  M3RAM
    .ppdata        >  M3RAM
  
    /* TI-ABI or COFF sections */
    .pinit         >  M3RAM
    .cinit         >  M3RAM
  
    /* EABI sections */
    .binit         >  M3RAM
    .init_array    >  M3RAM
    .neardata      >  M3RAM
    .fardata       >  M3RAM
    .rodata        >  M3RAM

}
