How to Jump to application Based on MPC5604b

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

How to Jump to application Based on MPC5604b

ソリューションへジャンプ
1,371件の閲覧回数
buckzheng
Contributor II

 I want to design mpc5604b bootloader , i've developed an demo project in CW 2.10, but some probelms occurs ! The demo project copy a led funciton that residents in flash space from 0x000210c6 to 0x000210ea  to the other flash space from 0x00008000 to 0x00008024  , and then jump to 0x8000 to run the led demo function !but it didn't ! 

 

I debuged the demo project ! Based the below figure, I programmed the led function into the other flash space according to flash driver successfully ! 

169973_169973.pngpastedImage_1.png

I use the following jump syntax , i wonder that it jumped to wrong address , or that  the syntax is wrong ! 

the demo project codes : 

169974_169974.pngpastedImage_2.png

169975_169975.pngpastedImage_3.png

This problem has bothered me for a long time.! Please help me !

ラベル(1)
0 件の賞賛
返信
1 解決策
1,209件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Hunter,

if you move some piece of code to different location, the code must be either compiled as a PIC code (Position Independent Code) or there can't be absolute jumps (only relative jumps). If is just piece of code, the best way is to write it in assembler. If it is large application, the best way is to use two projects as mentioned in the application note.

Regards,

Lukas

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,209件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信
1,209件の閲覧回数
buckzheng
Contributor II

Hi ,

Lukas !

I debuged the demo project  soon! 

In the function App_led , I called a function LED_TOGGLE , and I modified the App_led function as below ! The led function will run the dead loop forever ! It's strange ! why ! I want to find the original reason of the problem ! Help me ! Give me your suggestions ! 

pastedImage_3.png

Regards,

Hunter

0 件の賞賛
返信
1,210件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Hunter,

if you move some piece of code to different location, the code must be either compiled as a PIC code (Position Independent Code) or there can't be absolute jumps (only relative jumps). If is just piece of code, the best way is to write it in assembler. If it is large application, the best way is to use two projects as mentioned in the application note.

Regards,

Lukas

0 件の賞賛
返信
1,209件の閲覧回数
buckzheng
Contributor II

Hi,

Lukas !

I have seen the application note AN5319 , but it didn't give me some useful information that could help solve my problem !

My demo project is different to AN5319. I just want to run application in different flash area with only one project.

 I have known the application and bootloader counld resident in one project !Please  make some 

suggestions to help me !

Regards,

Hunter

0 件の賞賛
返信