On Thu, Oct 11, 2012 at 11:05 AM, Patrick Carney <[email protected]>wrote:

> Hello,
>
> I am currently debugging the BlinkToRadio application on a MicaZ mote.  I
> am debugging with the JTAG mkII debugger.  I would like to find where the
> Receive function resides in physical memory, but am unable to figure out
> how.  The Receive event is implemented in the BlinkToRadioC.nc file
> beginning on line 112.
>

What you want is to see the actual assembly code along with a symbol table.
  That will tell you where the linker put everything.

For the micaZ I beleive the tools you want are avr-objdump and avr-nm.
Take a look at the man pages.   The commands I use to generate listings and
symbol tables are:

msp430-objdump -d --source -w build/mm5t/main.exe > build/mm5t/main.lst
msp430-nm -an build/mm5t/main.exe > build/mm5t/main.sym

yours will be similar.   I build the mm5t platform.

you could do something like:

cd build/micaz
avr-objdump -d --source -w main.exe > main.lst
avr-nm -an main.exe > main.sym





> I understand that TinyOS uses static memory allocation.  This would mean
> that the location of the receive function would remain constant.
>

No.  The receive function is code so can move around depending on the tool
chain.

What static memory allocation means is RAM allocation.   There is by design
no malloc or a heap.   That is to minimize how many problems get introduced
by wild pointers.

That said.   Someone did go ahead an implement malloc and various forms of
dynamic memory allocation.   But you want to be very careful when using it.

Wild pointers can ruin your whole day.


>
> While debugging I have obtained these values: $pc = 17090, $sp = 0x80108b.
> I am not sure if these values will have any value in solving problem.
>

No not really helpful.   Not enough context.    But you are certainly
approaching the problem in a reasonable way.

BlinkToRadio is very old solid code.   What are you debugging?

eric



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



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to