AVR Studio debugging with simulator

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

There is something I am not understanding about debugging with AVR studio simulation. When I break at some point and want to look at the contents of a crucial variable, more often than not I get the message "Location not valid" or "Not in scope". It won't even give me the address so I can look at the data in memory. Is this an optimization thing? Here is an example screen dump:

Attachment(s): 

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

The code has been optimized and the variable is put into a register(s). The simulator doesn't handle this situation. About all you can do is look at the disassembly and see what register(s) it is using.

Regards,
Steve A.

The Board helps those that help themselves.

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

So if I turn off optimization (assuming I can figure out how, I am using an external makefile and just loading the .elf for debugging) can I debug even though the program won't fit into the target flash?