📄 bl 24f16ka102 ivt remap.gld
字号:
/*
** Linker script for PIC24F16KA102
*/
OUTPUT_ARCH("24F16KA102")
EXTERN(__resetPRI)
EXTERN(__resetALT)
OPTIONAL(-lpPIC24Fxxx)
/*
** Memory Regions
*/
MEMORY
{
data (a!xr) : ORIGIN = 0x800, LENGTH = 0x600
reset : ORIGIN = 0x0, LENGTH = 0x4
ivt : ORIGIN = 0x4, LENGTH = 0xFC
aivt : ORIGIN = 0x104, LENGTH = 0xFC
program (xr) : ORIGIN = 0x200, LENGTH = 0x800
eedata : ORIGIN = 0x7FFE00, LENGTH = 0x200
FBS : ORIGIN = 0xF80000, LENGTH = 0x2
FGS : ORIGIN = 0xF80004, LENGTH = 0x2
FOSCSEL : ORIGIN = 0xF80006, LENGTH = 0x2
FOSC : ORIGIN = 0xF80008, LENGTH = 0x2
FWDT : ORIGIN = 0xF8000A, LENGTH = 0x2
FPOR : ORIGIN = 0xF8000C, LENGTH = 0x2
FICD : ORIGIN = 0xF8000E, LENGTH = 0x2
FDS : ORIGIN = 0xF80010, LENGTH = 0x2
}
__FBS = 0xF80000;
__FGS = 0xF80004;
__FOSCSEL = 0xF80006;
__FOSC = 0xF80008;
__FWDT = 0xF8000A;
__FPOR = 0xF8000C;
__FICD = 0xF8000E;
__FDS = 0xF80010;
__NO_HANDLES = 1; /* Suppress handles on this device */
__IVT_BASE = 0x4;
__AIVT_BASE = 0x104;
__DATA_BASE = 0x800;
__CODE_BASE = 0x200;
/*
** ==================== Section Map ======================
*/
SECTIONS
{
/*
** ========== Program Memory ==========
*/
/*
** Reset Instruction
*/
.reset :
{
SHORT(ABSOLUTE(__reset));
SHORT(0x04);
SHORT((ABSOLUTE(__reset) >> 16) & 0x7F);
SHORT(0);
} >reset
/*
** Interrupt Vector Tables
**
** The primary and alternate tables are loaded
** here, between sections .reset and .text.
** Vector table source code appears below.
*/
/*
** User Code and Library Code
**
** This section must not be assigned to __CODE_BASE,
** because CodeGuard(tm) sections may be located there.
**
** Note that input sections *(.text) are not mapped here.
** The best-fit allocator locates them, so that .text
** may flow around PSV sections as needed.
*/
.text :
{
*(.init);
*(.user_init);
*(.handle);
*(.libc) *(.libm) *(.libdsp); /* keep together in this order */
*(.lib*);
} >program
/*
** Configuration Words
*/
__FBS :
{ *(__FBS.sec) } >FBS
__FGS :
{ *(__FGS.sec) } >FGS
__FOSCSEL :
{ *(__FOSCSEL.sec) } >FOSCSEL
__FOSC :
{ *(__FOSC.sec) } >FOSC
__FWDT :
{ *(__FWDT.sec) } >FWDT
__FPOR :
{ *(__FPOR.sec) } >FPOR
__FICD :
{ *(__FICD.sec) } >FICD
__FDS :
{ *(__FDS.sec) } >FDS
/*
** =========== 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
*/
.ivt __IVT_BASE :
{
LONG( DEFINED(__ReservedTrap0) ? ABSOLUTE(__ReservedTrap0) :
ABSOLUTE(__DefaultInterrupt));
LONG( DEFINED(__OscillatorFail) ? ABSOLUTE(__OscillatorFail) :
ABSOLUTE(__DefaultInterrupt));
LONG( DEFINED(__AddressError) ? ABSOLUTE(__AddressError) :
ABSOLUTE(__DefaultInterrupt));
LONG( DEFINED(__StackError) ? ABSOLUTE(__StackError) :
ABSOLUTE(__DefaultInterrupt));
LONG( DEFINED(__MathError) ? ABSOLUTE(__MathError) :
ABSOLUTE(__DefaultInterrupt));
LONG( DEFINED(__ReservedTrap5) ? ABSOLUTE(__ReservedTrap5) :
ABSOLUTE(__DefaultInterrupt));
LONG( DEFINED(__ReservedTrap6) ? ABSOLUTE(__ReservedTrap6) :
ABSOLUTE(__DefaultInterrupt));
LONG( DEFINED(__ReservedTrap7) ? ABSOLUTE(__ReservedTrap7) :
ABSOLUTE(__DefaultInterrupt));
LONG( DEFINED(__INT0Interrupt) ? ABSOLUTE(__INT0Interrupt) :
ABSOLUTE(__DefaultInterrupt));
LONG( DEFINED(__IC1Interrupt) ? ABSOLUTE(__IC1Interrupt) :
ABSOLUTE(__DefaultInterrupt));
LONG( DEFINED(__OC1Interrupt) ? ABSOLUTE(__OC1Interrupt) :
ABSOLUTE(__DefaultInterrupt));
/* Int Vector Remap Method 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -