[Tinyos-help] telosb Debug

wasif masood rwmasood at gmail.com
Tue Nov 30 14:09:51 PST 2010


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.
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)?

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20101130/482d2abd/attachment.htm 


More information about the Tinyos-help mailing list