Big massive in RAM 9S12XEP100

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

Big massive in RAM 9S12XEP100

跳至解决方案
1,113 次查看
dlp
Contributor I

 Hi!

 I need defined big massive in RAM processor. Size 0x1250 bytes. How do I create it using just two memory's page?

 I need load big massive and after send automatic...

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
879 次查看
kef
Specialist I

You have 8k of unpaged RAM at 0x2000-0x3FFF. Your 4.5k massive should fit this easily. If you can't use nonpaged RAM, then you should use global memory addressing, since your array won't fit 4kB sized R-page. To do so, you need to

 

1) edit PRM file to create big continuous RAM segment, specifying start and end of segment using global addresses:

 

SEGMENTS

      ...

      RAM_FBFCFD    = READ_WRITE  DATA_FAR           0x0FB000'G TO 0xFDFFF'G; // 12k segment for global addressing

      ...

END

 

PLACEMENT

      ...

      PAGED_G_RAM       INTO RAM_FBFCFD; \

      ...

END

 

2) Define end declare your array between following DATA_SEG pragmas:

 

#pragma DATA_SEG __GPAGE_SEG PAGED_G_RAM

 char arr[0x1250];

#pragma DATA_SEG DEFAULT

 

 

3) Make sure -D__FAR_DATA string is included in compiler options string.

 

在原帖中查看解决方案

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

You have 8k of unpaged RAM at 0x2000-0x3FFF. Your 4.5k massive should fit this easily. If you can't use nonpaged RAM, then you should use global memory addressing, since your array won't fit 4kB sized R-page. To do so, you need to

 

1) edit PRM file to create big continuous RAM segment, specifying start and end of segment using global addresses:

 

SEGMENTS

      ...

      RAM_FBFCFD    = READ_WRITE  DATA_FAR           0x0FB000'G TO 0xFDFFF'G; // 12k segment for global addressing

      ...

END

 

PLACEMENT

      ...

      PAGED_G_RAM       INTO RAM_FBFCFD; \

      ...

END

 

2) Define end declare your array between following DATA_SEG pragmas:

 

#pragma DATA_SEG __GPAGE_SEG PAGED_G_RAM

 char arr[0x1250];

#pragma DATA_SEG DEFAULT

 

 

3) Make sure -D__FAR_DATA string is included in compiler options string.

 

0 项奖励
回复
879 次查看
dlp
Contributor I

 Super! I am very THX!

0 项奖励
回复