mc9s12xdt256 & Paged RAM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

mc9s12xdt256 & Paged RAM

跳至解决方案
1,112 次查看
Eric_t
Contributor III

Hi,

 

Currently I am working with mc9s12dg256 controller.

Now I have to migrate to mc9s12xdt256AA controller but I have a problem with the paged RAM.

The RAM area of mc9s12dg256 (12KB) is not paged and firmware uses large RAM areas for memory allocation.

The problem is with RAM paged memory of mc9s12xdt256AA, that is 8KB unpaged and two pages of 4KB.

Since my firmware handles the RAM area as one piece, migration to new controller is really painful procedure.

 

Does anyone know if there is a way for codewarrior to handle the RAM of mc9s12xdt256AA controller as one piece.

 

Thank you

Nikos

.

 

标签 (1)
0 项奖励
1 解答
596 次查看
kef
Specialist I

There's no gap between paged RAM and nonpaged RAM. So you may edit XD256 PRM file and redefine RAM segment to include RAM page window like this

      RAM           = READ_WRITE  DATA_NEAR            0x1000 TO   0x3FFF;

      RAM_FC        = READ_WRITE  DATA_FAR           0xFC1800 TO 0xFC1FFF;

/* Undefine RAM_FD. It is used in RAM segment 0x1000..0x1FFF*/

/*      RAM_FD        = READ_WRITE  DATA_FAR           0xFD1000 TO 0xFD1FFF;*/

      PAGED_RAM         INTO  /* when using banked addressing for variable data, make sure to specify

                                 the option -D__FAR_DATA on the compiler command line */

                                RAM_FC /*, remove RAM_FD*/;

Message was edited by: Edward Karpicz

在原帖中查看解决方案

0 项奖励
2 回复数
597 次查看
kef
Specialist I

There's no gap between paged RAM and nonpaged RAM. So you may edit XD256 PRM file and redefine RAM segment to include RAM page window like this

      RAM           = READ_WRITE  DATA_NEAR            0x1000 TO   0x3FFF;

      RAM_FC        = READ_WRITE  DATA_FAR           0xFC1800 TO 0xFC1FFF;

/* Undefine RAM_FD. It is used in RAM segment 0x1000..0x1FFF*/

/*      RAM_FD        = READ_WRITE  DATA_FAR           0xFD1000 TO 0xFD1FFF;*/

      PAGED_RAM         INTO  /* when using banked addressing for variable data, make sure to specify

                                 the option -D__FAR_DATA on the compiler command line */

                                RAM_FC /*, remove RAM_FD*/;

Message was edited by: Edward Karpicz

0 项奖励
596 次查看
Eric_t
Contributor III

Thanks Kef.

I have tried it and it works.

Thanks again.

0 项奖励