Problems with setting break points for MC9S08AW60

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

Problems with setting break points for MC9S08AW60

615 Views
MWMinor
Contributor V

I'm experiencing difficulties when trying to debug my code using breakpoints.

 

Sometimes they set, sometimes they won't set at the specific point in the code but rather a few steps on. This isn't too difficult to cope with although I'd like to understand the why as the code isn't at a conditional break or anything - sometimes seems to be the case when just setting some registers sequentially.

 

Then other times even though the break point seems to set correctly, CW seems to ignore it.

 

Can anyone help please....?

Labels (1)
0 Kudos
5 Replies

361 Views
J2MEJediMaster
Specialist I

Do you have the compiler optimizations turned on? If so, the compiler's optimizer will eliminate and reorder instructions, the result being that there is not a one-on-one match between the source code and the generated machine instructions.

 

---Tom

0 Kudos

361 Views
MWMinor
Contributor V

Hi Tom

 

Thanks for your reply.

 

How and where do I check to see whether these options are set...?

 

Thanks

 

MW

0 Kudos

361 Views
J2MEJediMaster
Specialist I

You would check the compiler settings. What version of CodeWarrior are you using? For the Classic version you look in the Compiler Settings panel, which can be reached by Choosing Edit > Project Settings > Compiler Settings, although I'm recalling that from memory. For the Eclipse-based version it's Project > Properties > C/C++ Build > Settings > Optimization.

 

---Tom

0 Kudos

361 Views
MWMinor
Contributor V

Hi Tom

 

I'm using Version 10.1

0 Kudos

361 Views
J2MEJediMaster
Specialist I

That's Eclipse, then.

 

---Tom

0 Kudos