Andrey,

It seems to me that it's stepping properly. The .extra tells nesc and
gcc to compile without inlining and without optimizations, and generate
dwarf-2 debug information with source paths in windows format.

It will not work under linux (because of the windows-style paths), and
it won't work with gdb because dwarf-2 is only partly supported
(whatever that means).

I would be happy to hear back from you regarding your experience with
debugging in AvrStudio, though.

Janos

-----Original Message-----
From: Andrey Gursky [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 10, 2008 2:33 PM
To: Janos Sallai
Cc: [email protected]
Subject: Re: [Tinyos-help] debugging T2.1 code with AVR Studio

Hi Janos!

This is very interesting. Thanks in advance!

I'm using iris and micaz. I tried to use ddd in GNU/Linux and I am able 
to set breakpoints only at some lines in .nc that are be mapped from .nc

to app.c and debug the application with JTAG. But with "step" ddd/gdb 
doesn't really process only 1 line of code but goes throw the calls (so 
it works as "next").

Will it be possible under Windows with AVRStudio to step properly throw 
the code? And is this possible to use your .extra with or without 
changes to debug/simulate under GNU/Linux?

Thanks,
Andrey



Janos Sallai wrote:
> For those discontented with gdb and in desperate need of visual
> source-level debugging support for TinyOS: I have added support for
> debugging iris applications using AVR Studio. 
> 
>  
> 
> To use it, first download and install AVR Studio (
> http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=2725 ). 
> 
>  
> 
> Then, check out the CVS head, or drop the file avr-studio-debug.extra
(
>
http://tinyos.cvs.sourceforge.net/*checkout*/tinyos/tinyos-2.x/support/m
> ake/avr/avr-studio-debug.extra ) into support/make/avr/ in the TinyOS
> 2.1 release tree. 
> 
>  
> 
> To compile an ELF image that can be loaded with AVR Studio, type
> 
>  
> 
> make iris avr-studio-debug
> 
>  
> 
> Finally, launch AVR Studio, open the main.elf file under build/iris/.
> Choose your debug platform (simulator or JTAG emulator) and your
device
> (ATMega1281 for iris) then click Finish. If everything goes well, AVR
> Studio will open the source code of RealMainP.nc and position the
cursor
> at the entry point of the program and you are ready to visually debug.
> 
>  
> 
> Beside the iris mote, this should work with mica2/micaz as well. Just
> substitute iris above with your favorite AVR-based mote platform. 
> 
>  
> 
> Janos
> 
>  
> 
> 
> 
> 
>
------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
>
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.169 / Virus Database: 270.6.19/1664 - Release Date:
9/10/2008 6:00 AM

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to