This commit is contained in:
2016-02-02 14:55:04 +01:00
parent e3c373c920
commit 2c1459b485
4 changed files with 68 additions and 67 deletions
+37 -40
View File
@@ -11,21 +11,21 @@ Idx Name Size VMA LMA File off Algn
CONTENTS, READONLY
3 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00000168 2**2
CONTENTS, READONLY
4 .debug_aranges 00000028 00000000 00000000 000001a4 2**0
4 .debug_aranges 00000030 00000000 00000000 000001a4 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_info 0000017b 00000000 00000000 000001cc 2**0
5 .debug_info 000001bc 00000000 00000000 000001d4 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_abbrev 00000115 00000000 00000000 00000347 2**0
6 .debug_abbrev 00000138 00000000 00000000 00000390 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_line 00000173 00000000 00000000 0000045c 2**0
7 .debug_line 0000016b 00000000 00000000 000004c8 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_frame 00000034 00000000 00000000 000005d0 2**2
8 .debug_frame 00000044 00000000 00000000 00000634 2**2
CONTENTS, READONLY, DEBUGGING
9 .debug_str 0000017c 00000000 00000000 00000604 2**0
9 .debug_str 00000184 00000000 00000000 00000678 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_loc 0000006a 00000000 00000000 00000780 2**0
10 .debug_loc 0000006a 00000000 00000000 000007fc 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_ranges 00000018 00000000 00000000 000007ea 2**0
11 .debug_ranges 00000020 00000000 00000000 00000866 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
@@ -109,7 +109,7 @@ Disassembly of section .text:
92: d0 e1 ldi r29, 0x10 ; 16
94: de bf out 0x3e, r29 ; 62
96: cd bf out 0x3d, r28 ; 61
98: 13 d0 rcall .+38 ; 0xc0 <main>
98: 1e d0 rcall .+60 ; 0xd6 <main>
9a: 21 c0 rjmp .+66 ; 0xde <_exit>
0000009c <__bad_interrupt>:
@@ -146,47 +146,44 @@ Version : DMK, Initial code
bc: a9 f7 brne .-22 ; 0xa8 <wait+0xa>
be: 08 95 ret
000000c0 <main>:
000000c0 <opgave1>:
return 1;
}
void opgave1(void)
{
PORTD = 0b10000000;
c0: 80 e8 ldi r24, 0x80 ; 128
c2: 82 bb out 0x12, r24 ; 18
wait( 500 );
c4: 84 ef ldi r24, 0xF4 ; 244
c6: 91 e0 ldi r25, 0x01 ; 1
c8: ea df rcall .-44 ; 0x9e <wait>
PORTD = 0b01000000;
ca: 80 e4 ldi r24, 0x40 ; 64
cc: 82 bb out 0x12, r24 ; 18
wait ( 500 );
ce: 84 ef ldi r24, 0xF4 ; 244
d0: 91 e0 ldi r25, 0x01 ; 1
d2: e5 cf rjmp .-54 ; 0x9e <wait>
d4: 08 95 ret
000000d6 <main>:
}
}
int main(void)
{
DDRD = 0b11111111; // All pins PORTD are set to output
c0: 8f ef ldi r24, 0xFF ; 255
c2: 81 bb out 0x11, r24 ; 17
PORTD = 0b00000001;
c4: 81 e0 ldi r24, 0x01 ; 1
c6: 82 bb out 0x12, r24 ; 18
d6: 8f ef ldi r24, 0xFF ; 255
d8: 81 bb out 0x11, r24 ; 17
while (1)
{
PORTD = 0b10000000;
c8: d0 e8 ldi r29, 0x80 ; 128
wait( 500 );
PORTD = 0b01000000;
ca: c0 e4 ldi r28, 0x40 ; 64
PORTD = 0b00000001;
while (1)
{
PORTD = 0b10000000;
cc: d2 bb out 0x12, r29 ; 18
wait( 500 );
ce: 84 ef ldi r24, 0xF4 ; 244
d0: 91 e0 ldi r25, 0x01 ; 1
d2: e5 df rcall .-54 ; 0x9e <wait>
PORTD = 0b01000000;
d4: c2 bb out 0x12, r28 ; 18
wait ( 500 );
d6: 84 ef ldi r24, 0xF4 ; 244
d8: 91 e0 ldi r25, 0x01 ; 1
da: e1 df rcall .-62 ; 0x9e <wait>
opgave1( );
da: f2 df rcall .-28 ; 0xc0 <opgave1>
}
dc: f7 cf rjmp .-18 ; 0xcc <main+0xc>
dc: fe cf rjmp .-4 ; 0xda <main+0x4>
000000de <_exit>:
de: f8 94 cli
+19 -17
View File
@@ -236,8 +236,10 @@ END GROUP
*(.text.*)
.text.wait 0x0000009e 0x22 main.o
0x0000009e wait
.text.main 0x000000c0 0x1e main.o
0x000000c0 main
.text.opgave1 0x000000c0 0x16 main.o
0x000000c0 opgave1
.text.main 0x000000d6 0x8 main.o
0x000000d6 main
0x000000de . = ALIGN (0x2)
*(.fini9)
.fini9 0x000000de 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_exit.o)
@@ -354,34 +356,34 @@ END GROUP
.debug_sfnames
*(.debug_sfnames)
.debug_aranges 0x00000000 0x28
.debug_aranges 0x00000000 0x30
*(.debug_aranges)
.debug_aranges
0x00000000 0x28 main.o
0x00000000 0x30 main.o
.debug_pubnames
*(.debug_pubnames)
.debug_info 0x00000000 0x17b
.debug_info 0x00000000 0x1bc
*(.debug_info .gnu.linkonce.wi.*)
.debug_info 0x00000000 0x17b main.o
.debug_info 0x00000000 0x1bc main.o
.debug_abbrev 0x00000000 0x115
.debug_abbrev 0x00000000 0x138
*(.debug_abbrev)
.debug_abbrev 0x00000000 0x115 main.o
.debug_abbrev 0x00000000 0x138 main.o
.debug_line 0x00000000 0x173
.debug_line 0x00000000 0x16b
*(.debug_line .debug_line.* .debug_line_end)
.debug_line 0x00000000 0x173 main.o
.debug_line 0x00000000 0x16b main.o
.debug_frame 0x00000000 0x34
.debug_frame 0x00000000 0x44
*(.debug_frame)
.debug_frame 0x00000000 0x34 main.o
.debug_frame 0x00000000 0x44 main.o
.debug_str 0x00000000 0x17c
.debug_str 0x00000000 0x184
*(.debug_str)
.debug_str 0x00000000 0x17c main.o
0x1b0 (size before relaxing)
.debug_str 0x00000000 0x184 main.o
0x1b8 (size before relaxing)
.debug_loc 0x00000000 0x6a
*(.debug_loc)
@@ -405,9 +407,9 @@ END GROUP
.debug_pubtypes
*(.debug_pubtypes)
.debug_ranges 0x00000000 0x18
.debug_ranges 0x00000000 0x20
*(.debug_ranges)
.debug_ranges 0x00000000 0x18 main.o
.debug_ranges 0x00000000 0x20 main.o
.debug_macro
*(.debug_macro)
+3 -3
View File
@@ -8,10 +8,10 @@ S113005025C0000023C0000021C000001FC0000014
S11300601DC000001BC0000019C0000017C0000024
S113007015C0000013C0000011C000000FC0000034
S11300800DC000000BC0000009C0000011241FBEF9
S1130090CFEFD0E1DEBFCDBF13D021C0B1CF181652
S1130090CFEFD0E1DEBFCDBF1ED021C0B1CF181647
S11300A019066CF420E030E0EFECF7E03197F1F75B
S11300B000C000002F5F3F4F28173907A9F70895A4
S11300C08FEF81BB81E082BBD0E8C0E4D2BB84EF78
S11300D091E0E5DFC2BB84EF91E0E1DFF7CFF89474
S11300C080E882BB84EF91E0EADF80E482BB84EFC6
S11300D091E0E5CF08958FEF81BBF2DFFECFF89476
S10500E0FFCF4C
S9030000FC