Freescale simple example leaves main()

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Freescale simple example leaves main()

Jump to solution
1,014 Views
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-




Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
718 Views
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.

View solution in original post

0 Kudos
Reply
1 Reply
719 Views
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 Kudos
Reply