Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: (Not in Scope)

2006-02-18 by houman

--- In AVR-Chat@yahoogroups.com, Ned Konz <bikenomad@...> wrote:
>
> 
> 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).
>

thanks for your message.I could solve the problem.I should have 
Loaded the file with .coff extension in order to be able to watch 
the varibles.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.