这个设备在它的生命中会有少于1000个FLASH写,所以它应该是好的。我也尝试了挥发性const,但那是在我把问题归结到这个之前:IFNVMCONBITES。WR=1是在代码中,那么存储器0x1D03F000将不会在ICD3编程期间写入。E链接文件的一部分,其中2页的Flash(该芯片上的4K)被保留为航点数据:存储器{KSG00SudithMeX(RX):Orthe= 0x9D900M,长度=0x3f000路点(R)!X):Oracle=0x9D03F000,长度=0x1000 Debug gExpReMeM:原点=0x760KSG00BoToMeMe:原点=0x0kSex1BoToMeMe:原点=0xbfc000,长度=0x490组态bfc01744:原点=0xbfc01744,长度=0x4组态bfc01748:原点=0xbfc01748,长度=长度=0xbfc01744。0x4 CONTIONBFC0174C:ORACE=0xBFC0174C,长度=0x4 CONTIONBFC01750:ORACE=0xBFC01750,长度=0x4 CONTIONBFC01754:ORACE=0XBFC01754,长度=0x4 CONTIONBFC01758:ORACE=0XBFC01758,长度=0x4 CONTIONBFC01760:ORACE=0XBFC01760,长度=0x4 CONTIONBFC017C4:ORACE=0XBFC01长度=0x4组态bfc017c8:原点=0xbfc017c8,长度=0x4组态bfc017CC:原点=0xbfc017CC,长度=0x4组态bfc017d0:原点=0xbfc017d0,长度=0x4组态bfc017d4:原点=0xbfc017d4,长度=0x4组态bfc017d8:原点=0xbfc017d8,长度=0x4组态bfc017e0:梧里:7C4GIN=0xBFC017E0,长度=0x4kSe00DATAYMEM(W)!X):Oracle=0x8000,长度=0x8000 SFRS:原点=0xBF8000,长度=0x100000组态FrsSfBFC01740:Orthe= 0xBFC01740,长度=0x1C配置FrsSfBFC017C0:Orth= 0xBFC017C0,长度=0x1C},我完全被绊倒了。微芯片??
以上来自于百度翻译
以下为原文
The device will have fewer than 1000 flash writes over its life, so that should hopefully be ok.
I also tried the volatile const, but that was before I distilled the problem to this:
If NVMCONbits.WR=1 is in the code, then memory 0x1D03F000 will not get written during programming by the ICD3.
Here's the part of the linker file where 2 pages of flash (4k on this chip) are reserved for the waypoint data:
MEMORY
{
kseg0_program_mem (rx) : ORIGIN = 0x9D000000, LENGTH = 0x3F000
waypoints (r!x) : ORIGIN = 0x9D03F000, LENGTH = 0x1000
debug_exec_mem : ORIGIN = 0x9FC00490, LENGTH = 0x760
kseg0_boot_mem : ORIGIN = 0x9FC00490, LENGTH = 0x0
kseg1_boot_mem : ORIGIN = 0xBFC00000, LENGTH = 0x490
config_BFC01744 : ORIGIN = 0xBFC01744, LENGTH = 0x4
config_BFC01748 : ORIGIN = 0xBFC01748, LENGTH = 0x4
config_BFC0174C : ORIGIN = 0xBFC0174C, LENGTH = 0x4
config_BFC01750 : ORIGIN = 0xBFC01750, LENGTH = 0x4
config_BFC01754 : ORIGIN = 0xBFC01754, LENGTH = 0x4
config_BFC01758 : ORIGIN = 0xBFC01758, LENGTH = 0x4
config_BFC01760 : ORIGIN = 0xBFC01760, LENGTH = 0x4
config_BFC017C4 : ORIGIN = 0xBFC017C4, LENGTH = 0x4
config_BFC017C8 : ORIGIN = 0xBFC017C8, LENGTH = 0x4
config_BFC017CC : ORIGIN = 0xBFC017CC, LENGTH = 0x4
config_BFC017D0 : ORIGIN = 0xBFC017D0, LENGTH = 0x4
config_BFC017D4 : ORIGIN = 0xBFC017D4, LENGTH = 0x4
config_BFC017D8 : ORIGIN = 0xBFC017D8, LENGTH = 0x4
config_BFC017E0 : ORIGIN = 0xBFC017E0, LENGTH = 0x4
kseg0_data_mem (w!x) : ORIGIN = 0x80000000, LENGTH = 0x8000
sfrs : ORIGIN = 0xBF800000, LENGTH = 0x100000
configsfrs_BFC01740 : ORIGIN = 0xBFC01740, LENGTH = 0x1C
configsfrs_BFC017C0 : ORIGIN = 0xBFC017C0, LENGTH = 0x1C
}
I'm completely stumped. Microchip??