Copy constant from NEAR ROM to variable in FAR RAM on HCS12

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

Copy constant from NEAR ROM to variable in FAR RAM on HCS12

3,547 次查看
Klaud
Contributor I

Hi,

My question is : is it possible to do an affectation from ROM NEAR to RAM Far on HCS12?

( ram_far_var = rom_near_const ; )

 

Thank you for any help!!!

Claud

标签 (1)
0 项奖励
回复
6 回复数

1,554 次查看
CrasyCat
Specialist III

Hello

 

Do you intend to initialize a global variable located in paged RAm with a constant value stored in extended memory (between 0x00, and 0xFFFF)?

 

This is possible without any problem with CodeWarrior.

A normal C assignment with the proper variable definition and declaration should do it.

 

CrasyCat

0 项奖励
回复

1,554 次查看
Klaud
Contributor I

Hi,

Thank you for your response CrasyCat.

Yes I want to affect a global variable located in paged RAM (@ 0xFC116C) with a constant value stored in 0x7E26.

I have a reset and I think its cause is this affectation.

 

In the code generated from this affectation I have the function _FAR_COPY_LOGICAL_NEAR_RC.

 

When reading the datapage.c I have:

 

      _FAR_COPY_GLOBAL_GLOBAL_RC:
      _FAR_COPY_GLOBAL_LOGICAL_RC:
      _FAR_COPY_LOGICAL_GLOBAL_RC:
      _FAR_COPY_LOGICAL_LOGICAL_RC:
      _FAR_COPY_NEAR_GLOBAL_RC:
      _FAR_COPY_NEAR_LOGICAL_RC:
      _FAR_COPY_GLOBAL_NEAR_RC:
      _FAR_COPY_LOGICAL_NEAR_RC: 

 

     HCS12X specific far copy routine. The name describes what the     src/dest address format are.
           All near srcarguments are passed in X, all 24 bit src in X/B.
           
All near destarguments are passed in Y, all 24 bit src in Y/A.
           (Note: HC12 _FAR_COPY_RC is using X/A as src and Y/B as dest, so the register usage is not the same!)

Do you think that there is no problem with the compiler?if so what can be?

 

Thank you very much.

Waiting for your response.

Klaud.

0 项奖励
回复

1,554 次查看
CrasyCat
Specialist III

Hello

 

I suspect there is something wrong in your project.

 

I would recommend you to submit a service request for that.

Click here to submit a service request.

Make sure to attach a reproducible project and installed product information to the service request.
To generate the required information:
- Start CodeWarrior
- Open the project
- Select "Help" -> "Pack and Go" and follow instructions on the screen.

Attach the generated .zip file to the SR.

 

CrasyCat

0 项奖励
回复

1,554 次查看
Klaud
Contributor I

Hello,

thanks very much for your help.

but the link( "here" ) doesn't much.

 

I am doanloading the  CodeWarrior,I haven't worked with it yet.

 

bye.

Klaud

0 项奖励
回复

1,554 次查看
CrasyCat
Specialist III

Hello

 

Here is the URL to create a Service request

 https://www.freescale.com/webapp/servicerequest.create_SR.framework?regFlag=fromOpenSR

 

CrasyCat

0 项奖励
回复

1,554 次查看
Klaud
Contributor I

hi,

I've an other question a copy from Near to far of 32 bytes,how much time can it take(S12XD)?

 

I hope to have a response even an approximative delay !

 

thank you very much.

Klaud 

0 项奖励
回复