Big massive in RAM 9S12XEP100

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Big massive in RAM 9S12XEP100

Jump to solution
546 Views
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...

Labels (1)
Tags (1)
0 Kudos
1 Solution
312 Views
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.

 

View solution in original post

0 Kudos
2 Replies
313 Views
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 Kudos
312 Views
dlp
Contributor I

 Super! I am very THX!

0 Kudos