3 linker script file, Linker script file, Picdem™ 17 demonstration board user’s guide – Arizona Picdem 17 User Manual

Page 30

Advertising
background image

PICDEM™ 17 Demonstration Board User’s Guide

DS39024B-page 24

2001 Microchip Technology Inc.

4.3

Linker Script File

Any program compiled with the MPLAB C17 C compiler requires the use of a
linker script file that documents the areas of memory that the linker is free to
use. Programs targeted to run out of external FLASH program memory
require a special linker script file that assumes that program memory starts at
address 4000h. All of the source code written for the PICDEM 17
demonstration board must be compiled using the large memory model since it
will reside at memory addresses larger than 4000h and will be called from a
memory address somewhere in the first two pages of memory.

//****************************************************************

// PIC17C756A MPLAB C v2.0 Linker Script File, Version 1.10

//

// L a r g e M o d e l

//

// For the PICDEM 17 Workshop Demo Board

//

// (c) Copyright 1997 Microchip Technology

//****************************************************************

// Add other files to the project

FILESp17c756.o

FILESpmc756l.lib

// ROM area for reset & interrupt vectors

CODEPAGE PROTECTED NAME=VECTORS START=0x4000 END=0x4027

// User Program memory

// First two pages are used by on-chip monitor program

//CODEPAGE NAME=PAGE0 START=0x0028 END=0x1FFF

//CODEPAGE NAME=PAGE1 START=0x2000 END=0x3FFF

// Your program starts in page 2

// First 28h locations of page 2 are vectors

CODEPAGE NAME=PAGE2 START=0x4028 END=0x5FFF

CODEPAGE NAME=PAGE3 START=0x6000 END=0x7FFF

CODEPAGE NAME=PAGE4 START=0x8000 END=0x9FFF

CODEPAGE NAME=PAGE5 START=0xA000 END=0xBFFF

CODEPAGE NAME=PAGE6 START=0xC000 END=0xDFFF

CODEPAGE NAME=PAGE7 START=0xE000 END=0xFFFF

// Special Function registers

// 1. SFRs that are shared (0x00 to 0x0F)

SHAREBANK PROTECTED NAME=SFRShareA START=0x000 END=0x00F

SHAREBANK PROTECTED NAME=SFRShareA START=0x100 END=0x10F

SHAREBANK PROTECTED NAME=SFRShareA START=0x200 END=0x20F

SHAREBANK PROTECTED NAME=SFRShareA START=0x300 END=0x30F

SHAREBANK PROTECTED NAME=SFRShareA START=0x400 END=0x40F

SHAREBANK PROTECTED NAME=SFRShareA START=0x500 END=0x50F

SHAREBANK PROTECTED NAME=SFRShareA START=0x600 END=0x60F

SHAREBANK PROTECTED NAME=SFRShareA START=0x700 END=0x70F

// 2. SFRs in banks 0 - 7

DATABANK PROTECTED NAME=SFR0 START=0x010 END=0x017

DATABANK PROTECTED NAME=SFR1 START=0x110 END=0x117

DATABANK PROTECTED NAME=SFR2 START=0x210 END=0x217

DATABANK PROTECTED NAME=SFR3 START=0x310 END=0x317

Advertising