how to generate an asm program listing

westfw:
Add "-I yourSketchDir" to the obj dump cmd.

Thanks, that improved the situation somewhat. There is a keyword from the source line in the assembler list, but not everything, e.g. arguments of the functions are not there. Now loop() and setup() from the Blink.ino look like this:

00000100 <loop>:
loop():
C:\Program Files\Arduino/Blink.ino:20
 100:	80 91 00 01 	lds	r24, 0x0100
 104:	61 e0       	ldi	r22, 0x01	; 1
 106:	0e 94 b8 01 	call	0x370	; 0x370 <digitalWrite>
C:\Program Files\Arduino/Blink.ino:21
 10a:	68 ee       	ldi	r22, 0xE8	; 232
 10c:	73 e0       	ldi	r23, 0x03	; 3
 10e:	80 e0       	ldi	r24, 0x00	; 0
 110:	90 e0       	ldi	r25, 0x00	; 0
 112:	0e 94 e5 00 	call	0x1ca	; 0x1ca <delay>
C:\Program Files\Arduino/Blink.ino:22
 116:	80 91 00 01 	lds	r24, 0x0100
 11a:	60 e0       	ldi	r22, 0x00	; 0
 11c:	0e 94 b8 01 	call	0x370	; 0x370 <digitalWrite>
C:\Program Files\Arduino/Blink.ino:23
 120:	68 ee       	ldi	r22, 0xE8	; 232
 122:	73 e0       	ldi	r23, 0x03	; 3
 124:	80 e0       	ldi	r24, 0x00	; 0
 126:	90 e0       	ldi	r25, 0x00	; 0
 128:	0e 94 e5 00 	call	0x1ca	; 0x1ca <delay>
C:\Program Files\Arduino/Blink.ino:24
 12c:	08 95       	ret

0000012e <setup>:
setup():
C:\Program Files\Arduino/Blink.ino:15
 12e:	80 91 00 01 	lds	r24, 0x0100
 132:	61 e0       	ldi	r22, 0x01	; 1
 134:	0e 94 79 01 	call	0x2f2	; 0x2f2 <pinMode>
C:\Program Files\Arduino/Blink.ino:16
 138:	08 95       	ret

Is this the expected result or can it still be improved?

Edit. (blushing...). No, the assembler lists are the same! Something done wrong?
Arduino library routines are listed well, but the main sketch is not. E.g. the delay() is nice:

void delay(unsigned long ms)
{
	uint16_t start = (uint16_t)micros();

	while (ms > 0) {
 270:	21 15       	cp	r18, r1
 272:	31 05       	cpc	r19, r1
 274:	41 05       	cpc	r20, r1
 276:	51 05       	cpc	r21, r1
 278:	71 f6       	brne	.-100    	; 0x216 <delay+0x4c>
C:\Program Files\Arduino\hardware\arduino\cores\arduino/wiring.c:119
		if (((uint16_t)micros() - start) >= 1000) {
			ms--;
			start += 1000;
		}
	}
}
 27a:	08 95       	ret

Perhaps the main sketch should be modified to look like a library?

Edit: Now it worked with the -I -switch. :slight_smile: . I do not know what was wrong earlier. The info at
http://forum.arduino.cc/index.php?topic=160587.5;wap2
made me work harder and there was success. Thanks westfw!