On Feb 15, 2006, at 3:57 AM, houman wrote: > I had a problem about debugging programs in avr studio.I load the obj > file created with codevision and run the simulator.I can see the > general purpose registers and other registers' value, but the thing is > when I drag a variable to watch window it says not in scope. > even when I drag TCNT0 it gives me the same massage.Would you please > help me on this matter. > thanks, I don't know about Codevision, but in avr-gcc, registers like TCNT0 aren't really variables; they're actually #defined as lvalue expressions like this: #define TCNT0 _SFR_IO8(0x32) which then expands to (*(volatile uint8_t *)((0x32)+0x20)) and so they're not really variables (and can't be watched, unless you have the ability to watch an arbitrary expression like that). Instead, you can look at the RAM space at the right address (in this case, on the Atmega128, it would be RAM address 0x52). (Or register 0x32, when used with the IN or OUT instructions).
Message
Re: [AVR-Chat] (Not in Scope)
2006-02-15 by Ned Konz
Attachments
- No local attachments were found for this message.