/*
** 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 = 0xC00, LENGTH = 0x1FFF
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
/*
** 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
}
看了半天,好像是ROM区的LENGTH 单位为字(16bit),RAM区的LENGTH 单位为字节(8bit)。搞PIC的坛友指点下?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
这行是描述RAM的分配,0x600是以字节为单位
reset : ORIGIN = 0x0, LENGTH = 0x4
这行是描述ROM的分配,0x4则是以字(16bit)为单位
不知道这个理解对还是不对,有搞过坛友指点下。
一周热门 更多>