1
// File: 18f46k20_g.lkr
2
// Generic linker script for the PIC18F46K20 processor
4
#DEFINE _CODEEND _DEBUGCODESTART - 1
5
#DEFINE _CEND _CODEEND + _DEBUGCODELEN
6
#DEFINE _DATAEND _DEBUGDATASTART - 1
7
#DEFINE _DEND _DATAEND + _DEBUGDATALEN
25
#IFDEF _DEBUGCODESTART
26
CODEPAGE NAME=page START=0x0 END=_CODEEND
27
CODEPAGE NAME=debug START=_DEBUGCODESTART END=_CEND PROTECTED
29
CODEPAGE NAME=page START=0x0 END=0xFFFF
32
CODEPAGE NAME=idlocs START=0x200000 END=0x200007 PROTECTED
33
CODEPAGE NAME=config START=0x300000 END=0x30000D PROTECTED
34
CODEPAGE NAME=devid START=0x3FFFFE END=0x3FFFFF PROTECTED
35
CODEPAGE NAME=eedata START=0xF00000 END=0xF003FF PROTECTED
38
DATABANK NAME=gpre START=0x0 END=0x5F
40
ACCESSBANK NAME=accessram START=0x0 END=0x5F
43
DATABANK NAME=gpr0 START=0x60 END=0xFF
44
DATABANK NAME=gpr1 START=0x100 END=0x1FF
45
DATABANK NAME=gpr2 START=0x200 END=0x2FF
46
DATABANK NAME=gpr3 START=0x300 END=0x3FF
47
DATABANK NAME=gpr4 START=0x400 END=0x4FF
48
DATABANK NAME=gpr5 START=0x500 END=0x5FF
49
DATABANK NAME=gpr6 START=0x600 END=0x6FF
50
DATABANK NAME=gpr7 START=0x700 END=0x7FF
51
DATABANK NAME=gpr8 START=0x800 END=0x8FF
52
DATABANK NAME=gpr9 START=0x900 END=0x9FF
53
DATABANK NAME=gpr10 START=0xA00 END=0xAFF
54
DATABANK NAME=gpr11 START=0xB00 END=0xBFF
55
DATABANK NAME=gpr12 START=0xC00 END=0xCFF
56
DATABANK NAME=gpr13 START=0xD00 END=0xDFF
58
#IFDEF _DEBUGDATASTART
59
DATABANK NAME=gpr14 START=0xE00 END=_DATAEND
60
DATABANK NAME=dbgspr START=_DEBUGDATASTART END=_DEND PROTECTED
62
DATABANK NAME=gpr14 START=0xE00 END=0xEFF
65
DATABANK NAME=gpr15 START=0xF00 END=0xF5F
66
ACCESSBANK NAME=accesssfr START=0xF60 END=0xFFF PROTECTED
69
SECTION NAME=CONFIG ROM=config
70
#IFDEF _DEBUGDATASTART
71
STACK SIZE=0x100 RAM=gpr13
73
STACK SIZE=0x100 RAM=gpr14