// File: 16lf18857_g.lkr
// Generic linker script for the PIC16LF18857 processor

LIBPATH .

CODEPAGE   NAME=page0      START=0x0               END=0x1FFF                   
CODEPAGE   NAME=.idlocs    START=0x8000            END=0x8003         PROTECTED 
CODEPAGE   NAME=.devid     START=0x8006            END=0x8006         PROTECTED 
CODEPAGE   NAME=.config    START=0x8007            END=0x800B         PROTECTED 
CODEPAGE   NAME=flashdata  START=0xF000            END=0xF0FF         PROTECTED 

LINEARMEM  NAME=linear0    START=0x2000            END=0x31CF         PROTECTED

DATABANK   NAME=sfr0       START=0x0               END=0x1F           PROTECTED
DATABANK   NAME=sfr1       START=0x80              END=0x9F           PROTECTED
DATABANK   NAME=sfr2       START=0x100             END=0x11F          PROTECTED
DATABANK   NAME=sfr3       START=0x180             END=0x19F          PROTECTED
DATABANK   NAME=sfr4       START=0x200             END=0x21F          PROTECTED
DATABANK   NAME=sfr5       START=0x280             END=0x29F          PROTECTED
DATABANK   NAME=sfr6       START=0x300             END=0x31F          PROTECTED
DATABANK   NAME=sfr7       START=0x380             END=0x39F          PROTECTED
DATABANK   NAME=sfr8       START=0x400             END=0x41F          PROTECTED
DATABANK   NAME=sfr9       START=0x480             END=0x49F          PROTECTED
DATABANK   NAME=sfr10      START=0x500             END=0x51F          PROTECTED
DATABANK   NAME=sfr11      START=0x580             END=0x59F          PROTECTED
DATABANK   NAME=sfr12      START=0x600             END=0x61F          PROTECTED
DATABANK   NAME=sfr13      START=0x680             END=0x69F          PROTECTED
DATABANK   NAME=sfr14      START=0x700             END=0x71F          PROTECTED
DATABANK   NAME=sfr15      START=0x780             END=0x79F          PROTECTED
DATABANK   NAME=sfr16      START=0x800             END=0x81F          PROTECTED
DATABANK   NAME=sfr17      START=0x880             END=0x89F          PROTECTED
DATABANK   NAME=sfr18      START=0x900             END=0x91F          PROTECTED
DATABANK   NAME=sfr19      START=0x980             END=0x99F          PROTECTED
DATABANK   NAME=sfr20      START=0xA00             END=0xA1F          PROTECTED
DATABANK   NAME=sfr21      START=0xA80             END=0xA9F          PROTECTED
DATABANK   NAME=sfr22      START=0xB00             END=0xB1F          PROTECTED
DATABANK   NAME=sfr23      START=0xB80             END=0xB9F          PROTECTED
DATABANK   NAME=sfr24      START=0xC00             END=0xC1F          PROTECTED
DATABANK   NAME=sfr25      START=0xC80             END=0xC9F          PROTECTED
DATABANK   NAME=sfr26      START=0xD00             END=0xD1F          PROTECTED
DATABANK   NAME=sfr27      START=0xD80             END=0xD9F          PROTECTED
DATABANK   NAME=sfr28      START=0xE00             END=0xE1F          PROTECTED
DATABANK   NAME=sfr29      START=0xE80             END=0xE9F          PROTECTED
DATABANK   NAME=sfr30      START=0xF00             END=0xF1F          PROTECTED
DATABANK   NAME=sfr31      START=0xF80             END=0xF9F          PROTECTED
DATABANK   NAME=sfr32      START=0x1000            END=0x101F         PROTECTED
DATABANK   NAME=sfr33      START=0x1080            END=0x109F         PROTECTED
DATABANK   NAME=sfr34      START=0x1100            END=0x111F         PROTECTED
DATABANK   NAME=sfr35      START=0x1180            END=0x119F         PROTECTED
DATABANK   NAME=sfr36      START=0x1200            END=0x121F         PROTECTED
DATABANK   NAME=sfr37      START=0x1280            END=0x129F         PROTECTED
DATABANK   NAME=sfr38      START=0x1300            END=0x131F         PROTECTED
DATABANK   NAME=sfr39      START=0x1380            END=0x139F         PROTECTED
DATABANK   NAME=sfr40      START=0x1400            END=0x141F         PROTECTED
DATABANK   NAME=sfr41      START=0x1480            END=0x149F         PROTECTED
DATABANK   NAME=sfr42      START=0x1500            END=0x151F         PROTECTED
DATABANK   NAME=sfr43      START=0x1580            END=0x159F         PROTECTED
DATABANK   NAME=sfr44      START=0x1600            END=0x161F         PROTECTED
DATABANK   NAME=sfr45      START=0x1680            END=0x169F         PROTECTED
DATABANK   NAME=sfr46      START=0x1700            END=0x171F         PROTECTED
DATABANK   NAME=sfr47      START=0x1780            END=0x179F         PROTECTED
DATABANK   NAME=sfr48      START=0x1800            END=0x181F         PROTECTED
DATABANK   NAME=sfr49      START=0x1880            END=0x189F         PROTECTED
DATABANK   NAME=sfr50      START=0x1900            END=0x191F         PROTECTED
DATABANK   NAME=sfr51      START=0x1980            END=0x199F         PROTECTED
DATABANK   NAME=sfr52      START=0x1A00            END=0x1A1F         PROTECTED
DATABANK   NAME=sfr53      START=0x1A80            END=0x1A9F         PROTECTED
DATABANK   NAME=sfr54      START=0x1B00            END=0x1B1F         PROTECTED
DATABANK   NAME=sfr55      START=0x1B80            END=0x1B9F         PROTECTED
DATABANK   NAME=sfr56      START=0x1C00            END=0x1C1F         PROTECTED
DATABANK   NAME=sfr57      START=0x1C80            END=0x1C9F         PROTECTED
DATABANK   NAME=sfr58      START=0x1D00            END=0x1D1F         PROTECTED
DATABANK   NAME=sfr59      START=0x1D80            END=0x1D9F         PROTECTED
DATABANK   NAME=sfr60      START=0x1E00            END=0x1E6F         PROTECTED
DATABANK   NAME=sfr61      START=0x1E80            END=0x1EEF         PROTECTED
DATABANK   NAME=sfr62      START=0x1F00            END=0x1F6F         PROTECTED
DATABANK   NAME=sfr63      START=0x1F80            END=0x1FEF         PROTECTED

DATABANK   NAME=gpr0       START=0x20              END=0x6F           SHADOW=linear0:0x2000
DATABANK   NAME=gpr1       START=0xA0              END=0xEF           SHADOW=linear0:0x2050
DATABANK   NAME=gpr2       START=0x120             END=0x16F          SHADOW=linear0:0x20A0
DATABANK   NAME=gpr3       START=0x1A0             END=0x1EF          SHADOW=linear0:0x20F0
DATABANK   NAME=gpr4       START=0x220             END=0x26F          SHADOW=linear0:0x2140
DATABANK   NAME=gpr5       START=0x2A0             END=0x2EF          SHADOW=linear0:0x2190
DATABANK   NAME=gpr6       START=0x320             END=0x36F          SHADOW=linear0:0x21E0
DATABANK   NAME=gpr7       START=0x3A0             END=0x3EF          SHADOW=linear0:0x2230
DATABANK   NAME=gpr8       START=0x420             END=0x46F          SHADOW=linear0:0x2280
DATABANK   NAME=gpr9       START=0x4A0             END=0x4EF          SHADOW=linear0:0x22D0
DATABANK   NAME=gpr10      START=0x520             END=0x56F          SHADOW=linear0:0x2320
DATABANK   NAME=gpr11      START=0x5A0             END=0x5EF          SHADOW=linear0:0x2370
DATABANK   NAME=gpr12      START=0x620             END=0x64F          SHADOW=linear0:0x23C0
DATABANK   NAME=gpr13      START=0x6A0             END=0x6EF          SHADOW=linear0:0x23F0
DATABANK   NAME=gpr14      START=0x720             END=0x76F          SHADOW=linear0:0x2440
DATABANK   NAME=gpr15      START=0x7A0             END=0x7EF          SHADOW=linear0:0x2490
DATABANK   NAME=gpr16      START=0x820             END=0x86F          SHADOW=linear0:0x24E0
DATABANK   NAME=gpr17      START=0x8A0             END=0x8EF          SHADOW=linear0:0x2530
DATABANK   NAME=gpr18      START=0x920             END=0x96F          SHADOW=linear0:0x2580
DATABANK   NAME=gpr19      START=0x9A0             END=0x9EF          SHADOW=linear0:0x25D0
DATABANK   NAME=gpr20      START=0xA20             END=0xA6F          SHADOW=linear0:0x2620
DATABANK   NAME=gpr21      START=0xAA0             END=0xAEF          SHADOW=linear0:0x2670
DATABANK   NAME=gpr22      START=0xB20             END=0xB6F          SHADOW=linear0:0x26C0
DATABANK   NAME=gpr23      START=0xBA0             END=0xBEF          SHADOW=linear0:0x2710
DATABANK   NAME=gpr24      START=0xC20             END=0xC6F          SHADOW=linear0:0x2760
DATABANK   NAME=gpr25      START=0xCA0             END=0xCEF          SHADOW=linear0:0x27B0
DATABANK   NAME=gpr26      START=0xD20             END=0xD6F          SHADOW=linear0:0x2800
DATABANK   NAME=gpr27      START=0xDA0             END=0xDEF          SHADOW=linear0:0x2850
DATABANK   NAME=gpr28      START=0xE20             END=0xE6F          SHADOW=linear0:0x28A0
DATABANK   NAME=gpr29      START=0xEA0             END=0xEEF          SHADOW=linear0:0x28F0
DATABANK   NAME=gpr30      START=0xF20             END=0xF6F          SHADOW=linear0:0x2940
DATABANK   NAME=gpr31      START=0xFA0             END=0xFEF          SHADOW=linear0:0x2990
DATABANK   NAME=gpr32      START=0x1020            END=0x106F         SHADOW=linear0:0x29E0
DATABANK   NAME=gpr32s     START=0x1070            END=0x107F         SHADOW=linear0:0x2A30
DATABANK   NAME=gpr33      START=0x10A0            END=0x10EF         SHADOW=linear0:0x2A40
DATABANK   NAME=gpr33s     START=0x10F0            END=0x10FF         SHADOW=linear0:0x2A90
DATABANK   NAME=gpr34      START=0x1120            END=0x116F         SHADOW=linear0:0x2AA0
DATABANK   NAME=gpr34s     START=0x1170            END=0x117F         SHADOW=linear0:0x2AF0
DATABANK   NAME=gpr35      START=0x11A0            END=0x11EF         SHADOW=linear0:0x2B00
DATABANK   NAME=gpr35s     START=0x11F0            END=0x11FF         SHADOW=linear0:0x2B50
DATABANK   NAME=gpr36      START=0x1220            END=0x126F         SHADOW=linear0:0x2B60
DATABANK   NAME=gpr36s     START=0x1270            END=0x127F         SHADOW=linear0:0x2BB0
DATABANK   NAME=gpr37      START=0x12A0            END=0x12EF         SHADOW=linear0:0x2BC0
DATABANK   NAME=gpr37s     START=0x12F0            END=0x12FF         SHADOW=linear0:0x2C10
DATABANK   NAME=gpr38      START=0x1320            END=0x136F         SHADOW=linear0:0x2C20
DATABANK   NAME=gpr38s     START=0x1370            END=0x137F         SHADOW=linear0:0x2C70
DATABANK   NAME=gpr39      START=0x13A0            END=0x13EF         SHADOW=linear0:0x2C80
DATABANK   NAME=gpr39s     START=0x13F0            END=0x13FF         SHADOW=linear0:0x2CD0
DATABANK   NAME=gpr40      START=0x1420            END=0x146F         SHADOW=linear0:0x2CE0
DATABANK   NAME=gpr40s     START=0x1470            END=0x147F         SHADOW=linear0:0x2D30
DATABANK   NAME=gpr41      START=0x14A0            END=0x14EF         SHADOW=linear0:0x2D40
DATABANK   NAME=gpr41s     START=0x14F0            END=0x14FF         SHADOW=linear0:0x2D90
DATABANK   NAME=gpr42      START=0x1520            END=0x156F         SHADOW=linear0:0x2DA0
DATABANK   NAME=gpr42s     START=0x1570            END=0x157F         SHADOW=linear0:0x2DF0
DATABANK   NAME=gpr43      START=0x15A0            END=0x15EF         SHADOW=linear0:0x2E00
DATABANK   NAME=gpr43s     START=0x15F0            END=0x15FF         SHADOW=linear0:0x2E50
DATABANK   NAME=gpr44      START=0x1620            END=0x166F         SHADOW=linear0:0x2E60
DATABANK   NAME=gpr44s     START=0x1670            END=0x167F         SHADOW=linear0:0x2EB0
DATABANK   NAME=gpr45      START=0x16A0            END=0x16EF         SHADOW=linear0:0x2EC0
DATABANK   NAME=gpr45s     START=0x16F0            END=0x16FF         SHADOW=linear0:0x2F10
DATABANK   NAME=gpr46      START=0x1720            END=0x176F         SHADOW=linear0:0x2F20
DATABANK   NAME=gpr46s     START=0x1770            END=0x177F         SHADOW=linear0:0x2F70
DATABANK   NAME=gpr47      START=0x17A0            END=0x17EF         SHADOW=linear0:0x2F80
DATABANK   NAME=gpr47s     START=0x17F0            END=0x17FF         SHADOW=linear0:0x2FD0
DATABANK   NAME=gpr48      START=0x1820            END=0x186F         SHADOW=linear0:0x2FE0
DATABANK   NAME=gpr48s     START=0x1870            END=0x187F         SHADOW=linear0:0x3030
DATABANK   NAME=gpr49      START=0x18A0            END=0x18EF         SHADOW=linear0:0x3040
DATABANK   NAME=gpr49s     START=0x18F0            END=0x18FF         SHADOW=linear0:0x3090
DATABANK   NAME=gpr50      START=0x1920            END=0x196F         SHADOW=linear0:0x30A0
DATABANK   NAME=gpr50s     START=0x1970            END=0x197F         SHADOW=linear0:0x30F0
DATABANK   NAME=gpr51s     START=0x19F0            END=0x19FF         SHADOW=linear0:0x3100
DATABANK   NAME=gpr52s     START=0x1A70            END=0x1A7F         SHADOW=linear0:0x3110
DATABANK   NAME=gpr53s     START=0x1AF0            END=0x1AFF         SHADOW=linear0:0x3120
DATABANK   NAME=gpr54s     START=0x1B70            END=0x1B7F         SHADOW=linear0:0x3130
DATABANK   NAME=gpr55s     START=0x1BF0            END=0x1BFF         SHADOW=linear0:0x3140
DATABANK   NAME=gpr56s     START=0x1C70            END=0x1C7F         SHADOW=linear0:0x3150
DATABANK   NAME=gpr57s     START=0x1CF0            END=0x1CFF         SHADOW=linear0:0x3160
DATABANK   NAME=gpr58s     START=0x1D70            END=0x1D7F         SHADOW=linear0:0x3170
DATABANK   NAME=gpr59s     START=0x1DF0            END=0x1DFF         SHADOW=linear0:0x3180
DATABANK   NAME=gpr60s     START=0x1E70            END=0x1E7F         SHADOW=linear0:0x3190
DATABANK   NAME=gpr61s     START=0x1EF0            END=0x1EFF         SHADOW=linear0:0x31A0
DATABANK   NAME=gpr62s     START=0x1F70            END=0x1F7F         SHADOW=linear0:0x31B0
DATABANK   NAME=gpr63s     START=0x1FF0            END=0x1FFF         SHADOW=linear0:0x31C0

SHAREBANK  NAME=gprnobank  START=0x70            END=0x7F           
SHAREBANK  NAME=gprnobank  START=0xF0            END=0xFF           PROTECTED
SHAREBANK  NAME=gprnobank  START=0x170           END=0x17F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x1F0           END=0x1FF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x270           END=0x27F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x2F0           END=0x2FF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x370           END=0x37F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x3F0           END=0x3FF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x470           END=0x47F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x4F0           END=0x4FF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x570           END=0x57F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x5F0           END=0x5FF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x670           END=0x67F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x6F0           END=0x6FF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x770           END=0x77F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x7F0           END=0x7FF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x870           END=0x87F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x8F0           END=0x8FF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x970           END=0x97F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0x9F0           END=0x9FF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xA70           END=0xA7F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xAF0           END=0xAFF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xB70           END=0xB7F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xBF0           END=0xBFF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xC70           END=0xC7F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xCF0           END=0xCFF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xD70           END=0xD7F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xDF0           END=0xDFF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xE70           END=0xE7F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xEF0           END=0xEFF          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xF70           END=0xF7F          PROTECTED
SHAREBANK  NAME=gprnobank  START=0xFF0           END=0xFFF          PROTECTED

SECTION    NAME=PROG0      ROM=page0           // ROM code space - page0
SECTION    NAME=IDLOCS     ROM=.idlocs         // ID locations
SECTION    NAME=FLASHDATA  ROM=flashdata       // Data Flash Memory Region
SECTION    NAME=LINEAR0    RAM=linear0         // Linear Memory

