/******************************************************************************/ /* LNKX.CMD - COMMAND FILE FOR LINKING C PROGRAMS IN LARGE/HUGE MEMORY MODEL */ /* */ /* Usage: */ /* cl55 -z -o -m lnkx.cmd -l */ /* */ /* Description: This file is a sample command file that can be used for */ /* linking programs built with the C Compiler. Use it as a */ /* guideline; you may want to change the allocation scheme */ /* according to the size of your program and the memory layout */ /* of your target system. */ /* */ /* Notes: (1) You must specify the directory in which is */ /* located. Either add a "-i" line to this file */ /* file, or use the system environment variable C55X_C_DIR to */ /* specify a search path for the libraries. */ /* */ /******************************************************************************/ -stack 0x2000 /* Primary stack size */ -sysstack 0x1000 /* Secondary stack size */ -heap 0x3000 /* 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 = 0x001f40 DARAM1 (RWIX): origin = 0x002000, length = 0x002000 DARAM2 (RWIX): origin = 0x004000, length = 0x002000 DARAM3 (RWIX): origin = 0x006000, length = 0x00A000 SARAM0 (RWIX): origin = 0x010000, length = 0x010000 /* 64KB */ SARAM1 (RWIX): origin = 0x020000, length = 0x020000 /* 128KB */ SARAM2 (RWIX): origin = 0x040000, length = 0x00E000 /* 57344B*/ SARAM3 (RWIX): origin = 0x04E000, length = 0x001E00 /* 7680B */ VECS (RWIX): origin = 0x04FE00, length = 0x000200 /* 512B */ PDROM (RIX): origin = 0xff8000, length = 0x008000 /* 32KB */ 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 > DARAM3 /* Primary system stack */ .sysstack > DARAM3 /* 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 > DARAM3 /* Interrupt vectors */ .ioport > IOPORT PAGE 2 /* Global & static ioport vars */ context : > DARAM3 align=4 i2s_rcv_L : > DARAM3 align = 128 i2s_rcv_R : > DARAM3 align = 128 intvec : > DARAM3 ALIGN = 256 inbuffer : > DARAM3 align = 4 /* Memory Section requirement for Environment Sensor*/ amdf_circ_buffer > DARAM1 // The Bit-Reverse destination buffer data_br_buf requires an address with // at least 4+log2(FFT_LENGTH) least significant binary zeros FilterIn : > DARAM0 align = 4096 xip_freq_dom :> DARAM3 align = 4 RcvL1 : > DARAM3 RcvL2 : > DARAM3 RcvL3 : > DARAM3 RcvL4 : > DARAM3 RcvL5 : > DARAM1 Filter_RE : > DARAM3 RcvR1 : > DARAM2 RcvR2 : > DARAM2 RcvR3 : > DARAM2 RcvR4 : > DARAM2 RcvR5 : > DARAM2 OverlapL : > DARAM0 OverlapR : > DARAM0 XmitL1 : > DARAM3 XmitL2 : > DARAM3 XmitR1 : > DARAM1 XmitR2 : > DARAM1 }