After compiling arduino creats in a temporary folder a file named xxx.cpp.elf. In folder \arduino-1.0.1\hardware\tools\avr\bin is a tool named avr-objdump
This tool can create a disassembled view, mixed with sourcecode (using switch -S)
E:\arduino\arduino-1.0.1\hardware\tools\avr\bin>avr-objdump
Usage: avr-objdump <option(s)> <file(s)>
Display information from object <file(s)>.
At least one of the following switches must be given:
-a, --archive-headers Display archive header information
-f, --file-headers Display the contents of the overall file header
-p, --private-headers Display object format specific file header contents
-h, --[section-]headers Display the contents of the section headers
-x, --all-headers Display the contents of all headers
-d, --disassemble Display assembler contents of executable sections
-D, --disassemble-all Display assembler contents of all sections
-S, --source Intermix source code with disassembly
-s, --full-contents Display the full contents of all sections requested
-g, --debugging Display debug information in object file
-e, --debugging-tags Display debug information using ctags style
-G, --stabs Display (in raw form) any STABS info in the file
-W, --dwarf Display DWARF info in the file
-t, --syms Display the contents of the symbol table(s)
-T, --dynamic-syms Display the contents of the dynamic symbol table
-r, --reloc Display the relocation entries in the file
-R, --dynamic-reloc Display the dynamic relocation entries in the file
@<file> Read options from <file>
-v, --version Display this program's version number
-i, --info List object formats and architectures supported
-H, --help Display this information
E:\arduino\arduino-1.0.1\hardware\tools\avr\bin>avr-objdump -S C:\Users\storchi\
AppData\Local\Temp\build6297938879979629311.tmp\kaiman6x6_test.cpp.elf >d:\xx.tx
t
output:
[code]
cpp.elf: file format elf32-avr
Disassembly of section .text:
00000000 <__vectors>:
return motor_r.steps;
}
void set_motor_power(int power_left,int power_right)
0: 43 c1 rjmp .+646 ; 0x288 <__ctors_end>
}
//der grundlegende Algorithmus wurde dem ct-bot entliehen...
void pid_left(void)
2: 00 00 nop
command(LCD_ENTRYMODESET | _displaymode);
}
// Allows us to fill the first 8 CGRAM locations
// with custom characters
void LiquidCrystal::createChar(uint8_t location, uint8_t charmap[]) {
4: 0c 94 9e 0d jmp 0x1b3c ; 0x1b3c <__vector_1>
#endif
}
}
}
void detachInterrupt(uint8_t interruptNum) {
8: 0c 94 cf 0d jmp 0x1b9e ; 0x1b9e <__vector_2>
timer0_millis = m;
timer0_overflow_count++;
}
unsigned long millis()
{
c: 0c 94 00 0e jmp 0x1c00 ; 0x1c00 <__vector_3>
{
// can't actually set the register here because the default setting
// will connect AVCC and the AREF pin, which would cause a short if
// there's something connected to AREF.
analog_reference = mode;
}
10: 0c 94 31 0e jmp 0x1c62 ; 0x1c62 <__vector_4>
SREG = oldSREG;
}
int digitalRead(uint8_t pin)
{
14: 0c 94 62 0e jmp 0x1cc4 ; 0x1cc4 <__vector_5>
HardwareSerial::HardwareSerial(ring_buffer *rx_buffer, ring_buffer *tx_buffer,
volatile uint8_t *ubrrh, volatile uint8_t *ubrrl,
volatile uint8_t *ucsra, volatile uint8_t *ucsrb,
volatile uint8_t *udr,
uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udrie, uint8_t u2x)
18: 0c 94 93 0e jmp 0x1d26 ; 0x1d26 <__vector_6>
size_t n = print(ifsh);
n += println();
return n;
}
size_t Print::print(const Printable& x)
1c: 0c 94 c4 0e jmp 0x1d88 ; 0x1d88 <__vector_7>
20: 0c 94 f5 0e jmp 0x1dea ; 0x1dea <__vector_8>
24: 5e c1 rjmp .+700 ; 0x2e2 <__bad_interrupt>