📄 app 24fj64ga004 ivt remap.gld
字号:
/*
** Linker script outline for PIC24F bootloader user application
** (for PIC24FJ64GA004 device)
*/
OUTPUT_ARCH("24FJ64GA004")
EXTERN(__resetPRI)
EXTERN(__resetALT)
/*
** Memory Regions
*/
MEMORY
{
data (a!xr) : ORIGIN = 0x800, LENGTH = 0x2000
/*
**Removed reset & interrupt vectors because they are remapped
*/
/*
reset : ORIGIN = 0x0, LENGTH = 0x4
ivt : ORIGIN = 0x4, LENGTH = 0xFC
aivt : ORIGIN = 0x104, LENGTH = 0xFC
*/
/*Starting location and length of user program */
program (xr) : ORIGIN = 0xC00, LENGTH = 0x9FFC
config2 : ORIGIN = 0xABFC, LENGTH = 0x2
config1 : ORIGIN = 0xABFE, LENGTH = 0x2
/*
** Section for storing user app reset vector and BL time out value. This
** section must be defined to allow use of the two location at address
** 0x100 (the bootloader's default setting).
** This is not needed if these values are placed in addresses in
** the "program" section.
*/
BLreset : ORIGIN = 0x100, LENGTH = 0x4
}
__CONFIG2 = 0xABFC;
__CONFIG1 = 0xABFE;
__IVT_BASE = 0x4;
__AIVT_BASE = 0x104;
__DATA_BASE = 0x800;
__CODE_BASE = 0xC00; /* starting location of user application */
/*
** ==================== Section Map ======================
*/
SECTIONS
{
/*
** ========== Program Memory ==========
*/
/*
** Reset Instruction
*/
/* REMOVED FOR VECTOR REMAPPING */
/*
** Interrupt Vector Tables
**
** The primary and alternate tables are loaded
** here, between sections .reset and .text.
** Vector table source code appears below.
*/
/*
** Outputs the BLreset section into the hex file at the area specified in
** memory map above. This is where the bootloader, by default, stores its
** user reset and entry mode timer. This is not needed if these values
** are placed in addresses in the "program" section.
*/
.BLreset :
{
*(.BLreset);
} >BLreset
/*
** User Code and Library Code
**
** This section must not be assigned to __CODE_BASE,
** because CodeGuard(tm) sections may be located there.
*/
.text :
{
*(.init);
*(.handle);
*(.libc) *(.libm) *(.libdsp); /* keep together in this order */
*(.lib*);
*(.text);
} >program
/*
** Configuration Words
*/
__CONFIG2 :
{ *(__CONFIG2.sec) } >config2
__CONFIG1 :
{ *(__CONFIG1.sec) } >config1
/*
** =========== Data Memory ===========
*/
/*
** ICD Debug Exec
**
** This section provides optional storage for
** the ICD2 debugger. Define a global symbol
** named __ICD2RAM to enable ICD2. This section
** must be loaded at data address 0x800.
*/
.icd __DATA_BASE (NOLOAD):
{
. += (DEFINED (__ICD2RAM) ? 0x50 : 0 );
} > data
/*
** Other sections in data memory are not explicitly mapped.
** Instead they are allocated according to their section
** attributes, which is most efficient.
**
** If a specific arrangement of sections is required
** (other than what can be achieved using attributes)
** additional sections may be defined here. See chapter
** 10.5 in the MPLAB ASM30/LINK30 User's Guide (DS51317)
** for more information.
*/
/*
** ========== Debug Info ==============
*/
.comment 0 : { *(.comment) }
/*
** DWARF-2
*/
.debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_ranges 0 : { *(.debug_ranges) }
.debug_aranges 0 : { *(.debug_aranges) }
} /* SECTIONS */
/*
** ================= End of Section Map ================
*/
/*
** Section Map for Interrupt Vector Tables
*/
SECTIONS
{
/*
** Interrupt Vector Table
*/
/* REMOVED FOR VECTOR REMAPPING */
/*
** Alternate Interrupt Vector Table
*/
/* REMOVED FOR VECTOR REMAPPING */
} /* SECTIONS */
/*
** ============== Equates for SFR Addresses =============
*/
WREG0 = 0x0;
_WREG0 = 0x0;
WREG1 = 0x2;
_WREG1 = 0x2;
WREG2 = 0x4;
_WREG2 = 0x4;
WREG3 = 0x6;
_WREG3 = 0x6;
WREG4 = 0x8;
_WREG4 = 0x8;
WREG5 = 0xA;
_WREG5 = 0xA;
WREG6 = 0xC;
_WREG6 = 0xC;
WREG7 = 0xE;
_WREG7 = 0xE;
WREG8 = 0x10;
_WREG8 = 0x10;
WREG9 = 0x12;
_WREG9 = 0x12;
WREG10 = 0x14;
_WREG10 = 0x14;
WREG11 = 0x16;
_WREG11 = 0x16;
WREG12 = 0x18;
_WREG12 = 0x18;
WREG13 = 0x1A;
_WREG13 = 0x1A;
WREG14 = 0x1C;
_WREG14 = 0x1C;
WREG15 = 0x1E;
_WREG15 = 0x1E;
SPLIM = 0x20;
_SPLIM = 0x20;
PCL = 0x2E;
_PCL = 0x2E;
PCH = 0x30;
_PCH = 0x30;
TBLPAG = 0x32;
_TBLPAG = 0x32;
PSVPAG = 0x34;
_PSVPAG = 0x34;
RCOUNT = 0x36;
_RCOUNT = 0x36;
SR = 0x42;
_SR = 0x42;
_SRbits = 0x42;
CORCON = 0x44;
_CORCON = 0x44;
_CORCONbits = 0x44;
DISICNT = 0x52;
_DISICNT = 0x52;
CNEN1 = 0x60;
_CNEN1 = 0x60;
_CNEN1bits = 0x60;
CNEN2 = 0x62;
_CNEN2 = 0x62;
_CNEN2bits = 0x62;
CNPU1 = 0x68;
_CNPU1 = 0x68;
_CNPU1bits = 0x68;
CNPU2 = 0x6A;
_CNPU2 = 0x6A;
_CNPU2bits = 0x6A;
INTCON1 = 0x80;
_INTCON1 = 0x80;
_INTCON1bits = 0x80;
INTCON2 = 0x82;
_INTCON2 = 0x82;
_INTCON2bits = 0x82;
IFS0 = 0x84;
_IFS0 = 0x84;
_IFS0bits = 0x84;
IFS1 = 0x86;
_IFS1 = 0x86;
_IFS1bits = 0x86;
IFS2 = 0x88;
_IFS2 = 0x88;
_IFS2bits = 0x88;
IFS3 = 0x8A;
_IFS3 = 0x8A;
_IFS3bits = 0x8A;
IFS4 = 0x8C;
_IFS4 = 0x8C;
_IFS4bits = 0x8C;
IEC0 = 0x94;
_IEC0 = 0x94;
_IEC0bits = 0x94;
IEC1 = 0x96;
_IEC1 = 0x96;
_IEC1bits = 0x96;
IEC2 = 0x98;
_IEC2 = 0x98;
_IEC2bits = 0x98;
IEC3 = 0x9A;
_IEC3 = 0x9A;
_IEC3bits = 0x9A;
IEC4 = 0x9C;
_IEC4 = 0x9C;
_IEC4bits = 0x9C;
IPC0 = 0xA4;
_IPC0 = 0xA4;
_IPC0bits = 0xA4;
IPC1 = 0xA6;
_IPC1 = 0xA6;
_IPC1bits = 0xA6;
IPC2 = 0xA8;
_IPC2 = 0xA8;
_IPC2bits = 0xA8;
IPC3 = 0xAA;
_IPC3 = 0xAA;
_IPC3bits = 0xAA;
IPC4 = 0xAC;
_IPC4 = 0xAC;
_IPC4bits = 0xAC;
IPC5 = 0xAE;
_IPC5 = 0xAE;
_IPC5bits = 0xAE;
IPC6 = 0xB0;
_IPC6 = 0xB0;
_IPC6bits = 0xB0;
IPC7 = 0xB2;
_IPC7 = 0xB2;
_IPC7bits = 0xB2;
IPC8 = 0xB4;
_IPC8 = 0xB4;
_IPC8bits = 0xB4;
IPC9 = 0xB6;
_IPC9 = 0xB6;
_IPC9bits = 0xB6;
IPC10 = 0xB8;
_IPC10 = 0xB8;
_IPC10bits = 0xB8;
IPC11 = 0xBA;
_IPC11 = 0xBA;
_IPC11bits = 0xBA;
IPC12 = 0xBC;
_IPC12 = 0xBC;
_IPC12bits = 0xBC;
IPC15 = 0xC2;
_IPC15 = 0xC2;
_IPC15bits = 0xC2;
IPC16 = 0xC4;
_IPC16 = 0xC4;
_IPC16bits = 0xC4;
IPC18 = 0xC8;
_IPC18 = 0xC8;
_IPC18bits = 0xC8;
TMR1 = 0x100;
_TMR1 = 0x100;
PR1 = 0x102;
_PR1 = 0x102;
T1CON = 0x104;
_T1CON = 0x104;
_T1CONbits = 0x104;
TMR2 = 0x106;
_TMR2 = 0x106;
TMR3HLD = 0x108;
_TMR3HLD = 0x108;
TMR3 = 0x10A;
_TMR3 = 0x10A;
PR2 = 0x10C;
_PR2 = 0x10C;
PR3 = 0x10E;
_PR3 = 0x10E;
T2CON = 0x110;
_T2CON = 0x110;
_T2CONbits = 0x110;
T3CON = 0x112;
_T3CON = 0x112;
_T3CONbits = 0x112;
TMR4 = 0x114;
_TMR4 = 0x114;
TMR5HLD = 0x116;
_TMR5HLD = 0x116;
TMR5 = 0x118;
_TMR5 = 0x118;
PR4 = 0x11A;
_PR4 = 0x11A;
PR5 = 0x11C;
_PR5 = 0x11C;
T4CON = 0x11E;
_T4CON = 0x11E;
_T4CONbits = 0x11E;
T5CON = 0x120;
_T5CON = 0x120;
_T5CONbits = 0x120;
IC1BUF = 0x140;
_IC1BUF = 0x140;
IC1CON = 0x142;
_IC1CON = 0x142;
_IC1CONbits = 0x142;
IC2BUF = 0x144;
_IC2BUF = 0x144;
IC2CON = 0x146;
_IC2CON = 0x146;
_IC2CONbits = 0x146;
IC3BUF = 0x148;
_IC3BUF = 0x148;
IC3CON = 0x14A;
_IC3CON = 0x14A;
_IC3CONbits = 0x14A;
IC4BUF = 0x14C;
_IC4BUF = 0x14C;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -