[Tinyos-help] telosb Debug

Eric Decker cire831 at gmail.com
Tue Nov 30 14:54:36 PST 2010


On Tue, Nov 30, 2010 at 2:09 PM, wasif masood <rwmasood at gmail.com> wrote:

>
> Actually, I am using Printfs everywhere but the thing is that sometimes my
> code reaches to a particular Printf and sometimes it just don't (may be halt
> somewhere). Printf is what I think, also a hit an trial approach, I know by
> that I can narrow down the problem but it might take some time, I was kind
> of thinking is there any appropriate way to do that.
> I once raised the similar question sometime ago on this forum, got the
> recommendation of using gdb.
>

Not sure what the context was for this recommendation.


> I am not that familiar with linux tools, so my question is that: can I use
> gdb to debug my necC generated code for telosb on my PC(as I dont have any
> JTAG device)?
>

I don't know what kind of development environment you are using.  I'm using
the gnu mspgcc toolchain running on Linux.  In that
environment I have to use msp430-gdb to debug my msp430 code compiled using
msp430-gcc (nesc invokes the appropriate compiler).

If you invoke "gdb main.exe" it will use the native gdb to try to debug a
msp430 main.exe.  Doesn't work very well.

And if you are using msp430-gdb you pretty much need to have a jtag for
accessing the actual running code.



>
> What I am doing now is just compile the code with make telosb and then run
> it using gdb as :
> gdb main.exe
> >run
> but I got this error:
> Starting program: /opt/tinyos-2.1.0/apps/Blink/build/telosb/main.exe
> /bin/bash: /opt/tinyos-2.1.0/apps/Blink/build/telosb/main.exe: cannot
> execute binary file
> /bin/bash: /opt/tinyos-2.1.0/apps/Blink/build/telosb/main.exe: Success
> During startup program exited with code 1.
>
> Is there a way out of that?
>
>
> On Tue, Nov 30, 2010 at 9:59 PM, Eric Decker <cire831 at gmail.com> wrote:
>
>> You mention using gdb...    Are you trying to make use of a jtag pod to
>> actually debug the code?
>>
>> If so I can help you get that running....
>>
>> eric
>>
>>
>>  On Tue, Nov 30, 2010 at 7:10 AM, wasif masood <rwmasood at gmail.com>wrote:
>>
>>>
>>> I am trying to use gdb, but when I compile using make telosb debug, it
>>> give me vector overwrite error since my code is too big to fit with debug
>>> flag enable. Can anyone please give me a hint what else can be done.
>>>
>>>
>>> On Tue, Nov 30, 2010 at 1:47 PM, wasif masood <rwmasood at gmail.com>wrote:
>>>
>>>>
>>>> Hi All,
>>>>
>>>> Is there any way I can debug my actual telosb install file on my PC. I
>>>> have written a code which is showing very strange behaviour, it seems that
>>>> at some point during execution, the code just crashes. What could be the
>>>> best option to check at which point my code gets corrupted.
>>>>
>>>> BR
>>>> Wasif Masood
>>>>
>>>>
>>>
>>>
>>> --
>>> Wasif Masood
>>>
>>>
>>> _______________________________________________
>>> Tinyos-help mailing list
>>> Tinyos-help at millennium.berkeley.edu
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>
>>
>>
>> --
>> Eric B. Decker
>> Senior (over 50 :-) Researcher
>>
>>
>>
>
>
> --
> Wasif Masood
>
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20101130/4ca92a9e/attachment.htm 


More information about the Tinyos-help mailing list