/* --COPYRIGHT--,BSD * Copyright (c) $(CPYYEAR), Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --/COPYRIGHT--*/ /* * ======== TMS320C28346.cmd ======== * Define the memory block start/length for the C28346 * *! Revision History *! ================ *! 26-May-2011 jv created to support c28 generic platform. */ /* * PAGE 0 will be used to organize program sections * PAGE 1 will be used to organize data sections * * Notes: * Memory blocks on C28346 are uniform (ie same * physical memory) in both PAGE 0 and PAGE 1. * That is the same memory region should not be * defined for both PAGE 0 and PAGE 1. * Doing so will result in corruption of program * and/or data. */ MEMORY { PAGE 0 : /* Program Memory */ /* BEGIN is used for the "boot to SARAM" bootloader mode */ BEGIN : origin = 0x000000, length = 0x000002 /* Boot to M0 will go here */ H05SARAM : origin = 0x300000, length = 0x030000 /* on-chip RAM block H0-H5 */ CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Reserved - for compatibility to legacy C28x designs. */ CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* 128-bit password locations */ IQTABLES : origin = 0x3FE000, length = 0x000b50 IQTABLES2 : origin = 0x3FEB50, length = 0x00008c FPUTABLES : origin = 0x3FEBDC, length = 0x0006A0 BOOTROM : origin = 0x3FF27C, length = 0x000D44 RESET : origin = 0x3FFFC0, length = 0x000002 EXT7P0 : origin = 0x200000, length = 0x030000 //L0SARAM : origin = 0x008000, length = 0x002000 /* on-chip RAM block L0 for fastfunc not used anymore no only 1% faster*/ PAGE 1 : M01SARAM : origin = 0x000002, length = 0x0007FE /* on-chip RAM block M0, M1 */ PIEVECT : origin = 0xD00, length = 0x100 L03SARAM : origin = 0x008000, length = 0x08000 /* on-chip RAM block L0-L3, also used by bootloader, do not put initilized data here, can be used for stack*/ L47SARAM : origin = 0x010000, length = 0x08000 /* on-chip RAM block L4-L7, also used by bootloader, do not put initilized data here*/ EXT7SARAM : origin = 0x230000, length = 0x0D0000 /* external SRAM 65535 *16 bits*/ SDRAMP1 : origin = 0x180000, length = 0x080000 /* external SDRAM on FPGA*/ } /* * Allocate sections to memory blocks. * Note: * codestart user defined section in DSP28_CodeStartBranch.asm * used to redirect code execution when booting to flash */ /* Table 4-1. Initialized Sections Created by the Compiler Name Contents Restrictions .cinit Tables for explicitly initialized global and static variables Program .const Global and static const variables that are explicitly Low 64K initialized and contain string literals .econst Far constant variables Anywhere in data .pinit Table of constructors to be called at startup Program .switch Jump tables for large switch statements Program with -mt option Data without -mt option .text Executable code and constants Program Table 4-2. Uninitialized Sections Created by the Compiler Name Contents Restrictions .bss Global and static variables Low 64K .ebss Far global/static variables Anywhere in data .stack Stack Low 64K .sysmem Memory for malloc functions (heap) Low 64K .esysmem Memory for far_malloc functions Anywhere in data */ SECTIONS { /* Allocate program areas: */ // myUFFS : { uffs* (*)} > EXT7SARAM PAGE = 1 //myXML : { rapidxml*.obj (*) TestFile*.obj (*) Xml*.obj (*)} > EXT7SARAM PAGE = 1 .FbDpRamBuffers : > EXT7SARAM PAGE = 1 CamBuffer : > EXT7SARAM PAGE = 1 .SlowSdRam : > SDRAMP1 PAGE = 1 TraceBuffer : > SDRAMP1 PAGE = 1 /* Used before external RAM is initialised. */ .EarlyFuncs : { halXIntfDsp28x.obj(.text) } > H05SARAM PAGE = 0 .ExtRamFuncs : { /*Put this functions to slower external RAM*/ ServoDriveInit.obj(.text .econst) Xml*.obj(.text .econst) uffs_*.obj(.text .econst) CamXmlImport.obj(.text .econst) CCamActionFactory.obj(.text .econst) CCamExitIdFactory.obj(.text .econst) ErrorHistory.obj(.text .econst) UsageState.obj(.text .econst) *CamBuilder.obj(.text .econst) *CamFactory*.obj(.text .econst) CamComponentBuilder.obj(.text .econst) aes.obj(.text .econst) ConfigParam*.obj(.text .econst) AesFileEncryption.obj(.text .econst) /* All .init() methods. */ *.obj(.text:_init__*) } > EXT7P0 PAGE = 0 .SlowSdFuncs > EXT7P0 PAGE = 0 .cinit : > EXT7P0 PAGE = 0 .pinit : > H05SARAM PAGE = 0 .text : > H05SARAM PAGE = 0 ramfuncs : > H05SARAM PAGE = 0 codestart : > H05SARAM PAGE = 0 csmpasswds : > CSM_PWL PAGE = 0 csm_rsvd : > CSM_RSVD PAGE = 0 /* Initalized sections */ //.econst : > H05SARAM PAGE = 0 .econst : > EXT7P0 PAGE = 0 .switch : > H05SARAM PAGE = 0 // .args : > H05SARAM PAGE = 0 .ExtRam : { /*Put this functions to slower external RAM*/ Xml*.obj(.ebss) uffs_*.obj(.ebss) uffsConfigSpi.obj (.ebss) CamXmlImport.obj(.ebss) ErrorHistory.obj(.ebss) *CamBuilder.obj(.ebss) *CamFactory*.obj(.ebss) aes.obj(.ebss) AmaMode.obj(.ebss) ConfigParam*.obj(.ebss) AesFileEncryption.obj(.ebss) //app_p28FP.o28FP (.ebss) } > EXT7SARAM PAGE = 1 BIOS_DEBUG_LOGGER : > EXT7SARAM PAGE = 1 BIOS_DEBUG : > EXT7SARAM PAGE = 1 /* * Allocate data sections: */ /* Assign fast internal RAM to the stacks. */ .taskStack : > L03SARAM PAGE = 1 .stack : > M01SARAM PAGE = 1 /* General globals/statics gets the leftovers. */ .ebss : >> L03SARAM | M01SARAM | L47SARAM PAGE = 1 /* Heap (far_malloc). */ .esysmem : > L47SARAM PAGE = 1 /* C I/O buffers, e.g. for printf(), small but not used after init. */ .cio : > EXT7SARAM PAGE = 1 /* Specific globals/statics. */ .sysHeap : > L47SARAM PAGE = 1 .PatternBuffers : > L47SARAM PAGE = 1 .ObjDict : > L47SARAM PAGE = 1 /* Global/static too big for internal memory. */ .UFFSTab : > EXT7SARAM PAGE = 1 /* Allocate IQ math areas: */ IQmath : > H05SARAM 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 (IQmathTablesRam) } */ FPUmathTables : > FPUTABLES PAGE = 0, TYPE = NOLOAD }