另外,我在CW4.6中“选Compiler for HC12的Options,在Code Generation里勾上PPAGE Regiseter is used for paging,然后在下面的参数栏里填上RUNTIME”,编译器提示设置不正确的,这又是什么原因啊?
还有,版主说的“外部地址最好选用内部空间没有占用的地址,这样就不会发生冲突。如果要用BDM进行编程或调试,MCU的管脚电平配置成正常单片模式即可。当程序运行后再写寄存器,使MCU进入扩展模式。”我对后一句话不是很理解。因为,我准备在系统设计中将MC9S12XDP512的运行模式定死,就是Normal expanded mode,而不再使用拨码开关。(根据MC9S12XDP512的datasheet,其BDM在每一种模式下都是active的。)这有矛盾吗?我的设计方法可行不?
目前,我在1在prm文件中定义如下:
SEGMENTS
...
/* Here we use logical addressing */
RAM_D8 = READ_WRITE 0xD81000 TO 0xD81FFF;
RAM_D9 = READ_WRITE 0xD91000 TO 0xD91FFF;
RAM_DA = READ_WRITE 0xDA1000 TO 0xDA1FFF;
RAM_DB = READ_WRITE 0xDB1000 TO 0xDB1FFF;
RAM_DC = READ_WRITE 0xDC1000 TO 0xDC1FFF;
RAM_DD = READ_WRITE 0xDD1000 TO 0xDD1FFF;
RAM_DE = READ_WRITE 0xDE1000 TO 0xDE1FFF;
RAM_DF = READ_WRITE 0xDF1000 TO 0xDF1FFF;
RAM_E0 = READ_WRITE 0xE01000 TO 0xE01FFF;
RAM_E1 = READ_WRITE 0xE11000 TO 0xE11FFF;
RAM_E2 = READ_WRITE 0xE21000 TO 0xE21FFF;
RAM_E3 = READ_WRITE 0xE31000 TO 0xE31FFF;
RAM_E4 = READ_WRITE 0xE41000 TO 0xE41FFF;
RAM_E5 = READ_WRITE 0xE51000 TO 0xE51FFF;
RAM_E6 = READ_WRITE 0xE61000 TO 0xE61FFF;
RAM_E7 = READ_WRITE 0xE71000 TO 0xE71FFF;
RAM_E8 = READ_WRITE 0xE81000 TO 0xE81FFF;
RAM_E9 = READ_WRITE 0xE91000 TO 0xE91FFF;
RAM_EA = READ_WRITE 0xEA1000 TO 0xEA1FFF;
RAM_EB = READ_WRITE 0xEB1000 TO 0xEB1FFF;
RAM_EC = READ_WRITE 0xEC1000 TO 0xEC1FFF;
RAM_ED = READ_WRITE 0xED1000 TO 0xED1FFF;
RAM_EE = READ_WRITE 0xEE1000 TO 0xEE1FFF;
RAM_EF = READ_WRITE 0xEF1000 TO 0xEF1FFF;
RAM_F0 = READ_WRITE 0xF01000 TO 0xF01FFF;
RAM_F1 = READ_WRITE 0xF11000 TO 0xF11FFF;
RAM_F2 = READ_WRITE 0xF21000 TO 0xF21FFF;
RAM_F3 = READ_WRITE 0xF31000 TO 0xF31FFF;
RAM_F4 = READ_WRITE 0xF41000 TO 0xF41FFF;
RAM_F5 = READ_WRITE 0xF51000 TO 0xF51FFF;
RAM_F6 = READ_WRITE 0xF61000 TO 0xF61FFF;
RAM_F7 = READ_WRITE 0xF71000 TO 0xF71FFF;
RAM_F8 = READ_WRITE 0xF81000 TO 0xF81FFF;
RAM_F9 = READ_WRITE 0xF91000 TO 0xF91FFF;
RAM_FA = READ_WRITE 0xFA1000 TO 0xFA1FFF;
RAM_FB = READ_WRITE 0xFB1000 TO 0xFB1FFF;
RAM_FC = READ_WRITE 0xFC1000 TO 0xFC1FFF;
RAM_FD = READ_WRITE 0xFD1000 TO 0xFD1FFF;
/* RAM_FE = READ_WRITE 0xFE1000 TO 0xFE1FFF; intentionally not defined: equivalent to RAM: 0x2000..0x2FFF */
/* RAM_FF = READ_WRITE 0xFF1000 TO 0xFF1FFF; intentionally not defined: equivalent to RAM: 0x3000..0x3FFF */
...
END
PLACEMENT
...
PAGED_RAM INTO /* when using banked addressing for variable data, make sure to specif the option -D__FAR_DATA on the compiler command line */