XET256,RPAGE confused

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

XET256,RPAGE confused

ソリューションへジャンプ
4,377件の閲覧回数
HUST
Contributor I

 we find the RPAGE is wrong  which results in unexpected behavior.
 one case, firstly the MCU will directly come into Sleep Mode after reset. At last we find the Sleep Flag has been SET by mistake.

  from the map we can get:
                                       - VARIABLES:
      DIM_DWork                               FC165A      20      32     350   RAM_FC_555  
    
    the component DIM_DWork.ProgramMode_Start address should  be in FC166A.
  
  
    and in FD166A  we find
    - VARIABLES:
      slm_sleepMode                           FD166A       1       1       6   RAM_FD_554 


 we suspect the system confused the RAM_FC with RAM_FD .and actually the RPAGE is already wrong  before this operation. But we don’t know why.
 
 so  would you please make it clear? Or explain?
    
 
 and another question is : would you tell  us the mechanism  for the both core XGATE and CPU12 when they  allocate the RAM source to the temporary variables?

 

RPAGE_Error.zip

Message Edited by t.dowe on 2009-09-22 12:34 PM
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
2,361件の閲覧回数
CrasyCat
Specialist III

Hello

 

I checked eth data you sent over.

 

Both the definition and declaration of DLM_DWork should place the variable in the same section.

 

So the declaration the variable should look like:

 

#pragma DATA_SEG __RPAGE_SEG APP_RAM
extern D_Work_DLM DLM_DWork;

#pragma DATA_SEG DEFAULT

 

CrasyCat

元の投稿で解決策を見る

0 件の賞賛
返信
7 返答(返信)
2,361件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

In the banked memory model, variables placed in the DEFAULT_RAM section must be allocated in the normal 16 bit memory area, and not banked.

Has this been done?

How is DIM_DWork defined and declared, is it in a

#pragma DATA_SEG __RPAGE_SEG NAMEX

(or  #pragma DATA_SEG __GPAGE_SEG NAMEY)

area?

Also note that allocating parts of DEFAULT_RAM into a non paged area is not safe (as it is done in the prm).

>      DEFAULT_RAM             /* all variables, the default RAM location */
>                                INTO  RAM; // Not: RAM_FD,RAM_FC ;

> NAMEX INTO RAM_FD;

> NAMEY INTO RAM_FC;

 

Note that the paged RAM can be used for the XGATE only section (XGATE_RAM).

 

Daniel

 

0 件の賞賛
返信
2,361件の閲覧回数
HUST
Contributor I

Thank you Daniel; I have tried your instruction , but result is still negative.

 

 other direction or comments?

0 件の賞賛
返信
2,361件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

I don't think I had instructions :smileyhappy:.

What did you change? Did you make sure DEFAULT_RAM gets allocated non banked only?

How is the non working variable declared/defined?

Daniel

0 件の賞賛
返信
2,361件の閲覧回数
CrasyCat
Specialist III

Hello

 

I looked at the .prm file you have attached.

DEFAULT RAM is placed in banked memory, which is not correct if you are building in banked memory model.

 

You need to either place DEFAULT_RAM in non banked memory or define the variable in a __RPAGE_SEG user defined section. 

 

CrasyCat

0 件の賞賛
返信
2,361件の閲覧回数
HUST
Contributor I

thanks for both!

 

attachment please kindly find the updated prm and definition.

 

 

0 件の賞賛
返信
2,362件の閲覧回数
CrasyCat
Specialist III

Hello

 

I checked eth data you sent over.

 

Both the definition and declaration of DLM_DWork should place the variable in the same section.

 

So the declaration the variable should look like:

 

#pragma DATA_SEG __RPAGE_SEG APP_RAM
extern D_Work_DLM DLM_DWork;

#pragma DATA_SEG DEFAULT

 

CrasyCat

0 件の賞賛
返信
2,361件の閲覧回数
HUST
Contributor I
thanks for any comments!
0 件の賞賛
返信