Week 2 t/m opg 3
This commit is contained in:
Binary file not shown.
+165
-127
@@ -3,31 +3,31 @@ MIC-Week1.elf: file format elf32-avr
|
||||
|
||||
Sections:
|
||||
Idx Name Size VMA LMA File off Algn
|
||||
0 .data 00000002 00800100 00000252 000002e6 2**0
|
||||
0 .data 00000050 00800100 00000296 0000032a 2**0
|
||||
CONTENTS, ALLOC, LOAD, DATA
|
||||
1 .text 00000252 00000000 00000000 00000094 2**1
|
||||
1 .text 00000296 00000000 00000000 00000094 2**1
|
||||
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||
2 .bss 00000008 00800102 00800102 000002e8 2**0
|
||||
2 .bss 00000008 00800150 00800150 0000037a 2**0
|
||||
ALLOC
|
||||
3 .comment 00000030 00000000 00000000 000002e8 2**0
|
||||
3 .comment 00000030 00000000 00000000 0000037a 2**0
|
||||
CONTENTS, READONLY
|
||||
4 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00000318 2**2
|
||||
4 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 000003ac 2**2
|
||||
CONTENTS, READONLY
|
||||
5 .debug_aranges 00000070 00000000 00000000 00000354 2**0
|
||||
5 .debug_aranges 00000070 00000000 00000000 000003e8 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
6 .debug_info 00000422 00000000 00000000 000003c4 2**0
|
||||
6 .debug_info 00000422 00000000 00000000 00000458 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
7 .debug_abbrev 000001e3 00000000 00000000 000007e6 2**0
|
||||
7 .debug_abbrev 000001e3 00000000 00000000 0000087a 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
8 .debug_line 000003ce 00000000 00000000 000009c9 2**0
|
||||
8 .debug_line 000003ce 00000000 00000000 00000a5d 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
9 .debug_frame 000000ec 00000000 00000000 00000d98 2**2
|
||||
9 .debug_frame 000000ec 00000000 00000000 00000e2c 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
10 .debug_str 00000220 00000000 00000000 00000e84 2**0
|
||||
10 .debug_str 0000022b 00000000 00000000 00000f18 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
11 .debug_loc 00000163 00000000 00000000 000010a4 2**0
|
||||
11 .debug_loc 00000163 00000000 00000000 00001143 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
12 .debug_ranges 00000060 00000000 00000000 00001207 2**0
|
||||
12 .debug_ranges 00000060 00000000 00000000 000012a6 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
|
||||
Disassembly of section .text:
|
||||
@@ -116,20 +116,20 @@ Disassembly of section .text:
|
||||
98: 11 e0 ldi r17, 0x01 ; 1
|
||||
9a: a0 e0 ldi r26, 0x00 ; 0
|
||||
9c: b1 e0 ldi r27, 0x01 ; 1
|
||||
9e: e2 e5 ldi r30, 0x52 ; 82
|
||||
9e: e6 e9 ldi r30, 0x96 ; 150
|
||||
a0: f2 e0 ldi r31, 0x02 ; 2
|
||||
a2: 00 e0 ldi r16, 0x00 ; 0
|
||||
a4: 0b bf out 0x3b, r16 ; 59
|
||||
a6: 02 c0 rjmp .+4 ; 0xac <__do_copy_data+0x14>
|
||||
a8: 07 90 elpm r0, Z+
|
||||
aa: 0d 92 st X+, r0
|
||||
ac: a2 30 cpi r26, 0x02 ; 2
|
||||
ac: a0 35 cpi r26, 0x50 ; 80
|
||||
ae: b1 07 cpc r27, r17
|
||||
b0: d9 f7 brne .-10 ; 0xa8 <__do_copy_data+0x10>
|
||||
|
||||
000000b2 <__do_clear_bss>:
|
||||
b2: 21 e0 ldi r18, 0x01 ; 1
|
||||
b4: a2 e0 ldi r26, 0x02 ; 2
|
||||
b4: a0 e5 ldi r26, 0x50 ; 80
|
||||
b6: b1 e0 ldi r27, 0x01 ; 1
|
||||
b8: 01 c0 rjmp .+2 ; 0xbc <.do_clear_bss_start>
|
||||
|
||||
@@ -137,40 +137,40 @@ Disassembly of section .text:
|
||||
ba: 1d 92 st X+, r1
|
||||
|
||||
000000bc <.do_clear_bss_start>:
|
||||
bc: aa 30 cpi r26, 0x0A ; 10
|
||||
bc: a8 35 cpi r26, 0x58 ; 88
|
||||
be: b2 07 cpc r27, r18
|
||||
c0: e1 f7 brne .-8 ; 0xba <.do_clear_bss_loop>
|
||||
c2: b6 d0 rcall .+364 ; 0x230 <main>
|
||||
c4: c4 c0 rjmp .+392 ; 0x24e <_exit>
|
||||
c2: d8 d0 rcall .+432 ; 0x274 <main>
|
||||
c4: e6 c0 rjmp .+460 ; 0x292 <_exit>
|
||||
|
||||
000000c6 <__bad_interrupt>:
|
||||
c6: 9c cf rjmp .-200 ; 0x0 <__vectors>
|
||||
|
||||
000000c8 <wait>:
|
||||
if( (0b00000001 & PINC) != 0 )
|
||||
{
|
||||
PORTD = 0b10000000;
|
||||
wait( 100 );
|
||||
PORTD = 0b00000000;
|
||||
wait( 100 );
|
||||
}
|
||||
|
||||
if(direction)
|
||||
PORTD = (PORTD>>1); //Naar een hogere waarde shiften
|
||||
else
|
||||
PORTD = (PORTD<<1); //Naar een lagere waarde shiften
|
||||
c8: 18 16 cp r1, r24
|
||||
ca: 19 06 cpc r1, r25
|
||||
cc: 0c f5 brge .+66 ; 0x110 <wait+0x48>
|
||||
ce: 20 91 08 01 lds r18, 0x0108
|
||||
d2: 30 91 09 01 lds r19, 0x0109
|
||||
ce: 20 91 56 01 lds r18, 0x0156
|
||||
d2: 30 91 57 01 lds r19, 0x0157
|
||||
d6: 21 30 cpi r18, 0x01 ; 1
|
||||
d8: 31 05 cpc r19, r1
|
||||
da: 51 f0 breq .+20 ; 0xf0 <wait+0x28>
|
||||
dc: 20 e0 ldi r18, 0x00 ; 0
|
||||
de: 30 e0 ldi r19, 0x00 ; 0
|
||||
e0: 0c c0 rjmp .+24 ; 0xfa <wait+0x32>
|
||||
e2: 40 91 08 01 lds r20, 0x0108
|
||||
e6: 50 91 09 01 lds r21, 0x0109
|
||||
e2: 40 91 56 01 lds r20, 0x0156
|
||||
e6: 50 91 57 01 lds r21, 0x0157
|
||||
ea: 41 30 cpi r20, 0x01 ; 1
|
||||
ec: 51 05 cpc r21, r1
|
||||
ee: 29 f4 brne .+10 ; 0xfa <wait+0x32>
|
||||
f0: 10 92 09 01 sts 0x0109, r1
|
||||
f4: 10 92 08 01 sts 0x0108, r1
|
||||
f0: 10 92 57 01 sts 0x0157, r1
|
||||
f4: 10 92 56 01 sts 0x0156, r1
|
||||
f8: 08 95 ret
|
||||
fa: ef ec ldi r30, 0xCF ; 207
|
||||
fc: f7 e0 ldi r31, 0x07 ; 7
|
||||
@@ -196,67 +196,67 @@ Disassembly of section .text:
|
||||
120: 9f 93 push r25
|
||||
122: 98 9b sbis 0x13, 0 ; 19
|
||||
124: 1a c0 rjmp .+52 ; 0x15a <__vector_16+0x48>
|
||||
126: 80 91 06 01 lds r24, 0x0106
|
||||
12a: 90 91 07 01 lds r25, 0x0107
|
||||
126: 80 91 52 01 lds r24, 0x0152
|
||||
12a: 90 91 53 01 lds r25, 0x0153
|
||||
12e: 89 2b or r24, r25
|
||||
130: a1 f4 brne .+40 ; 0x15a <__vector_16+0x48>
|
||||
132: 80 91 00 01 lds r24, 0x0100
|
||||
136: 90 91 01 01 lds r25, 0x0101
|
||||
132: 80 91 4b 01 lds r24, 0x014B
|
||||
136: 90 91 4c 01 lds r25, 0x014C
|
||||
13a: 88 0f add r24, r24
|
||||
13c: 99 1f adc r25, r25
|
||||
13e: 90 93 01 01 sts 0x0101, r25
|
||||
142: 80 93 00 01 sts 0x0100, r24
|
||||
13e: 90 93 4c 01 sts 0x014C, r25
|
||||
142: 80 93 4b 01 sts 0x014B, r24
|
||||
146: 81 e0 ldi r24, 0x01 ; 1
|
||||
148: 90 e0 ldi r25, 0x00 ; 0
|
||||
14a: 90 93 09 01 sts 0x0109, r25
|
||||
14e: 80 93 08 01 sts 0x0108, r24
|
||||
152: 90 93 07 01 sts 0x0107, r25
|
||||
156: 80 93 06 01 sts 0x0106, r24
|
||||
14a: 90 93 57 01 sts 0x0157, r25
|
||||
14e: 80 93 56 01 sts 0x0156, r24
|
||||
152: 90 93 53 01 sts 0x0153, r25
|
||||
156: 80 93 52 01 sts 0x0152, r24
|
||||
15a: 99 9b sbis 0x13, 1 ; 19
|
||||
15c: 1d c0 rjmp .+58 ; 0x198 <__vector_16+0x86>
|
||||
15e: 80 91 04 01 lds r24, 0x0104
|
||||
162: 90 91 05 01 lds r25, 0x0105
|
||||
15e: 80 91 50 01 lds r24, 0x0150
|
||||
162: 90 91 51 01 lds r25, 0x0151
|
||||
166: 89 2b or r24, r25
|
||||
168: b9 f4 brne .+46 ; 0x198 <__vector_16+0x86>
|
||||
16a: 80 91 00 01 lds r24, 0x0100
|
||||
16e: 90 91 01 01 lds r25, 0x0101
|
||||
16a: 80 91 4b 01 lds r24, 0x014B
|
||||
16e: 90 91 4c 01 lds r25, 0x014C
|
||||
172: 99 23 and r25, r25
|
||||
174: 0c f4 brge .+2 ; 0x178 <__vector_16+0x66>
|
||||
176: 01 96 adiw r24, 0x01 ; 1
|
||||
178: 95 95 asr r25
|
||||
17a: 87 95 ror r24
|
||||
17c: 90 93 01 01 sts 0x0101, r25
|
||||
180: 80 93 00 01 sts 0x0100, r24
|
||||
17c: 90 93 4c 01 sts 0x014C, r25
|
||||
180: 80 93 4b 01 sts 0x014B, r24
|
||||
184: 81 e0 ldi r24, 0x01 ; 1
|
||||
186: 90 e0 ldi r25, 0x00 ; 0
|
||||
188: 90 93 09 01 sts 0x0109, r25
|
||||
18c: 80 93 08 01 sts 0x0108, r24
|
||||
190: 90 93 05 01 sts 0x0105, r25
|
||||
194: 80 93 04 01 sts 0x0104, r24
|
||||
188: 90 93 57 01 sts 0x0157, r25
|
||||
18c: 80 93 56 01 sts 0x0156, r24
|
||||
190: 90 93 51 01 sts 0x0151, r25
|
||||
194: 80 93 50 01 sts 0x0150, r24
|
||||
198: 83 b3 in r24, 0x13 ; 19
|
||||
19a: 81 11 cpse r24, r1
|
||||
19c: 08 c0 rjmp .+16 ; 0x1ae <__vector_16+0x9c>
|
||||
19e: 10 92 07 01 sts 0x0107, r1
|
||||
1a2: 10 92 06 01 sts 0x0106, r1
|
||||
1a6: 10 92 05 01 sts 0x0105, r1
|
||||
1aa: 10 92 04 01 sts 0x0104, r1
|
||||
1ae: 80 91 00 01 lds r24, 0x0100
|
||||
1b2: 90 91 01 01 lds r25, 0x0101
|
||||
19e: 10 92 53 01 sts 0x0153, r1
|
||||
1a2: 10 92 52 01 sts 0x0152, r1
|
||||
1a6: 10 92 51 01 sts 0x0151, r1
|
||||
1aa: 10 92 50 01 sts 0x0150, r1
|
||||
1ae: 80 91 4b 01 lds r24, 0x014B
|
||||
1b2: 90 91 4c 01 lds r25, 0x014C
|
||||
1b6: 84 31 cpi r24, 0x14 ; 20
|
||||
1b8: 91 05 cpc r25, r1
|
||||
1ba: 3c f4 brge .+14 ; 0x1ca <__vector_16+0xb8>
|
||||
1bc: 84 e1 ldi r24, 0x14 ; 20
|
||||
1be: 90 e0 ldi r25, 0x00 ; 0
|
||||
1c0: 90 93 01 01 sts 0x0101, r25
|
||||
1c4: 80 93 00 01 sts 0x0100, r24
|
||||
1c0: 90 93 4c 01 sts 0x014C, r25
|
||||
1c4: 80 93 4b 01 sts 0x014B, r24
|
||||
1c8: 09 c0 rjmp .+18 ; 0x1dc <__vector_16+0xca>
|
||||
1ca: 81 3a cpi r24, 0xA1 ; 161
|
||||
1cc: 9f 40 sbci r25, 0x0F ; 15
|
||||
1ce: 34 f0 brlt .+12 ; 0x1dc <__vector_16+0xca>
|
||||
1d0: 80 ea ldi r24, 0xA0 ; 160
|
||||
1d2: 9f e0 ldi r25, 0x0F ; 15
|
||||
1d4: 90 93 01 01 sts 0x0101, r25
|
||||
1d8: 80 93 00 01 sts 0x0100, r24
|
||||
1d4: 90 93 4c 01 sts 0x014C, r25
|
||||
1d8: 80 93 4b 01 sts 0x014B, r24
|
||||
1dc: 9f 91 pop r25
|
||||
1de: 8f 91 pop r24
|
||||
1e0: 2f 91 pop r18
|
||||
@@ -266,105 +266,143 @@ Disassembly of section .text:
|
||||
1e8: 1f 90 pop r1
|
||||
1ea: 18 95 reti
|
||||
|
||||
000001ec <opgave4>:
|
||||
}
|
||||
000001ec <opgave5>:
|
||||
}
|
||||
|
||||
void opgave4(void)
|
||||
void opgave5(void)
|
||||
{
|
||||
wait( 50 );
|
||||
1ec: 82 e3 ldi r24, 0x32 ; 50
|
||||
1ee: 90 e0 ldi r25, 0x00 ; 0
|
||||
1f0: 6b df rcall .-298 ; 0xc8 <wait>
|
||||
if (PORTD>= 0x80)
|
||||
1f2: 97 9b sbis 0x12, 7 ; 18
|
||||
1f4: 07 c0 rjmp .+14 ; 0x204 <opgave4+0x18>
|
||||
//Als een knop ingedrukt wordt, wordt de waarde daarvan de snelheid. Werkt niet met system interrupts, dus je moet de knop soms ingedrukt houden
|
||||
if(PINC != 0 )
|
||||
1ec: 83 b3 in r24, 0x13 ; 19
|
||||
1ee: 88 23 and r24, r24
|
||||
1f0: 31 f0 breq .+12 ; 0x1fe <opgave5+0x12>
|
||||
{
|
||||
direction = 1;
|
||||
1f6: 81 e0 ldi r24, 0x01 ; 1
|
||||
1f8: 90 e0 ldi r25, 0x00 ; 0
|
||||
1fa: 90 93 03 01 sts 0x0103, r25
|
||||
1fe: 80 93 02 01 sts 0x0102, r24
|
||||
202: 0e c0 rjmp .+28 ; 0x220 <opgave4+0x34>
|
||||
}
|
||||
else if (PORTD <= 0x1)
|
||||
204: 82 b3 in r24, 0x12 ; 18
|
||||
206: 82 30 cpi r24, 0x02 ; 2
|
||||
208: 28 f4 brcc .+10 ; 0x214 <opgave4+0x28>
|
||||
{
|
||||
direction = 0;
|
||||
20a: 10 92 03 01 sts 0x0103, r1
|
||||
20e: 10 92 02 01 sts 0x0102, r1
|
||||
212: 0a c0 rjmp .+20 ; 0x228 <opgave4+0x3c>
|
||||
speed = PINC;
|
||||
1f2: 83 b3 in r24, 0x13 ; 19
|
||||
1f4: 90 e0 ldi r25, 0x00 ; 0
|
||||
1f6: 90 93 4e 01 sts 0x014E, r25
|
||||
1fa: 80 93 4d 01 sts 0x014D, r24
|
||||
}
|
||||
|
||||
if(direction)
|
||||
214: 80 91 02 01 lds r24, 0x0102
|
||||
218: 90 91 03 01 lds r25, 0x0103
|
||||
21c: 89 2b or r24, r25
|
||||
21e: 21 f0 breq .+8 ; 0x228 <opgave4+0x3c>
|
||||
PORTD = (PORTD>>1);
|
||||
220: 82 b3 in r24, 0x12 ; 18
|
||||
222: 86 95 lsr r24
|
||||
224: 82 bb out 0x12, r24 ; 18
|
||||
226: 08 95 ret
|
||||
else
|
||||
PORTD = (PORTD<<1);
|
||||
228: 82 b3 in r24, 0x12 ; 18
|
||||
22a: 88 0f add r24, r24
|
||||
22c: 82 bb out 0x12, r24 ; 18
|
||||
22e: 08 95 ret
|
||||
//Schrijf de data van het huidige patroon naar PORTD
|
||||
PORTD = pattern[count].data;
|
||||
1fe: 80 91 54 01 lds r24, 0x0154
|
||||
202: 90 91 55 01 lds r25, 0x0155
|
||||
206: fc 01 movw r30, r24
|
||||
208: ee 0f add r30, r30
|
||||
20a: ff 1f adc r31, r31
|
||||
20c: 8e 0f add r24, r30
|
||||
20e: 9f 1f adc r25, r31
|
||||
210: fc 01 movw r30, r24
|
||||
212: e0 50 subi r30, 0x00 ; 0
|
||||
214: ff 4f sbci r31, 0xFF ; 255
|
||||
216: 80 81 ld r24, Z
|
||||
218: 82 bb out 0x12, r24 ; 18
|
||||
//Wacht het aantal milliseconde dat in het huidige patroon staat
|
||||
wait(pattern[count].delay * speed);
|
||||
21a: 80 91 54 01 lds r24, 0x0154
|
||||
21e: 90 91 55 01 lds r25, 0x0155
|
||||
222: fc 01 movw r30, r24
|
||||
224: ee 0f add r30, r30
|
||||
226: ff 1f adc r31, r31
|
||||
228: 8e 0f add r24, r30
|
||||
22a: 9f 1f adc r25, r31
|
||||
22c: fc 01 movw r30, r24
|
||||
22e: e0 50 subi r30, 0x00 ; 0
|
||||
230: ff 4f sbci r31, 0xFF ; 255
|
||||
232: 20 91 4d 01 lds r18, 0x014D
|
||||
236: 30 91 4e 01 lds r19, 0x014E
|
||||
23a: 81 81 ldd r24, Z+1 ; 0x01
|
||||
23c: 92 81 ldd r25, Z+2 ; 0x02
|
||||
23e: ac 01 movw r20, r24
|
||||
240: 24 9f mul r18, r20
|
||||
242: c0 01 movw r24, r0
|
||||
244: 25 9f mul r18, r21
|
||||
246: 90 0d add r25, r0
|
||||
248: 34 9f mul r19, r20
|
||||
24a: 90 0d add r25, r0
|
||||
24c: 11 24 eor r1, r1
|
||||
24e: 3c df rcall .-392 ; 0xc8 <wait>
|
||||
|
||||
00000230 <main>:
|
||||
count++; //patroon verder
|
||||
250: 80 91 54 01 lds r24, 0x0154
|
||||
254: 90 91 55 01 lds r25, 0x0155
|
||||
258: 01 96 adiw r24, 0x01 ; 1
|
||||
|
||||
//als alle patronen geweest zijn, opnieuw beginnen
|
||||
if(count >= NELEMS(pattern))
|
||||
25a: 89 31 cpi r24, 0x19 ; 25
|
||||
25c: 91 05 cpc r25, r1
|
||||
25e: 28 f4 brcc .+10 ; 0x26a <opgave5+0x7e>
|
||||
//Schrijf de data van het huidige patroon naar PORTD
|
||||
PORTD = pattern[count].data;
|
||||
//Wacht het aantal milliseconde dat in het huidige patroon staat
|
||||
wait(pattern[count].delay * speed);
|
||||
|
||||
count++; //patroon verder
|
||||
260: 90 93 55 01 sts 0x0155, r25
|
||||
264: 80 93 54 01 sts 0x0154, r24
|
||||
268: 08 95 ret
|
||||
|
||||
//als alle patronen geweest zijn, opnieuw beginnen
|
||||
if(count >= NELEMS(pattern))
|
||||
{
|
||||
count = 0;
|
||||
26a: 10 92 55 01 sts 0x0155, r1
|
||||
26e: 10 92 54 01 sts 0x0154, r1
|
||||
272: 08 95 ret
|
||||
|
||||
00000274 <main>:
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
DDRC = 0b00000000; //input
|
||||
230: 14 ba out 0x14, r1 ; 20
|
||||
274: 14 ba out 0x14, r1 ; 20
|
||||
DDRD = 0b11111111; //output
|
||||
232: 8f ef ldi r24, 0xFF ; 255
|
||||
234: 81 bb out 0x11, r24 ; 17
|
||||
276: 8f ef ldi r24, 0xFF ; 255
|
||||
278: 81 bb out 0x11, r24 ; 17
|
||||
|
||||
// Prescaler
|
||||
TCCR0 |= (1 << CS01) | (1 << CS00);
|
||||
236: 83 b7 in r24, 0x33 ; 51
|
||||
238: 83 60 ori r24, 0x03 ; 3
|
||||
23a: 83 bf out 0x33, r24 ; 51
|
||||
//Enable Overflow Interrupt Enable
|
||||
27a: 83 b7 in r24, 0x33 ; 51
|
||||
27c: 83 60 ori r24, 0x03 ; 3
|
||||
27e: 83 bf out 0x33, r24 ; 51
|
||||
//Het overflow event aanzetten
|
||||
TIMSK|=(1<<TOIE0);
|
||||
23c: 87 b7 in r24, 0x37 ; 55
|
||||
23e: 81 60 ori r24, 0x01 ; 1
|
||||
240: 87 bf out 0x37, r24 ; 55
|
||||
//Initialize Counter
|
||||
280: 87 b7 in r24, 0x37 ; 55
|
||||
282: 81 60 ori r24, 0x01 ; 1
|
||||
284: 87 bf out 0x37, r24 ; 55
|
||||
//Counter op waarde 0 zetten
|
||||
TCNT0=0;
|
||||
242: 12 be out 0x32, r1 ; 50
|
||||
286: 12 be out 0x32, r1 ; 50
|
||||
|
||||
//Luister naar System interrupts
|
||||
sei();
|
||||
244: 78 94 sei
|
||||
288: 78 94 sei
|
||||
|
||||
//Alleen voor opgave 4
|
||||
PORTD = 0x1;
|
||||
246: 81 e0 ldi r24, 0x01 ; 1
|
||||
248: 82 bb out 0x12, r24 ; 18
|
||||
28a: 81 e0 ldi r24, 0x01 ; 1
|
||||
28c: 82 bb out 0x12, r24 ; 18
|
||||
while (1)
|
||||
{
|
||||
//opgave1();
|
||||
//opgave2();
|
||||
//opgave3();
|
||||
opgave4();
|
||||
24a: d0 df rcall .-96 ; 0x1ec <opgave4>
|
||||
//opgave4();
|
||||
opgave5();
|
||||
28e: ae df rcall .-164 ; 0x1ec <opgave5>
|
||||
//opgave6();
|
||||
|
||||
//charlieplexing();
|
||||
|
||||
//extraopgave();
|
||||
}
|
||||
24c: fe cf rjmp .-4 ; 0x24a <main+0x1a>
|
||||
290: fe cf rjmp .-4 ; 0x28e <main+0x1a>
|
||||
|
||||
0000024e <_exit>:
|
||||
24e: f8 94 cli
|
||||
00000292 <_exit>:
|
||||
292: f8 94 cli
|
||||
|
||||
00000250 <__stop_program>:
|
||||
250: ff cf rjmp .-2 ; 0x250 <__stop_program>
|
||||
00000294 <__stop_program>:
|
||||
294: ff cf rjmp .-2 ; 0x294 <__stop_program>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Archive member included to satisfy reference by file (symbol)
|
||||
|
||||
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)
|
||||
C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51/crtatmega128.o (exit)
|
||||
C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o (exit)
|
||||
c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
main.o (__do_copy_data)
|
||||
c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
@@ -9,23 +9,22 @@ c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/..
|
||||
|
||||
Discarded input sections
|
||||
|
||||
.data 0x00000000 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
.bss 0x00000000 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
.data 0x00000000 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
.bss 0x00000000 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
.text 0x00000000 0x0 main.o
|
||||
.data 0x00000000 0x0 main.o
|
||||
.bss 0x00000000 0x0 main.o
|
||||
.text.speaker 0x00000000 0x1e main.o
|
||||
.text.extraopgave
|
||||
0x00000000 0x10 main.o
|
||||
.text.opgave1 0x00000000 0x1a main.o
|
||||
.text.opgave2 0x00000000 0x1a main.o
|
||||
.text.opgave3 0x00000000 0x1c main.o
|
||||
.text.opgave5 0x00000000 0x8a main.o
|
||||
.text.opgave4 0x00000000 0x46 main.o
|
||||
.text.opgave6 0x00000000 0x20 main.o
|
||||
.text.charlieplexing
|
||||
0x00000000 0x54 main.o
|
||||
.data.speed 0x00000000 0x2 main.o
|
||||
.bss.count 0x00000000 0x2 main.o
|
||||
.data.pattern 0x00000000 0x4b main.o
|
||||
.bss.direction
|
||||
0x00000000 0x2 main.o
|
||||
.text 0x00000000 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)
|
||||
.data 0x00000000 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)
|
||||
.bss 0x00000000 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)
|
||||
@@ -90,7 +89,7 @@ user_signatures 0x00850000 0x00000400 rw !x
|
||||
Linker script and memory map
|
||||
|
||||
Address of section .data set to 0x800100
|
||||
LOAD C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
LOAD C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
LOAD main.o
|
||||
START GROUP
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libm.a
|
||||
@@ -99,7 +98,7 @@ START GROUP
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libm.a
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a
|
||||
LOAD C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51\libatmega128.a
|
||||
LOAD C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51\libatmega128.a
|
||||
END GROUP
|
||||
|
||||
.hash
|
||||
@@ -192,9 +191,9 @@ END GROUP
|
||||
.rela.plt
|
||||
*(.rela.plt)
|
||||
|
||||
.text 0x00000000 0x252
|
||||
.text 0x00000000 0x296
|
||||
*(.vectors)
|
||||
.vectors 0x00000000 0x8c C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
.vectors 0x00000000 0x8c C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
0x00000000 __vector_default
|
||||
0x00000000 __vectors
|
||||
*(.vectors)
|
||||
@@ -220,13 +219,13 @@ END GROUP
|
||||
SORT(*)(.ctors)
|
||||
SORT(*)(.dtors)
|
||||
*(.init0)
|
||||
.init0 0x0000008c 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
.init0 0x0000008c 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
0x0000008c __init
|
||||
*(.init0)
|
||||
*(.init1)
|
||||
*(.init1)
|
||||
*(.init2)
|
||||
.init2 0x0000008c 0xc C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
.init2 0x0000008c 0xc C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
*(.init2)
|
||||
*(.init3)
|
||||
*(.init3)
|
||||
@@ -245,10 +244,10 @@ END GROUP
|
||||
*(.init8)
|
||||
*(.init8)
|
||||
*(.init9)
|
||||
.init9 0x000000c2 0x4 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
.init9 0x000000c2 0x4 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
*(.init9)
|
||||
*(.text)
|
||||
.text 0x000000c6 0x2 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
.text 0x000000c6 0x2 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
0x000000c6 __vector_22
|
||||
0x000000c6 __vector_28
|
||||
0x000000c6 __vector_1
|
||||
@@ -290,15 +289,15 @@ END GROUP
|
||||
.text.__vector_16
|
||||
0x00000112 0xda main.o
|
||||
0x00000112 __vector_16
|
||||
.text.opgave4 0x000001ec 0x44 main.o
|
||||
0x000001ec opgave4
|
||||
.text.main 0x00000230 0x1e main.o
|
||||
0x00000230 main
|
||||
0x0000024e . = ALIGN (0x2)
|
||||
.text.opgave5 0x000001ec 0x88 main.o
|
||||
0x000001ec opgave5
|
||||
.text.main 0x00000274 0x1e main.o
|
||||
0x00000274 main
|
||||
0x00000292 . = ALIGN (0x2)
|
||||
*(.fini9)
|
||||
.fini9 0x0000024e 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)
|
||||
0x0000024e _exit
|
||||
0x0000024e exit
|
||||
.fini9 0x00000292 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)
|
||||
0x00000292 _exit
|
||||
0x00000292 exit
|
||||
*(.fini9)
|
||||
*(.fini8)
|
||||
*(.fini8)
|
||||
@@ -317,47 +316,51 @@ END GROUP
|
||||
*(.fini1)
|
||||
*(.fini1)
|
||||
*(.fini0)
|
||||
.fini0 0x0000024e 0x4 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)
|
||||
.fini0 0x00000292 0x4 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)
|
||||
*(.fini0)
|
||||
0x00000252 _etext = .
|
||||
0x00000296 _etext = .
|
||||
|
||||
.data 0x00800100 0x2 load address 0x00000252
|
||||
.data 0x00800100 0x50 load address 0x00000296
|
||||
0x00800100 PROVIDE (__data_start, .)
|
||||
*(.data)
|
||||
*(.data*)
|
||||
.data.blink 0x00800100 0x2 main.o
|
||||
0x00800100 blink
|
||||
.data.pattern 0x00800100 0x4b main.o
|
||||
0x00800100 pattern
|
||||
.data.blink 0x0080014b 0x2 main.o
|
||||
0x0080014b blink
|
||||
.data.speed 0x0080014d 0x2 main.o
|
||||
0x0080014d speed
|
||||
*(.rodata)
|
||||
*(.rodata*)
|
||||
*(.gnu.linkonce.d*)
|
||||
0x00800102 . = ALIGN (0x2)
|
||||
0x00800102 _edata = .
|
||||
0x00800102 PROVIDE (__data_end, .)
|
||||
0x00800150 . = ALIGN (0x2)
|
||||
*fill* 0x0080014f 0x1
|
||||
0x00800150 _edata = .
|
||||
0x00800150 PROVIDE (__data_end, .)
|
||||
|
||||
.bss 0x00800102 0x8
|
||||
0x00800102 PROVIDE (__bss_start, .)
|
||||
.bss 0x00800150 0x8
|
||||
0x00800150 PROVIDE (__bss_start, .)
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
.bss.direction
|
||||
0x00800102 0x2 main.o
|
||||
0x00800102 direction
|
||||
.bss.b2 0x00800104 0x2 main.o
|
||||
0x00800104 b2
|
||||
.bss.b1 0x00800106 0x2 main.o
|
||||
0x00800106 b1
|
||||
.bss.reset 0x00800108 0x2 main.o
|
||||
0x00800108 reset
|
||||
.bss.b2 0x00800150 0x2 main.o
|
||||
0x00800150 b2
|
||||
.bss.b1 0x00800152 0x2 main.o
|
||||
0x00800152 b1
|
||||
.bss.count 0x00800154 0x2 main.o
|
||||
0x00800154 count
|
||||
.bss.reset 0x00800156 0x2 main.o
|
||||
0x00800156 reset
|
||||
*(COMMON)
|
||||
0x0080010a PROVIDE (__bss_end, .)
|
||||
0x00000252 __data_load_start = LOADADDR (.data)
|
||||
0x00000254 __data_load_end = (__data_load_start + SIZEOF (.data))
|
||||
0x00800158 PROVIDE (__bss_end, .)
|
||||
0x00000296 __data_load_start = LOADADDR (.data)
|
||||
0x000002e6 __data_load_end = (__data_load_start + SIZEOF (.data))
|
||||
|
||||
.noinit 0x0080010a 0x0
|
||||
0x0080010a PROVIDE (__noinit_start, .)
|
||||
.noinit 0x00800158 0x0
|
||||
0x00800158 PROVIDE (__noinit_start, .)
|
||||
*(.noinit*)
|
||||
0x0080010a PROVIDE (__noinit_end, .)
|
||||
0x0080010a _end = .
|
||||
0x0080010a PROVIDE (__heap_start, .)
|
||||
0x00800158 PROVIDE (__noinit_end, .)
|
||||
0x00800158 _end = .
|
||||
0x00800158 PROVIDE (__heap_start, .)
|
||||
|
||||
.eeprom 0x00810000 0x0
|
||||
*(.eeprom*)
|
||||
@@ -404,7 +407,7 @@ END GROUP
|
||||
.note.gnu.avr.deviceinfo
|
||||
0x00000000 0x3c
|
||||
.note.gnu.avr.deviceinfo
|
||||
0x00000000 0x3c C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
0x00000000 0x3c C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
|
||||
.note.gnu.build-id
|
||||
*(.note.gnu.build-id)
|
||||
@@ -445,10 +448,10 @@ END GROUP
|
||||
*(.debug_frame)
|
||||
.debug_frame 0x00000000 0xec main.o
|
||||
|
||||
.debug_str 0x00000000 0x220
|
||||
.debug_str 0x00000000 0x22b
|
||||
*(.debug_str)
|
||||
.debug_str 0x00000000 0x220 main.o
|
||||
0x254 (size before relaxing)
|
||||
.debug_str 0x00000000 0x22b main.o
|
||||
0x25f (size before relaxing)
|
||||
|
||||
.debug_loc 0x00000000 0x163
|
||||
*(.debug_loc)
|
||||
|
||||
@@ -8,34 +8,42 @@ S11300503AC0000038C0000036C0000034C00000C0
|
||||
S113006032C0000030C000002EC000002CC00000D0
|
||||
S11300702AC0000028C0000026C0000024C00000E0
|
||||
S113008022C0000020C000001EC0000011241FBEBA
|
||||
S1130090CFEFD0E1DEBFCDBF11E0A0E0B1E0E2E5FB
|
||||
S11300A0F2E000E00BBF02C007900D92A230B1074E
|
||||
S11300B0D9F721E0A2E0B1E001C01D92AA30B20755
|
||||
S11300C0E1F7B6D0C4C09CCF181619060CF52091E0
|
||||
S11300D00801309109012130310551F020E030E070
|
||||
S11300E00CC040910801509109014130510529F497
|
||||
S11300F010920901109208010895EFECF7E031978E
|
||||
S1130090CFEFD0E1DEBFCDBF11E0A0E0B1E0E6E9F3
|
||||
S11300A0F2E000E00BBF02C007900D92A035B1074B
|
||||
S11300B0D9F721E0A0E5B1E001C01D92A835B2074F
|
||||
S11300C0E1F7D8D0E6C09CCF181619060CF520919C
|
||||
S11300D05601309157012130310551F020E030E0D4
|
||||
S11300E00CC040915601509157014130510529F4FB
|
||||
S11300F010925701109256010895EFECF7E03197F2
|
||||
S1130100F1F700C000002F5F3F4F2817390749F768
|
||||
S113011008951F920F920FB60F9211242F938F936D
|
||||
S11301209F93989B1AC08091060190910701892B97
|
||||
S1130130A1F48091000190910101880F991F90937F
|
||||
S113014001018093000181E090E090930901809384
|
||||
S113015008019093070180930601999B1DC080912B
|
||||
S1130160040190910501892BB9F4809100019091CB
|
||||
S1130170010199230CF401969595879590930101BB
|
||||
S11301808093000181E090E090930901809308013D
|
||||
S1130190909305018093040183B3811108C01092E8
|
||||
S11301A0070110920601109205011092040180913A
|
||||
S11301B0000190910101843191053CF484E190E0C7
|
||||
S11301C0909301018093000109C0813A9F4034F06B
|
||||
S11301D080EA9FE090930101809300019F918F91A9
|
||||
S11301E02F910F900FBE0F901F90189582E390E00F
|
||||
S11301F06BDF979B07C081E090E0909303018093AD
|
||||
S113020002010EC082B3823028F4109203011092CE
|
||||
S113021002010AC08091020190910301892B21F00F
|
||||
S113022082B3869582BB089582B3880F82BB0895FA
|
||||
S113023014BA8FEF81BB83B7836083BF87B78160B4
|
||||
S113024087BF12BE789481E082BBD0DFFECFF894E2
|
||||
S1050250FFCFDA
|
||||
S1050252E803BB
|
||||
S11301209F93989B1AC08091520190915301892BFF
|
||||
S1130130A1F480914B0190914C01880F991F9093E9
|
||||
S11301404C0180934B0181E090E0909357018093A0
|
||||
S113015056019093530180935201999B1DC0809145
|
||||
S1130160500190915101892BB9F480914B019091E8
|
||||
S11301704C0199230CF401969595879590934C0125
|
||||
S113018080934B0181E090E0909357018093560156
|
||||
S1130190909351018093500183B3811108C0109250
|
||||
S11301A0530110925201109251011092500180910A
|
||||
S11301B04B0190914C01843191053CF484E190E031
|
||||
S11301C090934C0180934B0109C0813A9F4034F0D5
|
||||
S11301D080EA9FE090934C0180934B019F918F9113
|
||||
S11301E02F910F900FBE0F901F90189583B3882303
|
||||
S11301F031F083B390E090934E0180934D01809150
|
||||
S1130200540190915501FC01EE0FFF1F8E0F9F1FAB
|
||||
S1130210FC01E050FF4F808182BB8091540190919A
|
||||
S11302205501FC01EE0FFF1F8E0F9F1FFC01E050D4
|
||||
S1130230FF4F20914D0130914E0181819281AC019B
|
||||
S1130240249FC001259F900D349F900D11243CDF05
|
||||
S1130250809154019091550101968931910528F4BA
|
||||
S11302609093550180935401089510925501109272
|
||||
S11302705401089514BA8FEF81BB83B7836083BFA1
|
||||
S113028087B7816087BF12BE789481E082BBAEDFFE
|
||||
S1090290FECFF894FFCF3D
|
||||
S11302960064000164000264000464001064002029
|
||||
S11302A66400406400806400006400AA3200553291
|
||||
S11302B600AA3200553200AA32005532000064000A
|
||||
S11302C68164004264002464001864000FC800F0CE
|
||||
S11302D6C8000FC800F0C800000000E803010000D1
|
||||
S9030000FC
|
||||
|
||||
@@ -78,7 +78,7 @@ LINKER_SCRIPT_DEP+=
|
||||
./%.o: .././%.c
|
||||
@echo Building file: $<
|
||||
@echo Invoking: AVR/GNU C Compiler : 4.9.2
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.0.91\include" -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.0.91\gcc\dev\atmega128" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\include" -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\gcc\dev\atmega128" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
|
||||
@echo Finished building: $<
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES)
|
||||
$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
|
||||
@echo Building target: $@
|
||||
@echo Invoking: AVR/GNU Linker : 4.9.2
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="MIC-Week1.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mrelax -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.0.91\gcc\dev\atmega128"
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="MIC-Week1.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mrelax -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\gcc\dev\atmega128"
|
||||
@echo Finished building target: $@
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "MIC-Week1.elf" "MIC-Week1.hex"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "MIC-Week1.elf" "MIC-Week1.eep" || exit 0
|
||||
|
||||
@@ -5,7 +5,7 @@ main.d main.o: .././main.c \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\4.9.2\include\stdint.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.0.91\include/avr/iom128.h \
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\include/avr/iom128.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \
|
||||
@@ -27,7 +27,7 @@ c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h:
|
||||
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.0.91\include/avr/iom128.h:
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\include/avr/iom128.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h:
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "MIC-Week1", "MIC-Week1.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}"
|
||||
EndProject
|
||||
Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "MIC-Week2", "..\MIC-Week2\MIC-Week2.cproj", "{D4088B23-C726-4644-AB7E-6702C074A3C4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|AVR = Debug|AVR
|
||||
@@ -15,6 +17,10 @@ Global
|
||||
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.Build.0 = Release|AVR
|
||||
{D4088B23-C726-4644-AB7E-6702C074A3C4}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{D4088B23-C726-4644-AB7E-6702C074A3C4}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{D4088B23-C726-4644-AB7E-6702C074A3C4}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{D4088B23-C726-4644-AB7E-6702C074A3C4}.Release|AVR.Build.0 = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.0.91\include</AbsolutePath>
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\include</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>C</Condition>
|
||||
@@ -26,7 +26,7 @@
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.0.91\include\avr\iom128.h</AbsolutePath>
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\include\avr\iom128.h</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>C</Condition>
|
||||
@@ -37,18 +37,18 @@
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.0.91\templates\main.c</AbsolutePath>
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\templates\main.c</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>C Exe</Condition>
|
||||
<FileContentHash>uPsMWWqRdz/VaM6o0lsTGQ==</FileContentHash>
|
||||
<FileContentHash>GD1k8YYhulqRs6FD1B2Hog==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>templates/main.c</Name>
|
||||
<SelectString>Main file (.c)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.0.91\templates\main.cpp</AbsolutePath>
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\templates\main.cpp</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>C Exe</Condition>
|
||||
@@ -59,7 +59,7 @@
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.0.91\gcc\dev\atmega128</AbsolutePath>
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\gcc\dev\atmega128</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>libraryPrefix</Category>
|
||||
<Condition>GCC</Condition>
|
||||
@@ -71,8 +71,8 @@
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.0.91</PackVersion>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.0.90</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
|
||||
+13
-13
@@ -28,15 +28,15 @@
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.28.1" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.28.1" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
<avrtool>com.atmel.avrdbg.tool.simulator</avrtool>
|
||||
<avrtoolserialnumber />
|
||||
@@ -55,7 +55,7 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrGcc>
|
||||
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.0.91\gcc\dev\atmega128"</avrgcc.common.Device>
|
||||
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.0.90\gcc\dev\atmega128"</avrgcc.common.Device>
|
||||
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
|
||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
||||
@@ -71,7 +71,7 @@
|
||||
</avrgcc.compiler.symbols.DefSymbols>
|
||||
<avrgcc.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\Atmel\ATmega_DFP\1.0.91\include</Value>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.0.90\include</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.directories.IncludePaths>
|
||||
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
|
||||
@@ -89,7 +89,7 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrGcc>
|
||||
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.0.91\gcc\dev\atmega128"</avrgcc.common.Device>
|
||||
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.0.90\gcc\dev\atmega128"</avrgcc.common.Device>
|
||||
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
|
||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
||||
@@ -105,7 +105,7 @@
|
||||
</avrgcc.compiler.symbols.DefSymbols>
|
||||
<avrgcc.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\Atmel\ATmega_DFP\1.0.91\include</Value>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.0.90\include</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.directories.IncludePaths>
|
||||
<avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
|
||||
|
||||
+2
-2
@@ -112,8 +112,8 @@ int main(void)
|
||||
//opgave2();
|
||||
//opgave3();
|
||||
//opgave4();
|
||||
//opgave5();
|
||||
opgave6();
|
||||
opgave5();
|
||||
//opgave6();
|
||||
|
||||
//charlieplexing();
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
:00000001FF
|
||||
@@ -0,0 +1,448 @@
|
||||
|
||||
MIC-Week2.elf: file format elf32-avr
|
||||
|
||||
Sections:
|
||||
Idx Name Size VMA LMA File off Algn
|
||||
0 .data 00000010 00800100 0000022c 000002c0 2**0
|
||||
CONTENTS, ALLOC, LOAD, DATA
|
||||
1 .text 0000022c 00000000 00000000 00000094 2**1
|
||||
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||
2 .bss 00000002 00800110 00800110 000002d0 2**0
|
||||
ALLOC
|
||||
3 .comment 00000030 00000000 00000000 000002d0 2**0
|
||||
CONTENTS, READONLY
|
||||
4 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00000300 2**2
|
||||
CONTENTS, READONLY
|
||||
5 .debug_aranges 00000070 00000000 00000000 0000033c 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
6 .debug_info 000003fb 00000000 00000000 000003ac 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
7 .debug_abbrev 00000216 00000000 00000000 000007a7 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
8 .debug_line 00000303 00000000 00000000 000009bd 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
9 .debug_frame 00000174 00000000 00000000 00000cc0 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
10 .debug_str 000001f8 00000000 00000000 00000e34 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
11 .debug_loc 00000346 00000000 00000000 0000102c 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
12 .debug_ranges 00000078 00000000 00000000 00001372 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <__vectors>:
|
||||
0: 45 c0 rjmp .+138 ; 0x8c <__ctors_end>
|
||||
2: 00 00 nop
|
||||
4: 61 c0 rjmp .+194 ; 0xc8 <__vector_1>
|
||||
6: 00 00 nop
|
||||
8: 90 c0 rjmp .+288 ; 0x12a <__vector_2>
|
||||
a: 00 00 nop
|
||||
c: c1 c0 rjmp .+386 ; 0x190 <__vector_3>
|
||||
e: 00 00 nop
|
||||
10: 5a c0 rjmp .+180 ; 0xc6 <__bad_interrupt>
|
||||
12: 00 00 nop
|
||||
14: 64 c0 rjmp .+200 ; 0xde <__vector_5>
|
||||
16: 00 00 nop
|
||||
18: 56 c0 rjmp .+172 ; 0xc6 <__bad_interrupt>
|
||||
1a: 00 00 nop
|
||||
1c: 54 c0 rjmp .+168 ; 0xc6 <__bad_interrupt>
|
||||
1e: 00 00 nop
|
||||
20: 52 c0 rjmp .+164 ; 0xc6 <__bad_interrupt>
|
||||
22: 00 00 nop
|
||||
24: 50 c0 rjmp .+160 ; 0xc6 <__bad_interrupt>
|
||||
26: 00 00 nop
|
||||
28: 4e c0 rjmp .+156 ; 0xc6 <__bad_interrupt>
|
||||
2a: 00 00 nop
|
||||
2c: 4c c0 rjmp .+152 ; 0xc6 <__bad_interrupt>
|
||||
2e: 00 00 nop
|
||||
30: 4a c0 rjmp .+148 ; 0xc6 <__bad_interrupt>
|
||||
32: 00 00 nop
|
||||
34: 48 c0 rjmp .+144 ; 0xc6 <__bad_interrupt>
|
||||
36: 00 00 nop
|
||||
38: 46 c0 rjmp .+140 ; 0xc6 <__bad_interrupt>
|
||||
3a: 00 00 nop
|
||||
3c: 44 c0 rjmp .+136 ; 0xc6 <__bad_interrupt>
|
||||
3e: 00 00 nop
|
||||
40: 42 c0 rjmp .+132 ; 0xc6 <__bad_interrupt>
|
||||
42: 00 00 nop
|
||||
44: 40 c0 rjmp .+128 ; 0xc6 <__bad_interrupt>
|
||||
46: 00 00 nop
|
||||
48: 3e c0 rjmp .+124 ; 0xc6 <__bad_interrupt>
|
||||
4a: 00 00 nop
|
||||
4c: 3c c0 rjmp .+120 ; 0xc6 <__bad_interrupt>
|
||||
4e: 00 00 nop
|
||||
50: 3a c0 rjmp .+116 ; 0xc6 <__bad_interrupt>
|
||||
52: 00 00 nop
|
||||
54: 38 c0 rjmp .+112 ; 0xc6 <__bad_interrupt>
|
||||
56: 00 00 nop
|
||||
58: 36 c0 rjmp .+108 ; 0xc6 <__bad_interrupt>
|
||||
5a: 00 00 nop
|
||||
5c: 34 c0 rjmp .+104 ; 0xc6 <__bad_interrupt>
|
||||
5e: 00 00 nop
|
||||
60: 32 c0 rjmp .+100 ; 0xc6 <__bad_interrupt>
|
||||
62: 00 00 nop
|
||||
64: 30 c0 rjmp .+96 ; 0xc6 <__bad_interrupt>
|
||||
66: 00 00 nop
|
||||
68: 2e c0 rjmp .+92 ; 0xc6 <__bad_interrupt>
|
||||
6a: 00 00 nop
|
||||
6c: 2c c0 rjmp .+88 ; 0xc6 <__bad_interrupt>
|
||||
6e: 00 00 nop
|
||||
70: 2a c0 rjmp .+84 ; 0xc6 <__bad_interrupt>
|
||||
72: 00 00 nop
|
||||
74: 28 c0 rjmp .+80 ; 0xc6 <__bad_interrupt>
|
||||
76: 00 00 nop
|
||||
78: 26 c0 rjmp .+76 ; 0xc6 <__bad_interrupt>
|
||||
7a: 00 00 nop
|
||||
7c: 24 c0 rjmp .+72 ; 0xc6 <__bad_interrupt>
|
||||
7e: 00 00 nop
|
||||
80: 22 c0 rjmp .+68 ; 0xc6 <__bad_interrupt>
|
||||
82: 00 00 nop
|
||||
84: 20 c0 rjmp .+64 ; 0xc6 <__bad_interrupt>
|
||||
86: 00 00 nop
|
||||
88: 1e c0 rjmp .+60 ; 0xc6 <__bad_interrupt>
|
||||
...
|
||||
|
||||
0000008c <__ctors_end>:
|
||||
8c: 11 24 eor r1, r1
|
||||
8e: 1f be out 0x3f, r1 ; 63
|
||||
90: cf ef ldi r28, 0xFF ; 255
|
||||
92: d0 e1 ldi r29, 0x10 ; 16
|
||||
94: de bf out 0x3e, r29 ; 62
|
||||
96: cd bf out 0x3d, r28 ; 61
|
||||
|
||||
00000098 <__do_copy_data>:
|
||||
98: 11 e0 ldi r17, 0x01 ; 1
|
||||
9a: a0 e0 ldi r26, 0x00 ; 0
|
||||
9c: b1 e0 ldi r27, 0x01 ; 1
|
||||
9e: ec e2 ldi r30, 0x2C ; 44
|
||||
a0: f2 e0 ldi r31, 0x02 ; 2
|
||||
a2: 00 e0 ldi r16, 0x00 ; 0
|
||||
a4: 0b bf out 0x3b, r16 ; 59
|
||||
a6: 02 c0 rjmp .+4 ; 0xac <__do_copy_data+0x14>
|
||||
a8: 07 90 elpm r0, Z+
|
||||
aa: 0d 92 st X+, r0
|
||||
ac: a0 31 cpi r26, 0x10 ; 16
|
||||
ae: b1 07 cpc r27, r17
|
||||
b0: d9 f7 brne .-10 ; 0xa8 <__do_copy_data+0x10>
|
||||
|
||||
000000b2 <__do_clear_bss>:
|
||||
b2: 21 e0 ldi r18, 0x01 ; 1
|
||||
b4: a0 e1 ldi r26, 0x10 ; 16
|
||||
b6: b1 e0 ldi r27, 0x01 ; 1
|
||||
b8: 01 c0 rjmp .+2 ; 0xbc <.do_clear_bss_start>
|
||||
|
||||
000000ba <.do_clear_bss_loop>:
|
||||
ba: 1d 92 st X+, r1
|
||||
|
||||
000000bc <.do_clear_bss_start>:
|
||||
bc: a2 31 cpi r26, 0x12 ; 18
|
||||
be: b2 07 cpc r27, r18
|
||||
c0: e1 f7 brne .-8 ; 0xba <.do_clear_bss_loop>
|
||||
c2: b1 d0 rcall .+354 ; 0x226 <main>
|
||||
c4: b1 c0 rjmp .+354 ; 0x228 <_exit>
|
||||
|
||||
000000c6 <__bad_interrupt>:
|
||||
c6: 9c cf rjmp .-200 ; 0x0 <__vectors>
|
||||
|
||||
000000c8 <__vector_1>:
|
||||
sei();
|
||||
|
||||
while(1)
|
||||
{
|
||||
wait(500);
|
||||
}
|
||||
c8: 1f 92 push r1
|
||||
ca: 0f 92 push r0
|
||||
cc: 0f b6 in r0, 0x3f ; 63
|
||||
ce: 0f 92 push r0
|
||||
d0: 11 24 eor r1, r1
|
||||
d2: 95 9a sbi 0x12, 5 ; 18
|
||||
d4: 0f 90 pop r0
|
||||
d6: 0f be out 0x3f, r0 ; 63
|
||||
d8: 0f 90 pop r0
|
||||
da: 1f 90 pop r1
|
||||
dc: 18 95 reti
|
||||
|
||||
000000de <__vector_5>:
|
||||
de: 1f 92 push r1
|
||||
e0: 0f 92 push r0
|
||||
e2: 0f b6 in r0, 0x3f ; 63
|
||||
e4: 0f 92 push r0
|
||||
e6: 11 24 eor r1, r1
|
||||
e8: 8f 93 push r24
|
||||
ea: 9f 93 push r25
|
||||
ec: 93 b1 in r25, 0x03 ; 3
|
||||
ee: 81 e0 ldi r24, 0x01 ; 1
|
||||
f0: 89 27 eor r24, r25
|
||||
f2: 83 b9 out 0x03, r24 ; 3
|
||||
f4: 9f 91 pop r25
|
||||
f6: 8f 91 pop r24
|
||||
f8: 0f 90 pop r0
|
||||
fa: 0f be out 0x3f, r0 ; 63
|
||||
fc: 0f 90 pop r0
|
||||
fe: 1f 90 pop r1
|
||||
100: 18 95 reti
|
||||
|
||||
00000102 <shift>:
|
||||
}
|
||||
|
||||
void shift(int i)
|
||||
{
|
||||
|
||||
if(i)
|
||||
102: 89 2b or r24, r25
|
||||
104: 21 f0 breq .+8 ; 0x10e <shift+0xc>
|
||||
PORTC = (PORTC>>1);
|
||||
106: 85 b3 in r24, 0x15 ; 21
|
||||
108: 86 95 lsr r24
|
||||
10a: 85 bb out 0x15, r24 ; 21
|
||||
10c: 03 c0 rjmp .+6 ; 0x114 <shift+0x12>
|
||||
else
|
||||
PORTC = (PORTC<<1);
|
||||
10e: 85 b3 in r24, 0x15 ; 21
|
||||
110: 88 0f add r24, r24
|
||||
112: 85 bb out 0x15, r24 ; 21
|
||||
|
||||
//Als het looplicht aan het einde is
|
||||
if (PORTC >= 0x80)
|
||||
114: af 9b sbis 0x15, 7 ; 21
|
||||
116: 03 c0 rjmp .+6 ; 0x11e <shift+0x1c>
|
||||
{
|
||||
PORTC= 0x01;
|
||||
118: 81 e0 ldi r24, 0x01 ; 1
|
||||
11a: 85 bb out 0x15, r24 ; 21
|
||||
11c: 08 95 ret
|
||||
}
|
||||
//Als het looplicht aan het begin is
|
||||
else if (PORTC < 0x1)
|
||||
11e: 85 b3 in r24, 0x15 ; 21
|
||||
120: 81 11 cpse r24, r1
|
||||
122: 02 c0 rjmp .+4 ; 0x128 <shift+0x26>
|
||||
{
|
||||
PORTC= 0x80;
|
||||
124: 80 e8 ldi r24, 0x80 ; 128
|
||||
126: 85 bb out 0x15, r24 ; 21
|
||||
128: 08 95 ret
|
||||
|
||||
0000012a <__vector_2>:
|
||||
PORTD |= (1<<5);
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
ISR( INT1_vect )
|
||||
{
|
||||
12a: 1f 92 push r1
|
||||
12c: 0f 92 push r0
|
||||
12e: 0f b6 in r0, 0x3f ; 63
|
||||
130: 0f 92 push r0
|
||||
132: 11 24 eor r1, r1
|
||||
134: 0b b6 in r0, 0x3b ; 59
|
||||
136: 0f 92 push r0
|
||||
138: 2f 93 push r18
|
||||
13a: 3f 93 push r19
|
||||
13c: 4f 93 push r20
|
||||
13e: 5f 93 push r21
|
||||
140: 6f 93 push r22
|
||||
142: 7f 93 push r23
|
||||
144: 8f 93 push r24
|
||||
146: 9f 93 push r25
|
||||
148: af 93 push r26
|
||||
14a: bf 93 push r27
|
||||
14c: ef 93 push r30
|
||||
14e: ff 93 push r31
|
||||
inputs:
|
||||
outputs:
|
||||
notes: Clear PORTD.5
|
||||
Version : DMK, Initial code
|
||||
*******************************************************************/
|
||||
if(opdr==0)
|
||||
150: 80 91 10 01 lds r24, 0x0110
|
||||
154: 90 91 11 01 lds r25, 0x0111
|
||||
158: 00 97 sbiw r24, 0x00 ; 0
|
||||
15a: 11 f4 brne .+4 ; 0x160 <__vector_2+0x36>
|
||||
{
|
||||
PORTD &= ~(1<<5);
|
||||
15c: 95 98 cbi 0x12, 5 ; 18
|
||||
15e: 05 c0 rjmp .+10 ; 0x16a <__vector_2+0x40>
|
||||
}
|
||||
else if(opdr==1)
|
||||
160: 01 97 sbiw r24, 0x01 ; 1
|
||||
162: 19 f4 brne .+6 ; 0x16a <__vector_2+0x40>
|
||||
{
|
||||
shift(1);
|
||||
164: 81 e0 ldi r24, 0x01 ; 1
|
||||
166: 90 e0 ldi r25, 0x00 ; 0
|
||||
168: cc df rcall .-104 ; 0x102 <shift>
|
||||
}
|
||||
}
|
||||
16a: ff 91 pop r31
|
||||
16c: ef 91 pop r30
|
||||
16e: bf 91 pop r27
|
||||
170: af 91 pop r26
|
||||
172: 9f 91 pop r25
|
||||
174: 8f 91 pop r24
|
||||
176: 7f 91 pop r23
|
||||
178: 6f 91 pop r22
|
||||
17a: 5f 91 pop r21
|
||||
17c: 4f 91 pop r20
|
||||
17e: 3f 91 pop r19
|
||||
180: 2f 91 pop r18
|
||||
182: 0f 90 pop r0
|
||||
184: 0b be out 0x3b, r0 ; 59
|
||||
186: 0f 90 pop r0
|
||||
188: 0f be out 0x3f, r0 ; 63
|
||||
18a: 0f 90 pop r0
|
||||
18c: 1f 90 pop r1
|
||||
18e: 18 95 reti
|
||||
|
||||
00000190 <__vector_3>:
|
||||
inputs:
|
||||
outputs:
|
||||
notes: Clear PORTD.3
|
||||
Version : DMK, Initial code
|
||||
*******************************************************************/
|
||||
{
|
||||
190: 1f 92 push r1
|
||||
192: 0f 92 push r0
|
||||
194: 0f b6 in r0, 0x3f ; 63
|
||||
196: 0f 92 push r0
|
||||
198: 11 24 eor r1, r1
|
||||
19a: 0b b6 in r0, 0x3b ; 59
|
||||
19c: 0f 92 push r0
|
||||
19e: 2f 93 push r18
|
||||
1a0: 3f 93 push r19
|
||||
1a2: 4f 93 push r20
|
||||
1a4: 5f 93 push r21
|
||||
1a6: 6f 93 push r22
|
||||
1a8: 7f 93 push r23
|
||||
1aa: 8f 93 push r24
|
||||
1ac: 9f 93 push r25
|
||||
1ae: af 93 push r26
|
||||
1b0: bf 93 push r27
|
||||
1b2: ef 93 push r30
|
||||
1b4: ff 93 push r31
|
||||
shift(0);
|
||||
1b6: 80 e0 ldi r24, 0x00 ; 0
|
||||
1b8: 90 e0 ldi r25, 0x00 ; 0
|
||||
1ba: a3 df rcall .-186 ; 0x102 <shift>
|
||||
}
|
||||
1bc: ff 91 pop r31
|
||||
1be: ef 91 pop r30
|
||||
1c0: bf 91 pop r27
|
||||
1c2: af 91 pop r26
|
||||
1c4: 9f 91 pop r25
|
||||
1c6: 8f 91 pop r24
|
||||
1c8: 7f 91 pop r23
|
||||
1ca: 6f 91 pop r22
|
||||
1cc: 5f 91 pop r21
|
||||
1ce: 4f 91 pop r20
|
||||
1d0: 3f 91 pop r19
|
||||
1d2: 2f 91 pop r18
|
||||
1d4: 0f 90 pop r0
|
||||
1d6: 0b be out 0x3b, r0 ; 59
|
||||
1d8: 0f 90 pop r0
|
||||
1da: 0f be out 0x3f, r0 ; 63
|
||||
1dc: 0f 90 pop r0
|
||||
1de: 1f 90 pop r1
|
||||
1e0: 18 95 reti
|
||||
|
||||
000001e2 <opgave3>:
|
||||
}
|
||||
}
|
||||
|
||||
void opgave3()
|
||||
{
|
||||
DDRC = 0x00;
|
||||
1e2: 14 ba out 0x14, r1 ; 20
|
||||
DDRD = 0xFF;
|
||||
1e4: 8f ef ldi r24, 0xFF ; 255
|
||||
1e6: 81 bb out 0x11, r24 ; 17
|
||||
|
||||
int count = 0;
|
||||
1e8: 80 e0 ldi r24, 0x00 ; 0
|
||||
1ea: 90 e0 ldi r25, 0x00 ; 0
|
||||
display(count);
|
||||
}
|
||||
}
|
||||
void display(int d)
|
||||
{
|
||||
PORTD = data[d];
|
||||
1ec: a0 e0 ldi r26, 0x00 ; 0
|
||||
1ee: b1 e0 ldi r27, 0x01 ; 1
|
||||
|
||||
int count = 0;
|
||||
|
||||
while(1)
|
||||
{
|
||||
if(0b00000001 & PINC == 0b00000001)
|
||||
1f0: 23 b3 in r18, 0x13 ; 19
|
||||
1f2: 21 30 cpi r18, 0x01 ; 1
|
||||
1f4: 11 f4 brne .+4 ; 0x1fa <opgave3+0x18>
|
||||
{
|
||||
count++;
|
||||
1f6: 01 96 adiw r24, 0x01 ; 1
|
||||
1f8: 01 c0 rjmp .+2 ; 0x1fc <opgave3+0x1a>
|
||||
}
|
||||
else if(0b00000010 & PINC == 0b00000010)
|
||||
1fa: 23 b3 in r18, 0x13 ; 19
|
||||
{
|
||||
count--;
|
||||
}
|
||||
|
||||
if(count > 15)
|
||||
1fc: 80 31 cpi r24, 0x10 ; 16
|
||||
1fe: 91 05 cpc r25, r1
|
||||
200: 2c f0 brlt .+10 ; 0x20c <opgave3+0x2a>
|
||||
display(count);
|
||||
}
|
||||
}
|
||||
void display(int d)
|
||||
{
|
||||
PORTD = data[d];
|
||||
202: 1e 96 adiw r26, 0x0e ; 14
|
||||
204: 2c 91 ld r18, X
|
||||
206: 1e 97 sbiw r26, 0x0e ; 14
|
||||
208: 22 bb out 0x12, r18 ; 18
|
||||
20a: f2 cf rjmp .-28 ; 0x1f0 <opgave3+0xe>
|
||||
count--;
|
||||
}
|
||||
|
||||
if(count > 15)
|
||||
display(14);
|
||||
else if(count < 0)
|
||||
20c: 99 23 and r25, r25
|
||||
20e: 2c f4 brge .+10 ; 0x21a <opgave3+0x38>
|
||||
display(count);
|
||||
}
|
||||
}
|
||||
void display(int d)
|
||||
{
|
||||
PORTD = data[d];
|
||||
210: 1e 96 adiw r26, 0x0e ; 14
|
||||
212: 2c 91 ld r18, X
|
||||
214: 1e 97 sbiw r26, 0x0e ; 14
|
||||
216: 22 bb out 0x12, r18 ; 18
|
||||
218: eb cf rjmp .-42 ; 0x1f0 <opgave3+0xe>
|
||||
21a: fc 01 movw r30, r24
|
||||
21c: e0 50 subi r30, 0x00 ; 0
|
||||
21e: ff 4f sbci r31, 0xFF ; 255
|
||||
220: 20 81 ld r18, Z
|
||||
222: 22 bb out 0x12, r18 ; 18
|
||||
224: e5 cf rjmp .-54 ; 0x1f0 <opgave3+0xe>
|
||||
|
||||
00000226 <main>:
|
||||
Version : DMK, Initial code
|
||||
*******************************************************************/
|
||||
{
|
||||
//powerpointOpg();
|
||||
//opgave2();
|
||||
opgave3();
|
||||
226: dd df rcall .-70 ; 0x1e2 <opgave3>
|
||||
|
||||
00000228 <_exit>:
|
||||
228: f8 94 cli
|
||||
|
||||
0000022a <__stop_program>:
|
||||
22a: ff cf rjmp .-2 ; 0x22a <__stop_program>
|
||||
@@ -0,0 +1,479 @@
|
||||
Archive member included to satisfy reference by file (symbol)
|
||||
|
||||
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)
|
||||
C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o (exit)
|
||||
c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
main.o (__do_copy_data)
|
||||
c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
main.o (__do_clear_bss)
|
||||
|
||||
Allocating common symbols
|
||||
Common symbol size file
|
||||
|
||||
opdr 0x2 main.o
|
||||
|
||||
Discarded input sections
|
||||
|
||||
.data 0x00000000 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
.bss 0x00000000 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
.text 0x00000000 0x0 main.o
|
||||
.data 0x00000000 0x0 main.o
|
||||
.bss 0x00000000 0x0 main.o
|
||||
.text.wait 0x00000000 0x22 main.o
|
||||
.text.powerpointOpg
|
||||
0x00000000 0x38 main.o
|
||||
.text.opgave2 0x00000000 0x34 main.o
|
||||
.text.display 0x00000000 0xc main.o
|
||||
.text 0x00000000 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)
|
||||
.data 0x00000000 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)
|
||||
.bss 0x00000000 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)
|
||||
.text.libgcc.mul
|
||||
0x00000000 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)
|
||||
.text.libgcc.div
|
||||
0x00000000 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)
|
||||
.text.libgcc 0x00000000 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)
|
||||
.text.libgcc.prologue
|
||||
0x00000000 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)
|
||||
.text.libgcc.builtins
|
||||
0x00000000 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)
|
||||
.text.libgcc.fmul
|
||||
0x00000000 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)
|
||||
.text.libgcc.fixed
|
||||
0x00000000 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)
|
||||
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.mul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.div
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
.text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.prologue
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.builtins
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.fmul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.fixed
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.mul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.div
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.prologue
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.builtins
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.fmul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.fixed
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
|
||||
Memory Configuration
|
||||
|
||||
Name Origin Length Attributes
|
||||
text 0x00000000 0x00020000 xr
|
||||
data 0x00800100 0x0000ff00 rw !x
|
||||
eeprom 0x00810000 0x00010000 rw !x
|
||||
fuse 0x00820000 0x00000400 rw !x
|
||||
lock 0x00830000 0x00000400 rw !x
|
||||
signature 0x00840000 0x00000400 rw !x
|
||||
user_signatures 0x00850000 0x00000400 rw !x
|
||||
*default* 0x00000000 0xffffffff
|
||||
|
||||
Linker script and memory map
|
||||
|
||||
Address of section .data set to 0x800100
|
||||
LOAD C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
LOAD main.o
|
||||
START GROUP
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libm.a
|
||||
END GROUP
|
||||
START GROUP
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libm.a
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a
|
||||
LOAD C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51\libatmega128.a
|
||||
END GROUP
|
||||
|
||||
.hash
|
||||
*(.hash)
|
||||
|
||||
.dynsym
|
||||
*(.dynsym)
|
||||
|
||||
.dynstr
|
||||
*(.dynstr)
|
||||
|
||||
.gnu.version
|
||||
*(.gnu.version)
|
||||
|
||||
.gnu.version_d
|
||||
*(.gnu.version_d)
|
||||
|
||||
.gnu.version_r
|
||||
*(.gnu.version_r)
|
||||
|
||||
.rel.init
|
||||
*(.rel.init)
|
||||
|
||||
.rela.init
|
||||
*(.rela.init)
|
||||
|
||||
.rel.text
|
||||
*(.rel.text)
|
||||
*(.rel.text.*)
|
||||
*(.rel.gnu.linkonce.t*)
|
||||
|
||||
.rela.text
|
||||
*(.rela.text)
|
||||
*(.rela.text.*)
|
||||
*(.rela.gnu.linkonce.t*)
|
||||
|
||||
.rel.fini
|
||||
*(.rel.fini)
|
||||
|
||||
.rela.fini
|
||||
*(.rela.fini)
|
||||
|
||||
.rel.rodata
|
||||
*(.rel.rodata)
|
||||
*(.rel.rodata.*)
|
||||
*(.rel.gnu.linkonce.r*)
|
||||
|
||||
.rela.rodata
|
||||
*(.rela.rodata)
|
||||
*(.rela.rodata.*)
|
||||
*(.rela.gnu.linkonce.r*)
|
||||
|
||||
.rel.data
|
||||
*(.rel.data)
|
||||
*(.rel.data.*)
|
||||
*(.rel.gnu.linkonce.d*)
|
||||
|
||||
.rela.data
|
||||
*(.rela.data)
|
||||
*(.rela.data.*)
|
||||
*(.rela.gnu.linkonce.d*)
|
||||
|
||||
.rel.ctors
|
||||
*(.rel.ctors)
|
||||
|
||||
.rela.ctors
|
||||
*(.rela.ctors)
|
||||
|
||||
.rel.dtors
|
||||
*(.rel.dtors)
|
||||
|
||||
.rela.dtors
|
||||
*(.rela.dtors)
|
||||
|
||||
.rel.got
|
||||
*(.rel.got)
|
||||
|
||||
.rela.got
|
||||
*(.rela.got)
|
||||
|
||||
.rel.bss
|
||||
*(.rel.bss)
|
||||
|
||||
.rela.bss
|
||||
*(.rela.bss)
|
||||
|
||||
.rel.plt
|
||||
*(.rel.plt)
|
||||
|
||||
.rela.plt
|
||||
*(.rela.plt)
|
||||
|
||||
.text 0x00000000 0x22c
|
||||
*(.vectors)
|
||||
.vectors 0x00000000 0x8c C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
0x00000000 __vector_default
|
||||
0x00000000 __vectors
|
||||
*(.vectors)
|
||||
*(.progmem.gcc*)
|
||||
0x0000008c . = ALIGN (0x2)
|
||||
0x0000008c __trampolines_start = .
|
||||
*(.trampolines)
|
||||
.trampolines 0x0000008c 0x0 linker stubs
|
||||
*(.trampolines*)
|
||||
0x0000008c __trampolines_end = .
|
||||
*(.progmem*)
|
||||
0x0000008c . = ALIGN (0x2)
|
||||
*(.jumptables)
|
||||
*(.jumptables*)
|
||||
*(.lowtext)
|
||||
*(.lowtext*)
|
||||
0x0000008c __ctors_start = .
|
||||
*(.ctors)
|
||||
0x0000008c __ctors_end = .
|
||||
0x0000008c __dtors_start = .
|
||||
*(.dtors)
|
||||
0x0000008c __dtors_end = .
|
||||
SORT(*)(.ctors)
|
||||
SORT(*)(.dtors)
|
||||
*(.init0)
|
||||
.init0 0x0000008c 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
0x0000008c __init
|
||||
*(.init0)
|
||||
*(.init1)
|
||||
*(.init1)
|
||||
*(.init2)
|
||||
.init2 0x0000008c 0xc C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
*(.init2)
|
||||
*(.init3)
|
||||
*(.init3)
|
||||
*(.init4)
|
||||
.init4 0x00000098 0x1a c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_copy_data.o)
|
||||
0x00000098 __do_copy_data
|
||||
.init4 0x000000b2 0x10 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_clear_bss.o)
|
||||
0x000000b2 __do_clear_bss
|
||||
*(.init4)
|
||||
*(.init5)
|
||||
*(.init5)
|
||||
*(.init6)
|
||||
*(.init6)
|
||||
*(.init7)
|
||||
*(.init7)
|
||||
*(.init8)
|
||||
*(.init8)
|
||||
*(.init9)
|
||||
.init9 0x000000c2 0x4 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
*(.init9)
|
||||
*(.text)
|
||||
.text 0x000000c6 0x2 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
0x000000c6 __vector_22
|
||||
0x000000c6 __vector_28
|
||||
0x000000c6 __vector_32
|
||||
0x000000c6 __vector_34
|
||||
0x000000c6 __vector_24
|
||||
0x000000c6 __vector_12
|
||||
0x000000c6 __bad_interrupt
|
||||
0x000000c6 __vector_6
|
||||
0x000000c6 __vector_31
|
||||
0x000000c6 __vector_23
|
||||
0x000000c6 __vector_30
|
||||
0x000000c6 __vector_25
|
||||
0x000000c6 __vector_11
|
||||
0x000000c6 __vector_13
|
||||
0x000000c6 __vector_17
|
||||
0x000000c6 __vector_19
|
||||
0x000000c6 __vector_7
|
||||
0x000000c6 __vector_27
|
||||
0x000000c6 __vector_33
|
||||
0x000000c6 __vector_4
|
||||
0x000000c6 __vector_9
|
||||
0x000000c6 __vector_21
|
||||
0x000000c6 __vector_15
|
||||
0x000000c6 __vector_29
|
||||
0x000000c6 __vector_8
|
||||
0x000000c6 __vector_26
|
||||
0x000000c6 __vector_14
|
||||
0x000000c6 __vector_10
|
||||
0x000000c6 __vector_16
|
||||
0x000000c6 __vector_18
|
||||
0x000000c6 __vector_20
|
||||
0x000000c8 . = ALIGN (0x2)
|
||||
*(.text.*)
|
||||
.text.__vector_1
|
||||
0x000000c8 0x16 main.o
|
||||
0x000000c8 __vector_1
|
||||
.text.__vector_5
|
||||
0x000000de 0x24 main.o
|
||||
0x000000de __vector_5
|
||||
.text.shift 0x00000102 0x28 main.o
|
||||
0x00000102 shift
|
||||
.text.__vector_2
|
||||
0x0000012a 0x66 main.o
|
||||
0x0000012a __vector_2
|
||||
.text.__vector_3
|
||||
0x00000190 0x52 main.o
|
||||
0x00000190 __vector_3
|
||||
.text.opgave3 0x000001e2 0x44 main.o
|
||||
0x000001e2 opgave3
|
||||
.text.main 0x00000226 0x2 main.o
|
||||
0x00000226 main
|
||||
0x00000228 . = ALIGN (0x2)
|
||||
*(.fini9)
|
||||
.fini9 0x00000228 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)
|
||||
0x00000228 _exit
|
||||
0x00000228 exit
|
||||
*(.fini9)
|
||||
*(.fini8)
|
||||
*(.fini8)
|
||||
*(.fini7)
|
||||
*(.fini7)
|
||||
*(.fini6)
|
||||
*(.fini6)
|
||||
*(.fini5)
|
||||
*(.fini5)
|
||||
*(.fini4)
|
||||
*(.fini4)
|
||||
*(.fini3)
|
||||
*(.fini3)
|
||||
*(.fini2)
|
||||
*(.fini2)
|
||||
*(.fini1)
|
||||
*(.fini1)
|
||||
*(.fini0)
|
||||
.fini0 0x00000228 0x4 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)
|
||||
*(.fini0)
|
||||
0x0000022c _etext = .
|
||||
|
||||
.data 0x00800100 0x10 load address 0x0000022c
|
||||
0x00800100 PROVIDE (__data_start, .)
|
||||
*(.data)
|
||||
*(.data*)
|
||||
.data.data 0x00800100 0x10 main.o
|
||||
0x00800100 data
|
||||
*(.rodata)
|
||||
*(.rodata*)
|
||||
*(.gnu.linkonce.d*)
|
||||
0x00800110 . = ALIGN (0x2)
|
||||
0x00800110 _edata = .
|
||||
0x00800110 PROVIDE (__data_end, .)
|
||||
|
||||
.bss 0x00800110 0x2
|
||||
0x00800110 PROVIDE (__bss_start, .)
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
COMMON 0x00800110 0x2 main.o
|
||||
0x00800110 opdr
|
||||
0x00800112 PROVIDE (__bss_end, .)
|
||||
0x0000022c __data_load_start = LOADADDR (.data)
|
||||
0x0000023c __data_load_end = (__data_load_start + SIZEOF (.data))
|
||||
|
||||
.noinit 0x00800112 0x0
|
||||
0x00800112 PROVIDE (__noinit_start, .)
|
||||
*(.noinit*)
|
||||
0x00800112 PROVIDE (__noinit_end, .)
|
||||
0x00800112 _end = .
|
||||
0x00800112 PROVIDE (__heap_start, .)
|
||||
|
||||
.eeprom 0x00810000 0x0
|
||||
*(.eeprom*)
|
||||
0x00810000 __eeprom_end = .
|
||||
|
||||
.fuse
|
||||
*(.fuse)
|
||||
*(.lfuse)
|
||||
*(.hfuse)
|
||||
*(.efuse)
|
||||
|
||||
.lock
|
||||
*(.lock*)
|
||||
|
||||
.signature
|
||||
*(.signature*)
|
||||
|
||||
.user_signatures
|
||||
*(.user_signatures*)
|
||||
|
||||
.stab
|
||||
*(.stab)
|
||||
|
||||
.stabstr
|
||||
*(.stabstr)
|
||||
|
||||
.stab.excl
|
||||
*(.stab.excl)
|
||||
|
||||
.stab.exclstr
|
||||
*(.stab.exclstr)
|
||||
|
||||
.stab.index
|
||||
*(.stab.index)
|
||||
|
||||
.stab.indexstr
|
||||
*(.stab.indexstr)
|
||||
|
||||
.comment 0x00000000 0x30
|
||||
*(.comment)
|
||||
.comment 0x00000000 0x30 main.o
|
||||
0x31 (size before relaxing)
|
||||
|
||||
.note.gnu.avr.deviceinfo
|
||||
0x00000000 0x3c
|
||||
.note.gnu.avr.deviceinfo
|
||||
0x00000000 0x3c C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/gcc/dev/atmega128/avr51/crtatmega128.o
|
||||
|
||||
.note.gnu.build-id
|
||||
*(.note.gnu.build-id)
|
||||
|
||||
.debug
|
||||
*(.debug)
|
||||
|
||||
.line
|
||||
*(.line)
|
||||
|
||||
.debug_srcinfo
|
||||
*(.debug_srcinfo)
|
||||
|
||||
.debug_sfnames
|
||||
*(.debug_sfnames)
|
||||
|
||||
.debug_aranges 0x00000000 0x70
|
||||
*(.debug_aranges)
|
||||
.debug_aranges
|
||||
0x00000000 0x70 main.o
|
||||
|
||||
.debug_pubnames
|
||||
*(.debug_pubnames)
|
||||
|
||||
.debug_info 0x00000000 0x3fb
|
||||
*(.debug_info .gnu.linkonce.wi.*)
|
||||
.debug_info 0x00000000 0x3fb main.o
|
||||
|
||||
.debug_abbrev 0x00000000 0x216
|
||||
*(.debug_abbrev)
|
||||
.debug_abbrev 0x00000000 0x216 main.o
|
||||
|
||||
.debug_line 0x00000000 0x303
|
||||
*(.debug_line .debug_line.* .debug_line_end)
|
||||
.debug_line 0x00000000 0x303 main.o
|
||||
|
||||
.debug_frame 0x00000000 0x174
|
||||
*(.debug_frame)
|
||||
.debug_frame 0x00000000 0x174 main.o
|
||||
|
||||
.debug_str 0x00000000 0x1f8
|
||||
*(.debug_str)
|
||||
.debug_str 0x00000000 0x1f8 main.o
|
||||
0x231 (size before relaxing)
|
||||
|
||||
.debug_loc 0x00000000 0x346
|
||||
*(.debug_loc)
|
||||
.debug_loc 0x00000000 0x346 main.o
|
||||
|
||||
.debug_macinfo
|
||||
*(.debug_macinfo)
|
||||
|
||||
.debug_weaknames
|
||||
*(.debug_weaknames)
|
||||
|
||||
.debug_funcnames
|
||||
*(.debug_funcnames)
|
||||
|
||||
.debug_typenames
|
||||
*(.debug_typenames)
|
||||
|
||||
.debug_varnames
|
||||
*(.debug_varnames)
|
||||
|
||||
.debug_pubtypes
|
||||
*(.debug_pubtypes)
|
||||
|
||||
.debug_ranges 0x00000000 0x78
|
||||
*(.debug_ranges)
|
||||
.debug_ranges 0x00000000 0x78 main.o
|
||||
|
||||
.debug_macro
|
||||
*(.debug_macro)
|
||||
OUTPUT(MIC-Week2.elf elf32-avr)
|
||||
LOAD linker stubs
|
||||
@@ -0,0 +1,38 @@
|
||||
S01100004D49432D5765656B322E737265634F
|
||||
S113000045C0000061C0000090C00000C1C00000F5
|
||||
S11300105AC0000064C0000056C0000054C0000074
|
||||
S113002052C0000050C000004EC000004CC0000090
|
||||
S11300304AC0000048C0000046C0000044C00000A0
|
||||
S113004042C0000040C000003EC000003CC00000B0
|
||||
S11300503AC0000038C0000036C0000034C00000C0
|
||||
S113006032C0000030C000002EC000002CC00000D0
|
||||
S11300702AC0000028C0000026C0000024C00000E0
|
||||
S113008022C0000020C000001EC0000011241FBEBA
|
||||
S1130090CFEFD0E1DEBFCDBF11E0A0E0B1E0ECE2F4
|
||||
S11300A0F2E000E00BBF02C007900D92A031B1074F
|
||||
S11300B0D9F721E0A0E1B1E001C01D92A231B2075D
|
||||
S11300C0E1F7B1D0B1C09CCF1F920F920FB60F923F
|
||||
S11300D01124959A0F900FBE0F901F9018951F92A0
|
||||
S11300E00F920FB60F9211248F939F9393B181E0D7
|
||||
S11300F0892783B99F918F910F900FBE0F901F9006
|
||||
S11301001895892B21F085B3869585BB03C085B3EB
|
||||
S1130110880F85BBAF9B03C081E085BB089585B381
|
||||
S1130120811102C080E885BB08951F920F920FB61B
|
||||
S11301300F9211240BB60F922F933F934F935F931B
|
||||
S11301406F937F938F939F93AF93BF93EF93FF939B
|
||||
S11301508091100190911101009711F4959805C0B8
|
||||
S1130160019719F481E090E0CCDFFF91EF91BF910A
|
||||
S1130170AF919F918F917F916F915F914F913F913B
|
||||
S11301802F910F900BBE0F900FBE0F901F901895DC
|
||||
S11301901F920F920FB60F9211240BB60F922F934A
|
||||
S11301A03F934F935F936F937F938F939F93AF93FB
|
||||
S11301B0BF93EF93FF9380E090E0A3DFFF91EF9173
|
||||
S11301C0BF91AF919F918F917F916F915F914F916B
|
||||
S11301D03F912F910F900BBE0F900FBE0F901F9069
|
||||
S11301E0189514BA8FEF81BB80E090E0A0E0B1E0F5
|
||||
S11301F023B3213011F4019601C023B3803191055A
|
||||
S11302002CF01E962C911E9722BBF2CF99232CF42E
|
||||
S11302101E962C911E9722BBEBCFFC01E050FF4FA2
|
||||
S10F0220208122BBE5CFDDDFF894FFCF86
|
||||
S113022C3F065B4F666D7D077F6F777C395E797116
|
||||
S9030000FC
|
||||
@@ -0,0 +1,129 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
SHELL := cmd.exe
|
||||
RM := rm -rf
|
||||
|
||||
USER_OBJS :=
|
||||
|
||||
LIBS :=
|
||||
PROJ :=
|
||||
|
||||
O_SRCS :=
|
||||
C_SRCS :=
|
||||
S_SRCS :=
|
||||
S_UPPER_SRCS :=
|
||||
OBJ_SRCS :=
|
||||
ASM_SRCS :=
|
||||
PREPROCESSING_SRCS :=
|
||||
OBJS :=
|
||||
OBJS_AS_ARGS :=
|
||||
C_DEPS :=
|
||||
C_DEPS_AS_ARGS :=
|
||||
EXECUTABLES :=
|
||||
OUTPUT_FILE_PATH :=
|
||||
OUTPUT_FILE_PATH_AS_ARGS :=
|
||||
AVR_APP_PATH :=$$$AVR_APP_PATH$$$
|
||||
QUOTE := "
|
||||
ADDITIONAL_DEPENDENCIES:=
|
||||
OUTPUT_FILE_DEP:=
|
||||
LIB_DEP:=
|
||||
LINKER_SCRIPT_DEP:=
|
||||
|
||||
# Every subdirectory with source files must be described here
|
||||
SUBDIRS :=
|
||||
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../main.c
|
||||
|
||||
|
||||
PREPROCESSING_SRCS +=
|
||||
|
||||
|
||||
ASM_SRCS +=
|
||||
|
||||
|
||||
OBJS += \
|
||||
main.o
|
||||
|
||||
OBJS_AS_ARGS += \
|
||||
main.o
|
||||
|
||||
C_DEPS += \
|
||||
main.d
|
||||
|
||||
C_DEPS_AS_ARGS += \
|
||||
main.d
|
||||
|
||||
OUTPUT_FILE_PATH +=MIC-Week2.elf
|
||||
|
||||
OUTPUT_FILE_PATH_AS_ARGS +=MIC-Week2.elf
|
||||
|
||||
ADDITIONAL_DEPENDENCIES:=
|
||||
|
||||
OUTPUT_FILE_DEP:= ./makedep.mk
|
||||
|
||||
LIB_DEP+=
|
||||
|
||||
LINKER_SCRIPT_DEP+=
|
||||
|
||||
|
||||
# AVR32/GNU C Compiler
|
||||
|
||||
|
||||
|
||||
./%.o: .././%.c
|
||||
@echo Building file: $<
|
||||
@echo Invoking: AVR/GNU C Compiler : 4.9.2
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\include" -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\gcc\dev\atmega128" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
|
||||
@echo Finished building: $<
|
||||
|
||||
|
||||
|
||||
|
||||
# AVR32/GNU Preprocessing Assembler
|
||||
|
||||
|
||||
|
||||
# AVR32/GNU Assembler
|
||||
|
||||
|
||||
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifneq ($(strip $(C_DEPS)),)
|
||||
-include $(C_DEPS)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
|
||||
# All Target
|
||||
all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES)
|
||||
|
||||
$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
|
||||
@echo Building target: $@
|
||||
@echo Invoking: AVR/GNU Linker : 4.9.2
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="MIC-Week2.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mrelax -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\gcc\dev\atmega128"
|
||||
@echo Finished building target: $@
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "MIC-Week2.elf" "MIC-Week2.hex"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "MIC-Week2.elf" "MIC-Week2.eep" || exit 0
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "MIC-Week2.elf" > "MIC-Week2.lss"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "MIC-Week2.elf" "MIC-Week2.srec"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-size.exe" "MIC-Week2.elf"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Other Targets
|
||||
clean:
|
||||
-$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES)
|
||||
-$(RM) $(C_DEPS_AS_ARGS)
|
||||
rm -rf "MIC-Week2.elf" "MIC-Week2.a" "MIC-Week2.hex" "MIC-Week2.lss" "MIC-Week2.eep" "MIC-Week2.map" "MIC-Week2.srec" "MIC-Week2.usersignatures"
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
main.d main.o: .././main.c \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\4.9.2\include\stdint.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\include/avr/iom128.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\delay.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\delay_basic.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\math.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\4.9.2\include\stdint.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h:
|
||||
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\include/avr/iom128.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\delay.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\delay_basic.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\math.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h:
|
||||
@@ -0,0 +1,6 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit or delete the file
|
||||
################################################################################
|
||||
|
||||
main.c
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.0.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\include</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>C</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>include</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\include\avr\iom128.h</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>C</Condition>
|
||||
<FileContentHash>w6TcdtnSFTUbj2H2rTwkDQ==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>include/avr/iom128.h</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\templates\main.c</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>C Exe</Condition>
|
||||
<FileContentHash>kmG3LJK3C92Gf3pXxH9BGA==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>templates/main.c</Name>
|
||||
<SelectString>Main file (.c)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\templates\main.cpp</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>C Exe</Condition>
|
||||
<FileContentHash>YXFphlh0CtZJU+ebktABgQ==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>templates/main.cpp</Name>
|
||||
<SelectString>Main file (.cpp)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.90\gcc\dev\atmega128</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>libraryPrefix</Category>
|
||||
<Condition>GCC</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>gcc/dev/atmega128</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.0.90/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.0.90</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
|
||||
<ProjectGuid>{d4088b23-c726-4644-ab7e-6702c074a3c4}</ProjectGuid>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<OutputType>Executable</OutputType>
|
||||
<Language>C</Language>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.elf</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<AssemblyName>MIC-Week2</AssemblyName>
|
||||
<Name>MIC-Week2</Name>
|
||||
<RootNamespace>MIC-Week2</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress />
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue />
|
||||
<BootSegment>2</BootSegment>
|
||||
<eraseonlaunchrule>1</eraseonlaunchrule>
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.28.1" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrGcc>
|
||||
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.0.90\gcc\dev\atmega128"</avrgcc.common.Device>
|
||||
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
|
||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
||||
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
|
||||
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
|
||||
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
|
||||
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
|
||||
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
|
||||
<avrgcc.compiler.symbols.DefSymbols>
|
||||
<ListValues>
|
||||
<Value>NDEBUG</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.symbols.DefSymbols>
|
||||
<avrgcc.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.0.90\include</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.directories.IncludePaths>
|
||||
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
|
||||
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
|
||||
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
|
||||
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
|
||||
<avrgcc.linker.libraries.Libraries>
|
||||
<ListValues>
|
||||
<Value>libm</Value>
|
||||
</ListValues>
|
||||
</avrgcc.linker.libraries.Libraries>
|
||||
</AvrGcc>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrGcc>
|
||||
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.0.90\gcc\dev\atmega128"</avrgcc.common.Device>
|
||||
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
|
||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
||||
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
|
||||
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
|
||||
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
|
||||
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
|
||||
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
|
||||
<avrgcc.compiler.symbols.DefSymbols>
|
||||
<ListValues>
|
||||
<Value>DEBUG</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.symbols.DefSymbols>
|
||||
<avrgcc.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.0.90\include</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.directories.IncludePaths>
|
||||
<avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
|
||||
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
|
||||
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
|
||||
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
|
||||
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
|
||||
<avrgcc.linker.libraries.Libraries>
|
||||
<ListValues>
|
||||
<Value>libm</Value>
|
||||
</ListValues>
|
||||
</avrgcc.linker.libraries.Libraries>
|
||||
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
|
||||
</AvrGcc>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="main.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,225 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
** This software is in the public domain, furnished "as is", without technical
|
||||
** support, and with no warranty, express or implied, as to its usefulness for
|
||||
** any purpose.
|
||||
**
|
||||
** ioisr.c
|
||||
**
|
||||
** Beschrijving: ISR on PORTD demonstrattion
|
||||
** Target: AVR mcu
|
||||
** Build: avr-gcc -std=c99 -Wall -O3 -mmcu=atmega128 -D F_CPU=8000000UL -c ioisr.c
|
||||
** avr-gcc -g -mmcu=atmega128 -o ioisr.elf ioisr.o
|
||||
** avr-objcopy -O ihex ioisr.elf ioisr.hex
|
||||
** or type 'make'
|
||||
** Author: dkroeske@gmail.com
|
||||
** -------------------------------------------------------------------------*/
|
||||
|
||||
#define F_CPU 8000000UL //CPU op 8MHz
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
int opdr;
|
||||
/******************************************************************/
|
||||
void wait( int ms )
|
||||
/*
|
||||
short: Busy wait number of millisecs
|
||||
inputs: int ms (Number of millisecs to busy wait)
|
||||
outputs:
|
||||
notes: Busy wait, not very accurate. Make sure (external)
|
||||
clock value is set. This is used by _delay_ms inside
|
||||
util/delay.h
|
||||
Version : DMK, Initial code
|
||||
*******************************************************************/
|
||||
{
|
||||
for (int i=0; i<ms; i++)
|
||||
{
|
||||
_delay_ms( 1 ); // library function (max 30 ms at 8MHz)
|
||||
}
|
||||
}
|
||||
|
||||
char data[16] = { //segment display
|
||||
0b00111111, // 0
|
||||
0b00000110, // 1
|
||||
0b01011011, // 2
|
||||
0b01001111, // 3
|
||||
0b01100110, // 4
|
||||
0b01101101, // 5
|
||||
0b01111101, // 6
|
||||
0b00000111, // 7
|
||||
0b01111111, // 8
|
||||
0b01101111, // 9
|
||||
0b01110111, // A
|
||||
0b01111100, // B
|
||||
0b00111001, // C
|
||||
0b01011110, // D
|
||||
0b01111001, // E
|
||||
0b01110001 // F
|
||||
};
|
||||
|
||||
/******************************************************************/
|
||||
ISR( INT0_vect ) //powerpointopg
|
||||
/*
|
||||
short: ISR INT0
|
||||
inputs:
|
||||
outputs:
|
||||
notes: Set PORTD.5
|
||||
Version : DMK, Initial code
|
||||
*******************************************************************/
|
||||
{
|
||||
PORTD |= (1<<5);
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
ISR( INT1_vect )
|
||||
{
|
||||
/*
|
||||
short: ISR INT1
|
||||
inputs:
|
||||
outputs:
|
||||
notes: Clear PORTD.5
|
||||
Version : DMK, Initial code
|
||||
*******************************************************************/
|
||||
if(opdr==0)
|
||||
{
|
||||
PORTD &= ~(1<<5);
|
||||
}
|
||||
else if(opdr==1)
|
||||
{
|
||||
shift(1);
|
||||
}
|
||||
}
|
||||
|
||||
ISR( INT2_vect ) //powerpointopg
|
||||
/*
|
||||
short: ISR INT4
|
||||
inputs:
|
||||
outputs:
|
||||
notes: Clear PORTD.3
|
||||
Version : DMK, Initial code
|
||||
*******************************************************************/
|
||||
{
|
||||
shift(0);
|
||||
}
|
||||
|
||||
ISR( INT4_vect ) //powerpointopg
|
||||
/*
|
||||
short: ISR INT4
|
||||
inputs:
|
||||
outputs:
|
||||
notes: Clear PORTD.3
|
||||
Version : DMK, Initial code
|
||||
*******************************************************************/
|
||||
{
|
||||
PORTE ^= 0x01; //PE0
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
int main( void )
|
||||
/*
|
||||
short: main() loop, entry point of executable
|
||||
inputs:
|
||||
outputs:
|
||||
notes: Slow background task after init ISR
|
||||
Version : DMK, Initial code
|
||||
*******************************************************************/
|
||||
{
|
||||
//powerpointOpg();
|
||||
//opgave2();
|
||||
opgave3();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void powerpointOpg(void)
|
||||
{
|
||||
// Init I/O
|
||||
DDRD = 0xF0; // PORTD(7:4) output, PORTD(3:0) input
|
||||
DDRE = 0x0F; // PORTE(7:4) input, PORTE(3:0) output
|
||||
|
||||
// Init Interrupt hardware
|
||||
EICRA |= 0x0B; // INT1 falling edge, INT0 rising edge
|
||||
EICRB |= 0x02; // INT4 falling edge
|
||||
EIMSK |= 0x13; // Enable INT1 & INT0 & INT4
|
||||
|
||||
|
||||
// Enable global interrupt system
|
||||
//SREG = 0x80; // Of direct via SREG of via wrapper
|
||||
opdr=0;
|
||||
sei();
|
||||
|
||||
|
||||
while (1)
|
||||
{
|
||||
PORTD ^= (1<<7); // Toggle PORTD.7
|
||||
wait( 500 );
|
||||
}
|
||||
}
|
||||
|
||||
void opgave2(void)
|
||||
{
|
||||
DDRD = 0xF0; //PORTD(7:4) output, PORTD(3:0) input
|
||||
DDRC = 0xFF; //PORTC(7:0) output;
|
||||
PORTC= 0x1;
|
||||
|
||||
EICRA |= 0x28; //INT1 en INT2 falling edge
|
||||
EIMSK |= 0x06;
|
||||
opdr=1;
|
||||
sei();
|
||||
|
||||
while(1)
|
||||
{
|
||||
wait(500);
|
||||
}
|
||||
}
|
||||
|
||||
void shift(int i)
|
||||
{
|
||||
|
||||
if(i)
|
||||
PORTC = (PORTC>>1);
|
||||
else
|
||||
PORTC = (PORTC<<1);
|
||||
|
||||
//Als het looplicht aan het einde is
|
||||
if (PORTC >= 0x80)
|
||||
{
|
||||
PORTC= 0x01;
|
||||
}
|
||||
//Als het looplicht aan het begin is
|
||||
else if (PORTC < 0x1)
|
||||
{
|
||||
PORTC= 0x80;
|
||||
}
|
||||
}
|
||||
|
||||
void opgave3()
|
||||
{
|
||||
DDRC = 0x00;
|
||||
DDRD = 0xFF;
|
||||
|
||||
int count = 0;
|
||||
|
||||
while(1)
|
||||
{
|
||||
if(0b00000001 & PINC == 0b00000001)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
else if(0b00000010 & PINC == 0b00000010)
|
||||
{
|
||||
count--;
|
||||
}
|
||||
|
||||
if(count > 15)
|
||||
display(14);
|
||||
else if(count < 0)
|
||||
display(14);
|
||||
else
|
||||
display(count);
|
||||
}
|
||||
}
|
||||
void display(int d)
|
||||
{
|
||||
PORTD = data[d];
|
||||
}
|
||||
Reference in New Issue
Block a user