Global variable problem (the program got stuck after just executing the assignment )

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

Global variable problem (the program got stuck after just executing the assignment )

ソリューションへジャンプ
1,290件の閲覧回数
ycgxy1650601
Contributor III

HI:
    Software version: CodeWarrior 2.10   /    hardware version: mpc5606b borad

Problem: when I debug the program from step 1 to step 2 by single step debugging(see Figure 1),  the program got stuck.  The software interface is showed in figure 2 when the program got stuck.   I click the stop button,   then the software interface is shown in Figure 3.   I find the result that the pointer always point to  "00001020 e800 se_ B 00001020" after clicking the stop button.   I have tried many times, the result never change(PC 00001020 and 00001020 e800 se_ B 00001020).  The global variable currentprot is described in Figure 4.

Why the program got stuck after executing the assignment statement of global variable currentprot by single step debugging?

 

debug2 - 副本.JPGdebug2-1 - 副本.JPGdebug2-2 - 副本.JPG

list global variables.JPG

THANKS

0 件の賞賛
返信
1 解決策
1,281件の閲覧回数
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I find the result that the pointer always point to "00001020 e800 se_ B 00001020" after clicking the stop button. I have tried many times, the result never change(PC 00001020 and 00001020 e800 se_ B 00001020). The global variable currentprot is described in Figure 4.

The program is not stuck.

it just run into endless loop like while(1). uC is working correctly. Please check you source code.

 

best regards,
Peter

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,282件の閲覧回数
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I find the result that the pointer always point to "00001020 e800 se_ B 00001020" after clicking the stop button. I have tried many times, the result never change(PC 00001020 and 00001020 e800 se_ B 00001020). The global variable currentprot is described in Figure 4.

The program is not stuck.

it just run into endless loop like while(1). uC is working correctly. Please check you source code.

 

best regards,
Peter

0 件の賞賛
返信