[Tinyos-devel] TinyOS Application Assembler

Razvan Musaloiu-E. razvanm at cs.jhu.edu
Mon Dec 3 07:10:28 PST 2007


Hi!

I think it's easier to accomplish what you want by using avr-objdump -d. 
In the beggining you'll see a table with jumps and later in the 
code you'll see the code for them.

$avr-objdump -d main.exe
main.exe:     file format elf32-avr

Disassembly of section .text:

00000000 <__vectors>:
    0:   0c 94 49 00     jmp     0x92
    4:   0c 94 66 00     jmp     0xcc
    8:   0c 94 66 00     jmp     0xcc
    c:   0c 94 66 00     jmp     0xcc
   10:   0c 94 66 00     jmp     0xcc
   14:   0c 94 66 00     jmp     0xcc
   18:   0c 94 66 00     jmp     0xcc
...
00000092 <__init>:
   92:   11 24           eor     r1, r1
   94:   1f be           out     0x3f, r1        ; 63
   96:   cf ef           ldi     r28, 0xFF       ; 255
   98:   d0 e1           ldi     r29, 0x10       ; 16
   9a:   de bf           out     0x3e, r29       ; 62
   9c:   cd bf           out     0x3d, r28       ; 61
...

--
Razvan ME

On Mon, 3 Dec 2007, Jamie Coates wrote:

> Dear all,
>
> First let me apologise if I have made incorrect usage of this mailing 
> list, if I haven't then any answers you can give me to my question will 
> be greatly appreciated, else, would it be possible to be directed to the 
> correct list (if any) :)
> 
> Question:
>
> How do I change the compilation process for a TinyOS application so that 
> I can view the assembler code?
>
> Background:
>
> I want to be able to view the prologue and epilogue code for an 
> interrupt handler. So, after building a Tiny application (say, Blink) I 
> have access to a source file containing the program (app.c).
>
> When I run the avr-gcc over the source file with the -S flag, the 
> compiler will output the assembler for the application minus the 
> required interrupt code. During the process the compiler outputs 
> warnings that it is ignoring the __attribute((signal)), which would 
> explain why I cannot see the assembler code that I am interested in 
> viewing.
>
> The command I use is "avr-gcc -S app.c"
>
> I hope this is enough information to generate responses and any help 
> that you could give me is greatly appreciated,
>
>
> Jamie
>


More information about the Tinyos-devel mailing list