[En-Nut-Discussion] "step over" and "step into" fail debugging with AVR Studio

José Vallet jose.vallet at hut.fi
Wed Feb 15 18:54:23 CET 2006


José Vallet wrote:

> My problem now is that I _cannot_ go step by step with AVR Studio. When 
> the debugger is pointing to a line of code, if I press the "step over" 
> button, instead of jumping to the next line of code it jumps deep inside 
>  NutOS code. Furthermore, if the debugger points to any of my functions 
> and press "step into" buttons, the debugger also goes inside all the 
> NutOS functions, not inside mine. As a result debugging is really 
> difficult.
> 
> Before I was able to include the debug info from NutOS in my .elf, I had 
> similar problems, but instead of jumping to the source code of NutOS, 
> AVR Studio's debugger was jumping to the assembler code ALL the time...
> 
> Anybody with the same problem? Any idea how to solve it?

Yes, very simple. Just check that the "target clock frequency" is set 
correctly in the JTAGICE mkII options
(while debugging go to Debug->JTAGICE mkII options Connection)

Simple, hah? Well, it took me one week of crazy "stepping into 
everything" to realize it. By default AVR Studio puts a clock of 1MHz, 
and that makes all the thing to work but in a really weird way (as 
explained before).

So now you know, don't try this at home! ;-)

José





More information about the En-Nut-Discussion mailing list