Freescale simple example leaves main()

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

Freescale simple example leaves main()

跳至解决方案
1,020 次查看
cab
Contributor III

CW 10.2 (1.0.0 upgrade) Win7x64 MC9S08LG32

 

Thefollowing program terminates with message

<terminated>SM_MC9S08LG32_PnE U-MultiLink [CodeWarrior Download]    
    <terminated, exit value: 0>C:\Users\John\workspace200\SM\MC9S08LG32\SM.abs (5/26/12 9:28 PM)   

 

void main(void) {  /* include your code here */
  SOPT1_COPE= 0; //Added this, doesn't help.  for(;;) {     __RESET_WATCHDOG(); /* feeds the dog */  } /* loop forever */  /* please make sure that you never leave main */}

It doesn't terminate in Debug mode--that would likely stop the COP, but that doesn't seem to be it.  What other kind of exit might Debug stop? Nor does it terminate if I add something useful like Send("Hello World"), like most programs would have.

 

What? Does our Smart Compiler "optimize out" the for loop?

 

-Cab-




标签 (1)
标记 (1)
0 项奖励
回复
1 解答
724 次查看
cab
Contributor III

But the processor runs just fine after this message.  I just didn't understand it--but it makes sense now that I found out that the program works fine after that message.  Silly me I sincerely thought I might have to put something in the for-loop.

 

I apologize for this frivolous post.

在原帖中查看解决方案

0 项奖励
回复
1 回复
725 次查看
cab
Contributor III

But the processor runs just fine after this message.  I just didn't understand it--but it makes sense now that I found out that the program works fine after that message.  Silly me I sincerely thought I might have to put something in the for-loop.

 

I apologize for this frivolous post.

0 项奖励
回复