Wrong line highlighted while debugging

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I updated to AS 6.2 These days and try now to debug an older Project.

Firmware of my JTAGICE3 was also updated.

 

Sometimes my Debugging worked okay, but now  I land on the last line BEFORE main() when pressing F10.

Also some of my breakpoints appear  with a full red dot when editing the code, but this changes to a red dot with yellow Exclamation mark when running the code.

And the hint says: the breakpoint cannot be reached.

 

Maybe tisi Problem was already discussed before, but I don't find it.

 

UPDATE:

 

Right before main() there are 3 lines in my code "static int var1=0;" (2 more of this)

 

Is it possible that this brings source-code and debug-code out of sync ?

 

As described before, pressing F10 brings the yellow marker to the first line of the "static...". But teh code runs okay as far as i can see.

 

nevertheless, I cannot stop on some lines as the breakpoint symbol has a yellow "!"

I program like a man:
COPY CON: > firmware.hex

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Might be the optimization moving things around a bit. Try setting optimization to 'none'.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes. This was my first idea, also.

 

Normally I use -O1 as I was warned to avoid -O0 under all circumstances.

But no change

I program like a man:
COPY CON: > firmware.hex