Discussion Forum

How to re-allocate the code variables to bank X

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Vincent Wang
Posted
27-Jan-2003 08:11 GMT
Toolset
C51
New! How to re-allocate the code variables to bank X
code int iMatrix[9]={..........}
I apply this source file to bank 3,however,
the linker allocates iMatrix to common area.
May I change the area to any bank to save comon area space,and How??
Please do me a favor,and thanks ....!!

Read-Only
Author
Drew Davis
Posted
27-Jan-2003 16:56 GMT
Toolset
C51
New! RE: How to re-allocate the code variables to bank X

Have you tried the BANKx directive to place that segment in a particular bank?

If you want to seperate out just one particular declaration from other code/constants, you'll need to put it into its own file so that it will get its own segment name.
Read-Only
Author
Vincent Wang
Posted
29-Jan-2003 02:31 GMT
Toolset
C51
New! RE: How to re-allocate the code variables to bank X
Mr.Davis,
Thanks for your advice,
I've ever tried to put the function among different bank,It work well,however the code data,for example the integer matrix I declare and set this whole file apply to Bank X,The linker allocate whole file function to Bank X ,except the code data matrix.(code data in common area).

Anyway,if you have further advice,just tell me.I appreciate your kindly help.

Next Thread | Thread List | Previous Thread Start a Thread | Settings