diff --git a/Leuchtklotz/Leuchtklotz.atsuo b/Leuchtklotz/Leuchtklotz.atsuo index 144bfaa..23c99eb 100644 Binary files a/Leuchtklotz/Leuchtklotz.atsuo and b/Leuchtklotz/Leuchtklotz.atsuo differ diff --git a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.elf b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.elf index 2156057..9145c08 100644 Binary files a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.elf and b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.elf differ diff --git a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.hex b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.hex index 995684a..661333c 100644 --- a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.hex +++ b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.hex @@ -2,7 +2,7 @@ :100010001AC019C018C017C016C015C014C013C02C :1000200012C011C010C00FC00EC011241FBECFEDF2 :10003000CDBF20E0A0E6B0E001C01D92A036B2071F -:10004000E1F714D219C2DCCF6770772780FF06C0B2 +:10004000E1F74BD152C1DCCF6770772780FF06C044 :1000500098B3987F98BB98B3962B98BB81FF0DC03F :1000600098B3977C98BB98B39B01220F331F220F44 :10007000331F220F331F292B28BB82FF06C092B3E8 @@ -20,54 +20,29 @@ :10013000E816F10421F0161417046CF3F5CFDF91E3 :10014000CF911F910F91FF90EF90DF90CF90BF90D4 :10015000AF909F908F907F906F905F904F903F9067 -:100160002F90089566E070E085E090E06DDF2FE766 -:1001700088E391E0215080409040E1F700C000000A -:1001800060E070E085E090E05FDF2FE784E89EE1CB -:10019000215080409040E1F700C0000066E070E030 -:1001A0008FE090E051DF8FE493EC0197F1F700C00E -:1001B000000060E070E08FE090E046DF9FE72AE11A -:1001C00086E0915020408040E1F700C0000066E0EA -:1001D00070E08FE090E038DF9FE728E381E0915006 -:1001E00020408040E1F700C0000060E070E08FE058 -:1001F00090E02ADF9FE72AE186E09150204080408E -:10020000E1F700C0000066E070E08FE090E01CDFE6 -:100210009FEB24ED81E0915020408040E1F700C049 -:10022000000060E070E08FE090E00EDF9FEF28E0DC -:100230008DE3915020408040E1F700C0000024E1B0 -:1002400030E047E050E066E070E08FE090E02CDFC7 -:1002500060E070E08FE090E0F7DE089588B3806C96 -:1002600088BB969A8FE493EC0197F1F700C00000E9 -:10027000089564E070E081E090E0E6DE2FE38DE039 -:1002800093E0215080409040E1F700C0000060E022 -:1002900070E081E090E0D8DE2FE38DE093E0215024 -:1002A00080409040E1F700C0000062E070E081E033 -:1002B00090E0CADE2FE38DE093E021508040904033 -:1002C000E1F700C0000060E070E081E090E0BCDE9B -:1002D0002FE38DE093E0215080409040E1F700C093 -:1002E000000061E070E081E090E0AEDE2FE38DE0A1 -:1002F00093E0215080409040E1F700C0000060E0B2 -:1003000070E081E090E0A0DE2FE38DE093E02150EB -:1003100080409040E1F700C0000064E070E084E0BD -:1003200090E092DE2FE38DE093E0215080409040FA -:10033000E1F700C0000060E070E084E090E084DE5F -:100340002FE38DE093E0215080409040E1F700C022 -:10035000000062E070E084E090E076DE2FE38DE064 -:1003600093E0215080409040E1F700C0000060E041 -:1003700070E084E090E068DE2FE38DE093E02150B0 -:1003800080409040E1F700C0000061E070E084E050 -:1003900090E05ADE2FE38DE093E0215080409040C2 -:1003A000E1F700C0000060E070E084E090E04CDE27 -:1003B0002FEB87E299E0215080409040E1F700C0A8 -:1003C000000064E070E085E090E03EDE2FE38DE029 -:1003D00093E0215080409040E1F700C0000060E0D1 -:1003E00070E085E090E030DE2FE38DE093E0215077 -:1003F00080409040E1F700C0000062E070E085E0DE -:1004000090E022DE2FE38DE093E021508040904089 -:10041000E1F700C0000060E070E085E090E014DEED -:100420002FE38DE093E0215080409040E1F700C041 -:10043000000061E070E085E090E006DE2FE38DE0F3 -:1004400093E0215080409040E1F700C0000060E060 -:1004500070E085E090E0F8DD2FEB87E299E0215035 -:1004600080409040E1F700C0000003CF8FE387BBDE -:0C04700081BBF4DE77DEFDDEF894FFCFE8 +:100160002F90089566E070E085E090E06DDF8FE409 +:1001700093EC0197F1F700C0000060E070E085E0CB +:1001800090E062DF9FE322E48FE0915020408040C6 +:10019000E1F700C0000066E070E08FE090E054DF1F +:1001A00087EA91E60197F1F700C0000060E070E097 +:1001B0008FE090E049DF9FE32DE083E09150204005 +:1001C0008040E1F700C0000066E070E08FE090E062 +:1001D0003BDF8FE493EC0197F1F700C0000060E093 +:1001E00070E08FE090E030DF9FE32DE083E09150FE +:1001F00020408040E1F700C0000066E070E08FE042 +:1002000090E022DF9FE52AEE80E091502040804080 +:10021000E1F700C0000060E070E08FE090E014DFE4 +:100220009FE724E88EE1915020408040E1F700C034 +:10023000000025E030E047E050E066E070E08FE04D +:1002400090E032DF60E070E08FE090E0FDDE089546 +:1002500088B3806C88BB969A8FE493EC0197F1F792 +:1002600000C000000895CF93C82F282F30E043E04E +:1002700050E061E070E08FE090E016DF2C2F30E07E +:1002800042E050E063E070E08FE090E00DDF2C2F63 +:1002900030E046E050E062E070E08FE090E004DFA4 +:1002A0002C2F30E044E050E066E070E08FE090E01A +:1002B000FBDE2C2F30E045E050E064E070E08FE0A2 +:1002C00090E0F2DE2C2F30E041E050E065E070E09D +:1002D0008FE090E0E9DECF9108958FE387BB81BB8B +:0E02E000B7DF40DF82E3BFDFFDCFF894FFCF32 :00000001FF diff --git a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.lss b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.lss index a04b714..ff82f26 100644 --- a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.lss +++ b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.lss @@ -3,31 +3,31 @@ Leuchtklotz.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn - 0 .text 0000047c 00000000 00000000 00000074 2**1 + 0 .text 000002ee 00000000 00000000 00000074 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 00000000 00800060 0000047c 000004f0 2**0 + 1 .data 00000000 00800060 000002ee 00000362 2**0 CONTENTS, ALLOC, LOAD, DATA - 2 .stab 000006b4 00000000 00000000 000004f0 2**2 + 2 .stab 000006b4 00000000 00000000 00000364 2**2 CONTENTS, READONLY, DEBUGGING - 3 .stabstr 00000082 00000000 00000000 00000ba4 2**0 + 3 .stabstr 00000082 00000000 00000000 00000a18 2**0 CONTENTS, READONLY, DEBUGGING - 4 .comment 0000002f 00000000 00000000 00000c26 2**0 + 4 .comment 0000002f 00000000 00000000 00000a9a 2**0 CONTENTS, READONLY - 5 .debug_aranges 00000080 00000000 00000000 00000c55 2**0 + 5 .debug_aranges 00000080 00000000 00000000 00000ac9 2**0 CONTENTS, READONLY, DEBUGGING - 6 .debug_info 00002042 00000000 00000000 00000cd5 2**0 + 6 .debug_info 00001df9 00000000 00000000 00000b49 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_abbrev 00000226 00000000 00000000 00002d17 2**0 + 7 .debug_abbrev 00000237 00000000 00000000 00002942 2**0 CONTENTS, READONLY, DEBUGGING - 8 .debug_line 00000711 00000000 00000000 00002f3d 2**0 + 8 .debug_line 000005a2 00000000 00000000 00002b79 2**0 CONTENTS, READONLY, DEBUGGING - 9 .debug_frame 00000188 00000000 00000000 00003650 2**2 + 9 .debug_frame 000001a4 00000000 00000000 0000311c 2**2 CONTENTS, READONLY, DEBUGGING - 10 .debug_str 000001b3 00000000 00000000 000037d8 2**0 + 10 .debug_str 000001cf 00000000 00000000 000032c0 2**0 CONTENTS, READONLY, DEBUGGING - 11 .debug_loc 00000643 00000000 00000000 0000398b 2**0 + 11 .debug_loc 00000767 00000000 00000000 0000348f 2**0 CONTENTS, READONLY, DEBUGGING - 12 .debug_ranges 00000130 00000000 00000000 00003fce 2**0 + 12 .debug_ranges 00000118 00000000 00000000 00003bf6 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: @@ -74,8 +74,8 @@ Disassembly of section .text: 3c: a0 36 cpi r26, 0x60 ; 96 3e: b2 07 cpc r27, r18 40: e1 f7 brne .-8 ; 0x3a <.do_clear_bss_loop> - 42: 14 d2 rcall .+1064 ; 0x46c
- 44: 19 c2 rjmp .+1074 ; 0x478 <_exit> + 42: 4b d1 rcall .+662 ; 0x2da
+ 44: 52 c1 rjmp .+676 ; 0x2ea <_exit> 00000046 <__bad_interrupt>: 46: dc cf rjmp .-72 ; 0x0 <__vectors> @@ -93,6 +93,12 @@ Disassembly of section .text: 4e: 06 c0 rjmp .+12 ; 0x5c 50: 98 b3 in r25, 0x18 ; 24 52: 98 7f andi r25, 0xF8 ; 248 + _delay_ms(50); + ledg(LED1, BLACK); + _delay_ms(50); + ledg(LED1, GREEN); + _delay_ms(50); + ledg(LED1, BLACK); 54: 98 bb out 0x18, r25 ; 24 56: 98 b3 in r25, 0x18 ; 24 58: 96 2b or r25, r22 @@ -107,6 +113,8 @@ Disassembly of section .text: 6a: 22 0f add r18, r18 6c: 33 1f adc r19, r19 6e: 22 0f add r18, r18 + _delay_ms(50); + ledg(LED1, RED); 70: 33 1f adc r19, r19 72: 22 0f add r18, r18 74: 33 1f adc r19, r19 @@ -121,14 +129,10 @@ Disassembly of section .text: 86: 96 2b or r25, r22 88: 92 bb out 0x12, r25 ; 18 8a: 83 ff sbrs r24, 3 + _delay_ms(50); + ledg(LED1, BLACK); 8c: 0c c0 rjmp .+24 ; 0xa6 8e: 82 b3 in r24, 0x12 ; 18 - _delay_ms(3000); - _delay_ms(3000); - _delay_ms(3000); - _delay_ms(1000); - for(uint8_t i=0;i<20;i++) { - ledg(LED1 | LED2 | LED3 | LED4, BLACK); 90: 87 7c andi r24, 0xC7 ; 199 92: 82 bb out 0x12, r24 ; 18 94: 82 b3 in r24, 0x12 ; 18 @@ -143,10 +147,10 @@ Disassembly of section .text: a6: 08 95 ret 000000a8 : + _delay_ms(50); + ledg(LED3, BLUE); a8: 2f 92 push r2 aa: 3f 92 push r3 - _delay_ms(50); - ledg(LED1 | LED2 | LED3 | LED4, YELLOW); ac: 4f 92 push r4 ae: 5f 92 push r5 b0: 6f 92 push r6 @@ -159,22 +163,12 @@ Disassembly of section .text: be: df 92 push r13 c0: ef 92 push r14 c2: ff 92 push r15 + _delay_ms(50); + ledg(LED3, BLACK); c4: 0f 93 push r16 c6: 1f 93 push r17 c8: cf 93 push r28 - ledg(LED1 | LED2 | LED3 | LED4, YELLOW); - _delay_ms(3000); - _delay_ms(3000); - _delay_ms(3000); - _delay_ms(1000); - for(uint8_t i=0;i<20;i++) { ca: df 93 push r29 - ledg(LED1 | LED2 | LED3 | LED4, BLACK); - _delay_ms(50); - ledg(LED1 | LED2 | LED3 | LED4, YELLOW); - _delay_ms(50); - } - ledg(LED1 | LED2 | LED3 | LED4, GREEN); cc: 8c 01 movw r16, r24 ce: 4b 01 movw r8, r22 d0: 6a 01 movw r12, r20 @@ -185,12 +179,12 @@ Disassembly of section .text: da: 21 2c mov r2, r1 dc: 2c c0 rjmp .+88 ; 0x136 <__stack+0x57> de: c4 2d mov r28, r4 + _delay_ms(50); + ledg(LED3, GREEN); e0: d5 2d mov r29, r5 e2: b4 01 movw r22, r8 e4: c8 01 movw r24, r16 e6: b0 df rcall .-160 ; 0x48 - _delay_ms(2500); - ledg(LED1 | LED2 | LED3 | LED4, YELLOW); e8: 21 96 adiw r28, 0x01 ; 1 ea: cf 3f cpi r28, 0xFF ; 255 ec: d1 05 cpc r29, r1 @@ -201,6 +195,8 @@ Disassembly of section .text: f6: c3 2d mov r28, r3 f8: d2 2d mov r29, r2 fa: b6 01 movw r22, r12 + _delay_ms(50); + ledg(LED3, BLACK); fc: c8 01 movw r24, r16 fe: a4 df rcall .-184 ; 0x48 100: 21 96 adiw r28, 0x01 ; 1 @@ -215,6 +211,8 @@ Disassembly of section .text: 112: 29 f4 brne .+10 ; 0x11e <__stack+0x3f> 114: 09 c0 rjmp .+18 ; 0x128 <__stack+0x49> 116: a1 2c mov r10, r1 + _delay_ms(50); + ledg(LED3, RED); 118: b1 2c mov r11, r1 11a: 4e 2c mov r4, r14 11c: 5f 2c mov r5, r15 @@ -229,16 +227,12 @@ Disassembly of section .text: 12e: 8f ef ldi r24, 0xFF ; 255 130: e8 16 cp r14, r24 132: f1 04 cpc r15, r1 + _delay_ms(50); + ledg(LED3, BLACK); 134: 21 f0 breq .+8 ; 0x13e <__stack+0x5f> 136: 16 14 cp r1, r6 138: 17 04 cpc r1, r7 13a: 6c f3 brlt .-38 ; 0x116 <__stack+0x37> - _delay_ms(3000); - _delay_ms(3000); - _delay_ms(3000); - _delay_ms(1000); - for(uint8_t i=0;i<10;i++) { - ledg(LED1 | LED2 | LED3 | LED4, BLACK); 13c: f5 cf rjmp .-22 ; 0x128 <__stack+0x49> 13e: df 91 pop r29 140: cf 91 pop r28 @@ -249,12 +243,12 @@ Disassembly of section .text: 14a: df 90 pop r13 14c: cf 90 pop r12 14e: bf 90 pop r11 + _delay_ms(150); + ledg(LED1 | LED3, BLUE); 150: af 90 pop r10 152: 9f 90 pop r9 154: 8f 90 pop r8 156: 7f 90 pop r7 - _delay_ms(50); - ledg(LED1 | LED2 | LED3 | LED4, YELLOW); 158: 6f 90 pop r6 15a: 5f 90 pop r5 15c: 4f 90 pop r4 @@ -267,499 +261,260 @@ Disassembly of section .text: 166: 70 e0 ldi r23, 0x00 ; 0 168: 85 e0 ldi r24, 0x05 ; 5 16a: 90 e0 ldi r25, 0x00 ; 0 - 16c: 6d df rcall .-294 ; 0x48 - 16e: 2f e7 ldi r18, 0x7F ; 127 - 170: 88 e3 ldi r24, 0x38 ; 56 - 172: 91 e0 ldi r25, 0x01 ; 1 - 174: 21 50 subi r18, 0x01 ; 1 - ledg(LED1 | LED2 | LED3 | LED4, YELLOW); - _delay_ms(3000); - _delay_ms(3000); - _delay_ms(3000); - _delay_ms(1000); - for(uint8_t i=0;i<10;i++) { - 176: 80 40 sbci r24, 0x00 ; 0 - ledg(LED1 | LED2 | LED3 | LED4, BLACK); - _delay_ms(50); - ledg(LED1 | LED2 | LED3 | LED4, YELLOW); - _delay_ms(50); - } - ledg(LED1 | LED2 | LED3 | LED4, RED); - 178: 90 40 sbci r25, 0x00 ; 0 - 17a: e1 f7 brne .-8 ; 0x174 - 17c: 00 c0 rjmp .+0 ; 0x17e - 17e: 00 00 nop - 180: 60 e0 ldi r22, 0x00 ; 0 - 182: 70 e0 ldi r23, 0x00 ; 0 - 184: 85 e0 ldi r24, 0x05 ; 5 - 186: 90 e0 ldi r25, 0x00 ; 0 - 188: 5f df rcall .-322 ; 0x48 - 18a: 2f e7 ldi r18, 0x7F ; 127 - 18c: 84 e8 ldi r24, 0x84 ; 132 - 18e: 9e e1 ldi r25, 0x1E ; 30 - 190: 21 50 subi r18, 0x01 ; 1 - 192: 80 40 sbci r24, 0x00 ; 0 - 194: 90 40 sbci r25, 0x00 ; 0 - 196: e1 f7 brne .-8 ; 0x190 - 198: 00 c0 rjmp .+0 ; 0x19a - 19a: 00 00 nop -void initleds() { - ledg(LED1 | LED3, CYAN); - _delay_ms(20); - ledg(LED1 | LED3, BLACK); - _delay_ms(500); - ledg(LED1 | LED2 | LED3 | LED4, CYAN); - 19c: 66 e0 ldi r22, 0x06 ; 6 - 19e: 70 e0 ldi r23, 0x00 ; 0 - 1a0: 8f e0 ldi r24, 0x0F ; 15 - 1a2: 90 e0 ldi r25, 0x00 ; 0 - 1a4: 51 df rcall .-350 ; 0x48 - 1a6: 8f e4 ldi r24, 0x4F ; 79 - 1a8: 93 ec ldi r25, 0xC3 ; 195 - 1aa: 01 97 sbiw r24, 0x01 ; 1 - 1ac: f1 f7 brne .-4 ; 0x1aa - 1ae: 00 c0 rjmp .+0 ; 0x1b0 - 1b0: 00 00 nop - _delay_ms(10); - ledg(LED1 | LED2 | LED3 | LED4, BLACK); - 1b2: 60 e0 ldi r22, 0x00 ; 0 - 1b4: 70 e0 ldi r23, 0x00 ; 0 - 1b6: 8f e0 ldi r24, 0x0F ; 15 - 1b8: 90 e0 ldi r25, 0x00 ; 0 - 1ba: 46 df rcall .-372 ; 0x48 - 1bc: 9f e7 ldi r25, 0x7F ; 127 - 1be: 2a e1 ldi r18, 0x1A ; 26 - 1c0: 86 e0 ldi r24, 0x06 ; 6 - 1c2: 91 50 subi r25, 0x01 ; 1 - 1c4: 20 40 sbci r18, 0x00 ; 0 - 1c6: 80 40 sbci r24, 0x00 ; 0 - 1c8: e1 f7 brne .-8 ; 0x1c2 - 1ca: 00 c0 rjmp .+0 ; 0x1cc - 1cc: 00 00 nop - _delay_ms(100); - ledg(LED1 | LED2 | LED3 | LED4, CYAN); - 1ce: 66 e0 ldi r22, 0x06 ; 6 - 1d0: 70 e0 ldi r23, 0x00 ; 0 - 1d2: 8f e0 ldi r24, 0x0F ; 15 - 1d4: 90 e0 ldi r25, 0x00 ; 0 - 1d6: 38 df rcall .-400 ; 0x48 - 1d8: 9f e7 ldi r25, 0x7F ; 127 - 1da: 28 e3 ldi r18, 0x38 ; 56 - 1dc: 81 e0 ldi r24, 0x01 ; 1 - 1de: 91 50 subi r25, 0x01 ; 1 - 1e0: 20 40 sbci r18, 0x00 ; 0 - 1e2: 80 40 sbci r24, 0x00 ; 0 - 1e4: e1 f7 brne .-8 ; 0x1de - 1e6: 00 c0 rjmp .+0 ; 0x1e8 - 1e8: 00 00 nop - _delay_ms(20); - ledg(LED1 | LED2 | LED3 | LED4, BLACK); - 1ea: 60 e0 ldi r22, 0x00 ; 0 - 1ec: 70 e0 ldi r23, 0x00 ; 0 - 1ee: 8f e0 ldi r24, 0x0F ; 15 - 1f0: 90 e0 ldi r25, 0x00 ; 0 - 1f2: 2a df rcall .-428 ; 0x48 - 1f4: 9f e7 ldi r25, 0x7F ; 127 - 1f6: 2a e1 ldi r18, 0x1A ; 26 - 1f8: 86 e0 ldi r24, 0x06 ; 6 - 1fa: 91 50 subi r25, 0x01 ; 1 - 1fc: 20 40 sbci r18, 0x00 ; 0 - 1fe: 80 40 sbci r24, 0x00 ; 0 - 200: e1 f7 brne .-8 ; 0x1fa - 202: 00 c0 rjmp .+0 ; 0x204 - 204: 00 00 nop - _delay_ms(100); - ledg(LED1 | LED2 | LED3 | LED4, CYAN); - 206: 66 e0 ldi r22, 0x06 ; 6 - 208: 70 e0 ldi r23, 0x00 ; 0 - 20a: 8f e0 ldi r24, 0x0F ; 15 - 20c: 90 e0 ldi r25, 0x00 ; 0 - 20e: 1c df rcall .-456 ; 0x48 - 210: 9f eb ldi r25, 0xBF ; 191 - 212: 24 ed ldi r18, 0xD4 ; 212 - 214: 81 e0 ldi r24, 0x01 ; 1 - 216: 91 50 subi r25, 0x01 ; 1 - 218: 20 40 sbci r18, 0x00 ; 0 - 21a: 80 40 sbci r24, 0x00 ; 0 - 21c: e1 f7 brne .-8 ; 0x216 - 21e: 00 c0 rjmp .+0 ; 0x220 - 220: 00 00 nop - _delay_ms(30); - ledg(LED1 | LED2 | LED3 | LED4, BLACK); - 222: 60 e0 ldi r22, 0x00 ; 0 - 224: 70 e0 ldi r23, 0x00 ; 0 - 226: 8f e0 ldi r24, 0x0F ; 15 - 228: 90 e0 ldi r25, 0x00 ; 0 - 22a: 0e df rcall .-484 ; 0x48 - 22c: 9f ef ldi r25, 0xFF ; 255 - 22e: 28 e0 ldi r18, 0x08 ; 8 - 230: 8d e3 ldi r24, 0x3D ; 61 - 232: 91 50 subi r25, 0x01 ; 1 - 234: 20 40 sbci r18, 0x00 ; 0 - 236: 80 40 sbci r24, 0x00 ; 0 - 238: e1 f7 brne .-8 ; 0x232 - 23a: 00 c0 rjmp .+0 ; 0x23c - 23c: 00 00 nop - _delay_ms(1000); - fade(LED1 | LED2 | LED3 | LED4, CYAN, WHITE, 20); - 23e: 24 e1 ldi r18, 0x14 ; 20 - 240: 30 e0 ldi r19, 0x00 ; 0 - 242: 47 e0 ldi r20, 0x07 ; 7 - 244: 50 e0 ldi r21, 0x00 ; 0 - 246: 66 e0 ldi r22, 0x06 ; 6 - 248: 70 e0 ldi r23, 0x00 ; 0 - 24a: 8f e0 ldi r24, 0x0F ; 15 - 24c: 90 e0 ldi r25, 0x00 ; 0 - 24e: 2c df rcall .-424 ; 0xa8 - ledg(LED1 | LED2 | LED3 | LED4, BLACK); - 250: 60 e0 ldi r22, 0x00 ; 0 - 252: 70 e0 ldi r23, 0x00 ; 0 - 254: 8f e0 ldi r24, 0x0F ; 15 - 256: 90 e0 ldi r25, 0x00 ; 0 - 258: f7 de rcall .-530 ; 0x48 - 25a: 08 95 ret - -0000025c : - } -} - -void initschalter() -{ - PORTB |= ((1< - 26c: 00 c0 rjmp .+0 ; 0x26e - 26e: 00 00 nop - 270: 08 95 ret - -00000272 : -} - -void programGreenBlink() -{ - while(1) { - ledg(LED1, BLUE); - 272: 64 e0 ldi r22, 0x04 ; 4 - 274: 70 e0 ldi r23, 0x00 ; 0 - 276: 81 e0 ldi r24, 0x01 ; 1 - 278: 90 e0 ldi r25, 0x00 ; 0 - 27a: e6 de rcall .-564 ; 0x48 - 27c: 2f e3 ldi r18, 0x3F ; 63 - 27e: 8d e0 ldi r24, 0x0D ; 13 - 280: 93 e0 ldi r25, 0x03 ; 3 - 282: 21 50 subi r18, 0x01 ; 1 - 284: 80 40 sbci r24, 0x00 ; 0 - 286: 90 40 sbci r25, 0x00 ; 0 - 288: e1 f7 brne .-8 ; 0x282 - 28a: 00 c0 rjmp .+0 ; 0x28c - 28c: 00 00 nop - _delay_ms(50); - ledg(LED1, BLACK); - 28e: 60 e0 ldi r22, 0x00 ; 0 - 290: 70 e0 ldi r23, 0x00 ; 0 - 292: 81 e0 ldi r24, 0x01 ; 1 - 294: 90 e0 ldi r25, 0x00 ; 0 - 296: d8 de rcall .-592 ; 0x48 - 298: 2f e3 ldi r18, 0x3F ; 63 - 29a: 8d e0 ldi r24, 0x0D ; 13 - 29c: 93 e0 ldi r25, 0x03 ; 3 - 29e: 21 50 subi r18, 0x01 ; 1 - 2a0: 80 40 sbci r24, 0x00 ; 0 - 2a2: 90 40 sbci r25, 0x00 ; 0 - 2a4: e1 f7 brne .-8 ; 0x29e - 2a6: 00 c0 rjmp .+0 ; 0x2a8 - 2a8: 00 00 nop - _delay_ms(50); - ledg(LED1, GREEN); - 2aa: 62 e0 ldi r22, 0x02 ; 2 - 2ac: 70 e0 ldi r23, 0x00 ; 0 - 2ae: 81 e0 ldi r24, 0x01 ; 1 - 2b0: 90 e0 ldi r25, 0x00 ; 0 - 2b2: ca de rcall .-620 ; 0x48 - 2b4: 2f e3 ldi r18, 0x3F ; 63 - 2b6: 8d e0 ldi r24, 0x0D ; 13 - 2b8: 93 e0 ldi r25, 0x03 ; 3 - 2ba: 21 50 subi r18, 0x01 ; 1 - 2bc: 80 40 sbci r24, 0x00 ; 0 - 2be: 90 40 sbci r25, 0x00 ; 0 - 2c0: e1 f7 brne .-8 ; 0x2ba - 2c2: 00 c0 rjmp .+0 ; 0x2c4 - 2c4: 00 00 nop - _delay_ms(50); - ledg(LED1, BLACK); - 2c6: 60 e0 ldi r22, 0x00 ; 0 - 2c8: 70 e0 ldi r23, 0x00 ; 0 - 2ca: 81 e0 ldi r24, 0x01 ; 1 - 2cc: 90 e0 ldi r25, 0x00 ; 0 - 2ce: bc de rcall .-648 ; 0x48 - 2d0: 2f e3 ldi r18, 0x3F ; 63 - 2d2: 8d e0 ldi r24, 0x0D ; 13 - 2d4: 93 e0 ldi r25, 0x03 ; 3 - 2d6: 21 50 subi r18, 0x01 ; 1 - 2d8: 80 40 sbci r24, 0x00 ; 0 - 2da: 90 40 sbci r25, 0x00 ; 0 - 2dc: e1 f7 brne .-8 ; 0x2d6 - 2de: 00 c0 rjmp .+0 ; 0x2e0 - 2e0: 00 00 nop - _delay_ms(50); - ledg(LED1, RED); - 2e2: 61 e0 ldi r22, 0x01 ; 1 - 2e4: 70 e0 ldi r23, 0x00 ; 0 - 2e6: 81 e0 ldi r24, 0x01 ; 1 - 2e8: 90 e0 ldi r25, 0x00 ; 0 - 2ea: ae de rcall .-676 ; 0x48 - 2ec: 2f e3 ldi r18, 0x3F ; 63 - 2ee: 8d e0 ldi r24, 0x0D ; 13 - 2f0: 93 e0 ldi r25, 0x03 ; 3 - 2f2: 21 50 subi r18, 0x01 ; 1 - 2f4: 80 40 sbci r24, 0x00 ; 0 - 2f6: 90 40 sbci r25, 0x00 ; 0 - 2f8: e1 f7 brne .-8 ; 0x2f2 - 2fa: 00 c0 rjmp .+0 ; 0x2fc - 2fc: 00 00 nop - _delay_ms(50); - ledg(LED1, BLACK); - 2fe: 60 e0 ldi r22, 0x00 ; 0 - 300: 70 e0 ldi r23, 0x00 ; 0 - 302: 81 e0 ldi r24, 0x01 ; 1 - 304: 90 e0 ldi r25, 0x00 ; 0 - 306: a0 de rcall .-704 ; 0x48 - 308: 2f e3 ldi r18, 0x3F ; 63 - 30a: 8d e0 ldi r24, 0x0D ; 13 - 30c: 93 e0 ldi r25, 0x03 ; 3 - 30e: 21 50 subi r18, 0x01 ; 1 - 310: 80 40 sbci r24, 0x00 ; 0 - 312: 90 40 sbci r25, 0x00 ; 0 - 314: e1 f7 brne .-8 ; 0x30e - 316: 00 c0 rjmp .+0 ; 0x318 - 318: 00 00 nop - _delay_ms(50); - ledg(LED3, BLUE); - 31a: 64 e0 ldi r22, 0x04 ; 4 - 31c: 70 e0 ldi r23, 0x00 ; 0 - 31e: 84 e0 ldi r24, 0x04 ; 4 - 320: 90 e0 ldi r25, 0x00 ; 0 - 322: 92 de rcall .-732 ; 0x48 - 324: 2f e3 ldi r18, 0x3F ; 63 - 326: 8d e0 ldi r24, 0x0D ; 13 - 328: 93 e0 ldi r25, 0x03 ; 3 - 32a: 21 50 subi r18, 0x01 ; 1 - 32c: 80 40 sbci r24, 0x00 ; 0 - 32e: 90 40 sbci r25, 0x00 ; 0 - 330: e1 f7 brne .-8 ; 0x32a - 332: 00 c0 rjmp .+0 ; 0x334 - 334: 00 00 nop - _delay_ms(50); - ledg(LED3, BLACK); - 336: 60 e0 ldi r22, 0x00 ; 0 - 338: 70 e0 ldi r23, 0x00 ; 0 - 33a: 84 e0 ldi r24, 0x04 ; 4 - 33c: 90 e0 ldi r25, 0x00 ; 0 - 33e: 84 de rcall .-760 ; 0x48 - 340: 2f e3 ldi r18, 0x3F ; 63 - 342: 8d e0 ldi r24, 0x0D ; 13 - 344: 93 e0 ldi r25, 0x03 ; 3 - 346: 21 50 subi r18, 0x01 ; 1 - 348: 80 40 sbci r24, 0x00 ; 0 - 34a: 90 40 sbci r25, 0x00 ; 0 - 34c: e1 f7 brne .-8 ; 0x346 - 34e: 00 c0 rjmp .+0 ; 0x350 - 350: 00 00 nop - _delay_ms(50); - ledg(LED3, GREEN); - 352: 62 e0 ldi r22, 0x02 ; 2 - 354: 70 e0 ldi r23, 0x00 ; 0 - 356: 84 e0 ldi r24, 0x04 ; 4 - 358: 90 e0 ldi r25, 0x00 ; 0 - 35a: 76 de rcall .-788 ; 0x48 - 35c: 2f e3 ldi r18, 0x3F ; 63 - 35e: 8d e0 ldi r24, 0x0D ; 13 - 360: 93 e0 ldi r25, 0x03 ; 3 - 362: 21 50 subi r18, 0x01 ; 1 - 364: 80 40 sbci r24, 0x00 ; 0 - 366: 90 40 sbci r25, 0x00 ; 0 - 368: e1 f7 brne .-8 ; 0x362 - 36a: 00 c0 rjmp .+0 ; 0x36c - 36c: 00 00 nop - _delay_ms(50); - ledg(LED3, BLACK); - 36e: 60 e0 ldi r22, 0x00 ; 0 - 370: 70 e0 ldi r23, 0x00 ; 0 - 372: 84 e0 ldi r24, 0x04 ; 4 - 374: 90 e0 ldi r25, 0x00 ; 0 - 376: 68 de rcall .-816 ; 0x48 - 378: 2f e3 ldi r18, 0x3F ; 63 - 37a: 8d e0 ldi r24, 0x0D ; 13 - 37c: 93 e0 ldi r25, 0x03 ; 3 - 37e: 21 50 subi r18, 0x01 ; 1 - 380: 80 40 sbci r24, 0x00 ; 0 - 382: 90 40 sbci r25, 0x00 ; 0 - 384: e1 f7 brne .-8 ; 0x37e - 386: 00 c0 rjmp .+0 ; 0x388 - 388: 00 00 nop - _delay_ms(50); - ledg(LED3, RED); - 38a: 61 e0 ldi r22, 0x01 ; 1 - 38c: 70 e0 ldi r23, 0x00 ; 0 - 38e: 84 e0 ldi r24, 0x04 ; 4 - 390: 90 e0 ldi r25, 0x00 ; 0 - 392: 5a de rcall .-844 ; 0x48 - 394: 2f e3 ldi r18, 0x3F ; 63 - 396: 8d e0 ldi r24, 0x0D ; 13 - 398: 93 e0 ldi r25, 0x03 ; 3 - 39a: 21 50 subi r18, 0x01 ; 1 - 39c: 80 40 sbci r24, 0x00 ; 0 - 39e: 90 40 sbci r25, 0x00 ; 0 - 3a0: e1 f7 brne .-8 ; 0x39a - 3a2: 00 c0 rjmp .+0 ; 0x3a4 - 3a4: 00 00 nop - _delay_ms(50); - ledg(LED3, BLACK); - 3a6: 60 e0 ldi r22, 0x00 ; 0 - 3a8: 70 e0 ldi r23, 0x00 ; 0 - 3aa: 84 e0 ldi r24, 0x04 ; 4 - 3ac: 90 e0 ldi r25, 0x00 ; 0 - 3ae: 4c de rcall .-872 ; 0x48 - 3b0: 2f eb ldi r18, 0xBF ; 191 - 3b2: 87 e2 ldi r24, 0x27 ; 39 - 3b4: 99 e0 ldi r25, 0x09 ; 9 - 3b6: 21 50 subi r18, 0x01 ; 1 - 3b8: 80 40 sbci r24, 0x00 ; 0 - 3ba: 90 40 sbci r25, 0x00 ; 0 - 3bc: e1 f7 brne .-8 ; 0x3b6 - 3be: 00 c0 rjmp .+0 ; 0x3c0 - 3c0: 00 00 nop - _delay_ms(150); - ledg(LED1 | LED3, BLUE); - 3c2: 64 e0 ldi r22, 0x04 ; 4 - 3c4: 70 e0 ldi r23, 0x00 ; 0 - 3c6: 85 e0 ldi r24, 0x05 ; 5 - 3c8: 90 e0 ldi r25, 0x00 ; 0 - 3ca: 3e de rcall .-900 ; 0x48 - 3cc: 2f e3 ldi r18, 0x3F ; 63 - 3ce: 8d e0 ldi r24, 0x0D ; 13 - 3d0: 93 e0 ldi r25, 0x03 ; 3 - 3d2: 21 50 subi r18, 0x01 ; 1 - 3d4: 80 40 sbci r24, 0x00 ; 0 - 3d6: 90 40 sbci r25, 0x00 ; 0 - 3d8: e1 f7 brne .-8 ; 0x3d2 - 3da: 00 c0 rjmp .+0 ; 0x3dc - 3dc: 00 00 nop _delay_ms(50); ledg(LED1 | LED3, BLACK); - 3de: 60 e0 ldi r22, 0x00 ; 0 - 3e0: 70 e0 ldi r23, 0x00 ; 0 - 3e2: 85 e0 ldi r24, 0x05 ; 5 - 3e4: 90 e0 ldi r25, 0x00 ; 0 - 3e6: 30 de rcall .-928 ; 0x48 - 3e8: 2f e3 ldi r18, 0x3F ; 63 - 3ea: 8d e0 ldi r24, 0x0D ; 13 - 3ec: 93 e0 ldi r25, 0x03 ; 3 - 3ee: 21 50 subi r18, 0x01 ; 1 - 3f0: 80 40 sbci r24, 0x00 ; 0 - 3f2: 90 40 sbci r25, 0x00 ; 0 - 3f4: e1 f7 brne .-8 ; 0x3ee - 3f6: 00 c0 rjmp .+0 ; 0x3f8 - 3f8: 00 00 nop + 16c: 6d df rcall .-294 ; 0x48 + 16e: 8f e4 ldi r24, 0x4F ; 79 + 170: 93 ec ldi r25, 0xC3 ; 195 + 172: 01 97 sbiw r24, 0x01 ; 1 + 174: f1 f7 brne .-4 ; 0x172 + 176: 00 c0 rjmp .+0 ; 0x178 + 178: 00 00 nop + 17a: 60 e0 ldi r22, 0x00 ; 0 + 17c: 70 e0 ldi r23, 0x00 ; 0 + 17e: 85 e0 ldi r24, 0x05 ; 5 + 180: 90 e0 ldi r25, 0x00 ; 0 + 182: 62 df rcall .-316 ; 0x48 + 184: 9f e3 ldi r25, 0x3F ; 63 + 186: 22 e4 ldi r18, 0x42 ; 66 _delay_ms(50); ledg(LED1 | LED3, GREEN); - 3fa: 62 e0 ldi r22, 0x02 ; 2 - 3fc: 70 e0 ldi r23, 0x00 ; 0 - 3fe: 85 e0 ldi r24, 0x05 ; 5 - 400: 90 e0 ldi r25, 0x00 ; 0 - 402: 22 de rcall .-956 ; 0x48 - 404: 2f e3 ldi r18, 0x3F ; 63 - 406: 8d e0 ldi r24, 0x0D ; 13 - 408: 93 e0 ldi r25, 0x03 ; 3 - 40a: 21 50 subi r18, 0x01 ; 1 - 40c: 80 40 sbci r24, 0x00 ; 0 - 40e: 90 40 sbci r25, 0x00 ; 0 - 410: e1 f7 brne .-8 ; 0x40a - 412: 00 c0 rjmp .+0 ; 0x414 - 414: 00 00 nop + 188: 8f e0 ldi r24, 0x0F ; 15 + 18a: 91 50 subi r25, 0x01 ; 1 + 18c: 20 40 sbci r18, 0x00 ; 0 + 18e: 80 40 sbci r24, 0x00 ; 0 + 190: e1 f7 brne .-8 ; 0x18a + 192: 00 c0 rjmp .+0 ; 0x194 + 194: 00 00 nop + 196: 66 e0 ldi r22, 0x06 ; 6 + 198: 70 e0 ldi r23, 0x00 ; 0 + 19a: 8f e0 ldi r24, 0x0F ; 15 + 19c: 90 e0 ldi r25, 0x00 ; 0 + 19e: 54 df rcall .-344 ; 0x48 + 1a0: 87 ea ldi r24, 0xA7 ; 167 + 1a2: 91 e6 ldi r25, 0x61 ; 97 _delay_ms(50); ledg(LED1 | LED3, BLACK); - 416: 60 e0 ldi r22, 0x00 ; 0 - 418: 70 e0 ldi r23, 0x00 ; 0 - 41a: 85 e0 ldi r24, 0x05 ; 5 - 41c: 90 e0 ldi r25, 0x00 ; 0 - 41e: 14 de rcall .-984 ; 0x48 - 420: 2f e3 ldi r18, 0x3F ; 63 - 422: 8d e0 ldi r24, 0x0D ; 13 - 424: 93 e0 ldi r25, 0x03 ; 3 - 426: 21 50 subi r18, 0x01 ; 1 - 428: 80 40 sbci r24, 0x00 ; 0 - 42a: 90 40 sbci r25, 0x00 ; 0 - 42c: e1 f7 brne .-8 ; 0x426 - 42e: 00 c0 rjmp .+0 ; 0x430 - 430: 00 00 nop + 1a4: 01 97 sbiw r24, 0x01 ; 1 + 1a6: f1 f7 brne .-4 ; 0x1a4 + 1a8: 00 c0 rjmp .+0 ; 0x1aa + 1aa: 00 00 nop + 1ac: 60 e0 ldi r22, 0x00 ; 0 + 1ae: 70 e0 ldi r23, 0x00 ; 0 + 1b0: 8f e0 ldi r24, 0x0F ; 15 + 1b2: 90 e0 ldi r25, 0x00 ; 0 + 1b4: 49 df rcall .-366 ; 0x48 + 1b6: 9f e3 ldi r25, 0x3F ; 63 + 1b8: 2d e0 ldi r18, 0x0D ; 13 + 1ba: 83 e0 ldi r24, 0x03 ; 3 + 1bc: 91 50 subi r25, 0x01 ; 1 + 1be: 20 40 sbci r18, 0x00 ; 0 _delay_ms(50); ledg(LED1 | LED3, RED); - 432: 61 e0 ldi r22, 0x01 ; 1 - 434: 70 e0 ldi r23, 0x00 ; 0 - 436: 85 e0 ldi r24, 0x05 ; 5 - 438: 90 e0 ldi r25, 0x00 ; 0 - 43a: 06 de rcall .-1012 ; 0x48 - 43c: 2f e3 ldi r18, 0x3F ; 63 - 43e: 8d e0 ldi r24, 0x0D ; 13 - 440: 93 e0 ldi r25, 0x03 ; 3 - 442: 21 50 subi r18, 0x01 ; 1 - 444: 80 40 sbci r24, 0x00 ; 0 - 446: 90 40 sbci r25, 0x00 ; 0 - 448: e1 f7 brne .-8 ; 0x442 - 44a: 00 c0 rjmp .+0 ; 0x44c - 44c: 00 00 nop + 1c0: 80 40 sbci r24, 0x00 ; 0 + 1c2: e1 f7 brne .-8 ; 0x1bc + 1c4: 00 c0 rjmp .+0 ; 0x1c6 + 1c6: 00 00 nop + 1c8: 66 e0 ldi r22, 0x06 ; 6 + 1ca: 70 e0 ldi r23, 0x00 ; 0 + 1cc: 8f e0 ldi r24, 0x0F ; 15 + 1ce: 90 e0 ldi r25, 0x00 ; 0 + 1d0: 3b df rcall .-394 ; 0x48 + 1d2: 8f e4 ldi r24, 0x4F ; 79 + 1d4: 93 ec ldi r25, 0xC3 ; 195 + 1d6: 01 97 sbiw r24, 0x01 ; 1 + 1d8: f1 f7 brne .-4 ; 0x1d6 + 1da: 00 c0 rjmp .+0 ; 0x1dc _delay_ms(50); ledg(LED1 | LED3, BLACK); - 44e: 60 e0 ldi r22, 0x00 ; 0 - 450: 70 e0 ldi r23, 0x00 ; 0 - 452: 85 e0 ldi r24, 0x05 ; 5 - 454: 90 e0 ldi r25, 0x00 ; 0 - 456: f8 dd rcall .-1040 ; 0x48 - 458: 2f eb ldi r18, 0xBF ; 191 - 45a: 87 e2 ldi r24, 0x27 ; 39 - 45c: 99 e0 ldi r25, 0x09 ; 9 - 45e: 21 50 subi r18, 0x01 ; 1 - 460: 80 40 sbci r24, 0x00 ; 0 - 462: 90 40 sbci r25, 0x00 ; 0 - 464: e1 f7 brne .-8 ; 0x45e - 466: 00 c0 rjmp .+0 ; 0x468 - 468: 00 00 nop - 46a: 03 cf rjmp .-506 ; 0x272 + 1dc: 00 00 nop + 1de: 60 e0 ldi r22, 0x00 ; 0 + 1e0: 70 e0 ldi r23, 0x00 ; 0 + 1e2: 8f e0 ldi r24, 0x0F ; 15 + 1e4: 90 e0 ldi r25, 0x00 ; 0 + 1e6: 30 df rcall .-416 ; 0x48 + 1e8: 9f e3 ldi r25, 0x3F ; 63 + 1ea: 2d e0 ldi r18, 0x0D ; 13 + 1ec: 83 e0 ldi r24, 0x03 ; 3 + 1ee: 91 50 subi r25, 0x01 ; 1 + 1f0: 20 40 sbci r18, 0x00 ; 0 + 1f2: 80 40 sbci r24, 0x00 ; 0 + 1f4: e1 f7 brne .-8 ; 0x1ee + 1f6: 00 c0 rjmp .+0 ; 0x1f8 + 1f8: 00 00 nop + _delay_ms(50); + ledg(LED1 | LED2 | LED3 | LED4, CYAN); + _delay_ms(10); + ledg(LED1 | LED2 | LED3 | LED4, BLACK); + _delay_ms(50); + ledg(LED1 | LED2 | LED3 | LED4, CYAN); + 1fa: 66 e0 ldi r22, 0x06 ; 6 + 1fc: 70 e0 ldi r23, 0x00 ; 0 + 1fe: 8f e0 ldi r24, 0x0F ; 15 + 200: 90 e0 ldi r25, 0x00 ; 0 + 202: 22 df rcall .-444 ; 0x48 + 204: 9f e5 ldi r25, 0x5F ; 95 + 206: 2a ee ldi r18, 0xEA ; 234 + 208: 80 e0 ldi r24, 0x00 ; 0 + 20a: 91 50 subi r25, 0x01 ; 1 + 20c: 20 40 sbci r18, 0x00 ; 0 + 20e: 80 40 sbci r24, 0x00 ; 0 + 210: e1 f7 brne .-8 ; 0x20a + 212: 00 c0 rjmp .+0 ; 0x214 + 214: 00 00 nop + _delay_ms(15); + ledg(LED1 | LED2 | LED3 | LED4, BLACK); + 216: 60 e0 ldi r22, 0x00 ; 0 + 218: 70 e0 ldi r23, 0x00 ; 0 + 21a: 8f e0 ldi r24, 0x0F ; 15 + 21c: 90 e0 ldi r25, 0x00 ; 0 + 21e: 14 df rcall .-472 ; 0x48 + 220: 9f e7 ldi r25, 0x7F ; 127 + 222: 24 e8 ldi r18, 0x84 ; 132 + 224: 8e e1 ldi r24, 0x1E ; 30 + 226: 91 50 subi r25, 0x01 ; 1 + 228: 20 40 sbci r18, 0x00 ; 0 + 22a: 80 40 sbci r24, 0x00 ; 0 + 22c: e1 f7 brne .-8 ; 0x226 + 22e: 00 c0 rjmp .+0 ; 0x230 + 230: 00 00 nop + _delay_ms(500); + fade(LED1 | LED2 | LED3 | LED4, CYAN, WHITE, 5); + 232: 25 e0 ldi r18, 0x05 ; 5 + 234: 30 e0 ldi r19, 0x00 ; 0 + 236: 47 e0 ldi r20, 0x07 ; 7 + 238: 50 e0 ldi r21, 0x00 ; 0 + 23a: 66 e0 ldi r22, 0x06 ; 6 + 23c: 70 e0 ldi r23, 0x00 ; 0 + 23e: 8f e0 ldi r24, 0x0F ; 15 + 240: 90 e0 ldi r25, 0x00 ; 0 + 242: 32 df rcall .-412 ; 0xa8 + ledg(LED1 | LED2 | LED3 | LED4, BLACK); + 244: 60 e0 ldi r22, 0x00 ; 0 + 246: 70 e0 ldi r23, 0x00 ; 0 + 248: 8f e0 ldi r24, 0x0F ; 15 + 24a: 90 e0 ldi r25, 0x00 ; 0 + 24c: fd de rcall .-518 ; 0x48 + 24e: 08 95 ret -0000046c
: - } +00000250 : + rgbl(LED1 | LED2 | LED3 | LED4, rgb_r, rgb_g, rgb_b); +} + +void initschalter(void) +{ + PORTB |= ((1< + 260: 00 c0 rjmp .+0 ; 0x262 + 262: 00 00 nop + 264: 08 95 ret + +00000266 : + _delay_ms(10); +} + +void programRainbow(uint8_t t) +{ + 266: cf 93 push r28 + 268: c8 2f mov r28, r24 + fade(LED1 | LED2 | LED3 | LED4, RED, YELLOW, t); + 26a: 28 2f mov r18, r24 + 26c: 30 e0 ldi r19, 0x00 ; 0 + 26e: 43 e0 ldi r20, 0x03 ; 3 + 270: 50 e0 ldi r21, 0x00 ; 0 + 272: 61 e0 ldi r22, 0x01 ; 1 + 274: 70 e0 ldi r23, 0x00 ; 0 + 276: 8f e0 ldi r24, 0x0F ; 15 + 278: 90 e0 ldi r25, 0x00 ; 0 + 27a: 16 df rcall .-468 ; 0xa8 + fade(LED1 | LED2 | LED3 | LED4, YELLOW, GREEN, t); + 27c: 2c 2f mov r18, r28 + 27e: 30 e0 ldi r19, 0x00 ; 0 + 280: 42 e0 ldi r20, 0x02 ; 2 + 282: 50 e0 ldi r21, 0x00 ; 0 + 284: 63 e0 ldi r22, 0x03 ; 3 + 286: 70 e0 ldi r23, 0x00 ; 0 + 288: 8f e0 ldi r24, 0x0F ; 15 + 28a: 90 e0 ldi r25, 0x00 ; 0 + 28c: 0d df rcall .-486 ; 0xa8 + fade(LED1 | LED2 | LED3 | LED4, GREEN, CYAN, t); + 28e: 2c 2f mov r18, r28 + 290: 30 e0 ldi r19, 0x00 ; 0 + 292: 46 e0 ldi r20, 0x06 ; 6 + 294: 50 e0 ldi r21, 0x00 ; 0 + 296: 62 e0 ldi r22, 0x02 ; 2 + 298: 70 e0 ldi r23, 0x00 ; 0 + 29a: 8f e0 ldi r24, 0x0F ; 15 + 29c: 90 e0 ldi r25, 0x00 ; 0 + 29e: 04 df rcall .-504 ; 0xa8 + fade(LED1 | LED2 | LED3 | LED4, CYAN, BLUE, t); + 2a0: 2c 2f mov r18, r28 + 2a2: 30 e0 ldi r19, 0x00 ; 0 + 2a4: 44 e0 ldi r20, 0x04 ; 4 + 2a6: 50 e0 ldi r21, 0x00 ; 0 + 2a8: 66 e0 ldi r22, 0x06 ; 6 + 2aa: 70 e0 ldi r23, 0x00 ; 0 + 2ac: 8f e0 ldi r24, 0x0F ; 15 + 2ae: 90 e0 ldi r25, 0x00 ; 0 + 2b0: fb de rcall .-522 ; 0xa8 + fade(LED1 | LED2 | LED3 | LED4, BLUE, MAGENTA, t); + 2b2: 2c 2f mov r18, r28 + 2b4: 30 e0 ldi r19, 0x00 ; 0 + 2b6: 45 e0 ldi r20, 0x05 ; 5 + 2b8: 50 e0 ldi r21, 0x00 ; 0 + 2ba: 64 e0 ldi r22, 0x04 ; 4 + 2bc: 70 e0 ldi r23, 0x00 ; 0 + 2be: 8f e0 ldi r24, 0x0F ; 15 + 2c0: 90 e0 ldi r25, 0x00 ; 0 + 2c2: f2 de rcall .-540 ; 0xa8 + fade(LED1 | LED2 | LED3 | LED4, MAGENTA, RED, t); + 2c4: 2c 2f mov r18, r28 + 2c6: 30 e0 ldi r19, 0x00 ; 0 + 2c8: 41 e0 ldi r20, 0x01 ; 1 + 2ca: 50 e0 ldi r21, 0x00 ; 0 + 2cc: 65 e0 ldi r22, 0x05 ; 5 + 2ce: 70 e0 ldi r23, 0x00 ; 0 + 2d0: 8f e0 ldi r24, 0x0F ; 15 + 2d2: 90 e0 ldi r25, 0x00 ; 0 + 2d4: e9 de rcall .-558 ; 0xa8 +} + 2d6: cf 91 pop r28 + 2d8: 08 95 ret + +000002da
: + _delay_ms(150); } int main(void) { DDRB = 0b00111111; - 46c: 8f e3 ldi r24, 0x3F ; 63 - 46e: 87 bb out 0x17, r24 ; 23 + 2da: 8f e3 ldi r24, 0x3F ; 63 + 2dc: 87 bb out 0x17, r24 ; 23 DDRD = 0b00111111; - 470: 81 bb out 0x11, r24 ; 17 + 2de: 81 bb out 0x11, r24 ; 17 initschalter(); - 472: f4 de rcall .-536 ; 0x25c + 2e0: b7 df rcall .-146 ; 0x250 initleds(); - 474: 77 de rcall .-786 ; 0x164 + 2e2: 40 df rcall .-384 ; 0x164 + while(1) + { + //programWarnBlink(); //programColorFull(); - //programRainbow(50); - //programWarnYellow(); - //programCop(); - //programHacker(); - programGreenBlink(); - 476: fd de rcall .-518 ; 0x272 + programRainbow(50); + 2e4: 82 e3 ldi r24, 0x32 ; 50 + 2e6: bf df rcall .-130 ; 0x266 + 2e8: fd cf rjmp .-6 ; 0x2e4 -00000478 <_exit>: - 478: f8 94 cli +000002ea <_exit>: + 2ea: f8 94 cli -0000047a <__stop_program>: - 47a: ff cf rjmp .-2 ; 0x47a <__stop_program> +000002ec <__stop_program>: + 2ec: ff cf rjmp .-2 ; 0x2ec <__stop_program> diff --git a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.map b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.map index 8676e6f..17d13c3 100644 --- a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.map +++ b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.map @@ -13,16 +13,16 @@ Discarded input sections .text.rgbl 0x00000000 0x76 Leuchtklotz.o .text.programColorFull 0x00000000 0x7a Leuchtklotz.o - .text.programRainbow - 0x00000000 0x82 Leuchtklotz.o .text.programWarnYellow 0x00000000 0x9a Leuchtklotz.o .text.programCop - 0x00000000 0x144 Leuchtklotz.o + 0x00000000 0x142 Leuchtklotz.o .text.programWarnBlink - 0x00000000 0x152 Leuchtklotz.o + 0x00000000 0x136 Leuchtklotz.o .text.programHacker 0x00000000 0x196 Leuchtklotz.o + .text.programGreenBlink + 0x00000000 0x1fa Leuchtklotz.o .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) .text.libgcc.mul @@ -163,7 +163,7 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .rela.plt *(.rela.plt) -.text 0x00000000 0x47c +.text 0x00000000 0x2ee *(.vectors) .vectors 0x00000000 0x2a c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o 0x00000000 __vector_default @@ -245,21 +245,21 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .text.fade 0x000000a8 0xbc Leuchtklotz.o 0x000000a8 fade .text.initleds - 0x00000164 0xf8 Leuchtklotz.o + 0x00000164 0xec Leuchtklotz.o 0x00000164 initleds .text.initschalter - 0x0000025c 0x16 Leuchtklotz.o - 0x0000025c initschalter - .text.programGreenBlink - 0x00000272 0x1fa Leuchtklotz.o - 0x00000272 programGreenBlink - .text.main 0x0000046c 0xc Leuchtklotz.o - 0x0000046c main - 0x00000478 . = ALIGN (0x2) + 0x00000250 0x16 Leuchtklotz.o + 0x00000250 initschalter + .text.programRainbow + 0x00000266 0x74 Leuchtklotz.o + 0x00000266 programRainbow + .text.main 0x000002da 0x10 Leuchtklotz.o + 0x000002da main + 0x000002ea . = ALIGN (0x2) *(.fini9) - .fini9 0x00000478 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) - 0x00000478 _exit - 0x00000478 exit + .fini9 0x000002ea 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) + 0x000002ea _exit + 0x000002ea exit *(.fini9) *(.fini8) *(.fini8) @@ -278,11 +278,11 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 *(.fini1) *(.fini1) *(.fini0) - .fini0 0x00000478 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) + .fini0 0x000002ea 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) *(.fini0) - 0x0000047c _etext = . + 0x000002ee _etext = . -.data 0x00800060 0x0 load address 0x0000047c +.data 0x00800060 0x0 load address 0x000002ee 0x00800060 PROVIDE (__data_start, .) *(.data) .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o @@ -303,8 +303,8 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 *(.bss*) *(COMMON) 0x00800060 PROVIDE (__bss_end, .) - 0x0000047c __data_load_start = LOADADDR (.data) - 0x0000047c __data_load_end = (__data_load_start + SIZEOF (.data)) + 0x000002ee __data_load_start = LOADADDR (.data) + 0x000002ee __data_load_end = (__data_load_start + SIZEOF (.data)) .noinit 0x00800060 0x0 0x00800060 PROVIDE (__noinit_start, .) @@ -377,31 +377,31 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .debug_pubnames *(.debug_pubnames) -.debug_info 0x00000000 0x2042 +.debug_info 0x00000000 0x1df9 *(.debug_info) - .debug_info 0x00000000 0x2042 Leuchtklotz.o + .debug_info 0x00000000 0x1df9 Leuchtklotz.o *(.gnu.linkonce.wi.*) -.debug_abbrev 0x00000000 0x226 +.debug_abbrev 0x00000000 0x237 *(.debug_abbrev) - .debug_abbrev 0x00000000 0x226 Leuchtklotz.o + .debug_abbrev 0x00000000 0x237 Leuchtklotz.o -.debug_line 0x00000000 0x711 +.debug_line 0x00000000 0x5a2 *(.debug_line) - .debug_line 0x00000000 0x711 Leuchtklotz.o + .debug_line 0x00000000 0x5a2 Leuchtklotz.o -.debug_frame 0x00000000 0x188 +.debug_frame 0x00000000 0x1a4 *(.debug_frame) - .debug_frame 0x00000000 0x188 Leuchtklotz.o + .debug_frame 0x00000000 0x1a4 Leuchtklotz.o -.debug_str 0x00000000 0x1b3 +.debug_str 0x00000000 0x1cf *(.debug_str) - .debug_str 0x00000000 0x1b3 Leuchtklotz.o - 0x1e7 (size before relaxing) + .debug_str 0x00000000 0x1cf Leuchtklotz.o + 0x203 (size before relaxing) -.debug_loc 0x00000000 0x643 +.debug_loc 0x00000000 0x767 *(.debug_loc) - .debug_loc 0x00000000 0x643 Leuchtklotz.o + .debug_loc 0x00000000 0x767 Leuchtklotz.o .debug_macinfo *(.debug_macinfo) @@ -409,9 +409,9 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .debug_pubtypes *(.debug_pubtypes) -.debug_ranges 0x00000000 0x130 +.debug_ranges 0x00000000 0x118 *(.debug_ranges) - .debug_ranges 0x00000000 0x130 Leuchtklotz.o + .debug_ranges 0x00000000 0x118 Leuchtklotz.o .debug_macro *(.debug_macro) diff --git a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.srec b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.srec index e9a7f8f..fe1199f 100644 --- a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.srec +++ b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.srec @@ -3,7 +3,7 @@ S113000014C021C020C01FC01EC01DC01CC01BC006 S11300101AC019C018C017C016C015C014C013C028 S113002012C011C010C00FC00EC011241FBECFEDEE S1130030CDBF20E0A0E6B0E001C01D92A036B2071B -S1130040E1F714D219C2DCCF6770772780FF06C0AE +S1130040E1F74BD152C1DCCF6770772780FF06C040 S113005098B3987F98BB98B3962B98BB81FF0DC03B S113006098B3977C98BB98B39B01220F331F220F40 S1130070331F220F331F292B28BB82FF06C092B3E4 @@ -21,54 +21,29 @@ S1130120E816F104E4F2E4CF8FEFE81AF80A8FEF4F S1130130E816F10421F0161417046CF3F5CFDF91DF S1130140CF911F910F91FF90EF90DF90CF90BF90D0 S1130150AF909F908F907F906F905F904F903F9063 -S11301602F90089566E070E085E090E06DDF2FE762 -S113017088E391E0215080409040E1F700C0000006 -S113018060E070E085E090E05FDF2FE784E89EE1C7 -S1130190215080409040E1F700C0000066E070E02C -S11301A08FE090E051DF8FE493EC0197F1F700C00A -S11301B0000060E070E08FE090E046DF9FE72AE116 -S11301C086E0915020408040E1F700C0000066E0E6 -S11301D070E08FE090E038DF9FE728E381E0915002 -S11301E020408040E1F700C0000060E070E08FE054 -S11301F090E02ADF9FE72AE186E09150204080408A -S1130200E1F700C0000066E070E08FE090E01CDFE2 -S11302109FEB24ED81E0915020408040E1F700C045 -S1130220000060E070E08FE090E00EDF9FEF28E0D8 -S11302308DE3915020408040E1F700C0000024E1AC -S113024030E047E050E066E070E08FE090E02CDFC3 -S113025060E070E08FE090E0F7DE089588B3806C92 -S113026088BB969A8FE493EC0197F1F700C00000E5 -S1130270089564E070E081E090E0E6DE2FE38DE035 -S113028093E0215080409040E1F700C0000060E01E -S113029070E081E090E0D8DE2FE38DE093E0215020 -S11302A080409040E1F700C0000062E070E081E02F -S11302B090E0CADE2FE38DE093E02150804090402F -S11302C0E1F700C0000060E070E081E090E0BCDE97 -S11302D02FE38DE093E0215080409040E1F700C08F -S11302E0000061E070E081E090E0AEDE2FE38DE09D -S11302F093E0215080409040E1F700C0000060E0AE -S113030070E081E090E0A0DE2FE38DE093E02150E7 -S113031080409040E1F700C0000064E070E084E0B9 -S113032090E092DE2FE38DE093E0215080409040F6 -S1130330E1F700C0000060E070E084E090E084DE5B -S11303402FE38DE093E0215080409040E1F700C01E -S1130350000062E070E084E090E076DE2FE38DE060 -S113036093E0215080409040E1F700C0000060E03D -S113037070E084E090E068DE2FE38DE093E02150AC -S113038080409040E1F700C0000061E070E084E04C -S113039090E05ADE2FE38DE093E0215080409040BE -S11303A0E1F700C0000060E070E084E090E04CDE23 -S11303B02FEB87E299E0215080409040E1F700C0A4 -S11303C0000064E070E085E090E03EDE2FE38DE025 -S11303D093E0215080409040E1F700C0000060E0CD -S11303E070E085E090E030DE2FE38DE093E0215073 -S11303F080409040E1F700C0000062E070E085E0DA -S113040090E022DE2FE38DE093E021508040904085 -S1130410E1F700C0000060E070E085E090E014DEE9 -S11304202FE38DE093E0215080409040E1F700C03D -S1130430000061E070E085E090E006DE2FE38DE0EF -S113044093E0215080409040E1F700C0000060E05C -S113045070E085E090E0F8DD2FEB87E299E0215031 -S113046080409040E1F700C0000003CF8FE387BBDA -S10F047081BBF4DE77DEFDDEF894FFCFE4 +S11301602F90089566E070E085E090E06DDF8FE405 +S113017093EC0197F1F700C0000060E070E085E0C7 +S113018090E062DF9FE322E48FE0915020408040C2 +S1130190E1F700C0000066E070E08FE090E054DF1B +S11301A087EA91E60197F1F700C0000060E070E093 +S11301B08FE090E049DF9FE32DE083E09150204001 +S11301C08040E1F700C0000066E070E08FE090E05E +S11301D03BDF8FE493EC0197F1F700C0000060E08F +S11301E070E08FE090E030DF9FE32DE083E09150FA +S11301F020408040E1F700C0000066E070E08FE03E +S113020090E022DF9FE52AEE80E09150204080407C +S1130210E1F700C0000060E070E08FE090E014DFE0 +S11302209FE724E88EE1915020408040E1F700C030 +S1130230000025E030E047E050E066E070E08FE049 +S113024090E032DF60E070E08FE090E0FDDE089542 +S113025088B3806C88BB969A8FE493EC0197F1F78E +S113026000C000000895CF93C82F282F30E043E04A +S113027050E061E070E08FE090E016DF2C2F30E07A +S113028042E050E063E070E08FE090E00DDF2C2F5F +S113029030E046E050E062E070E08FE090E004DFA0 +S11302A02C2F30E044E050E066E070E08FE090E016 +S11302B0FBDE2C2F30E045E050E064E070E08FE09E +S11302C090E0F2DE2C2F30E041E050E065E070E099 +S11302D08FE090E0E9DECF9108958FE387BB81BB87 +S11102E0B7DF40DF82E3BFDFFDCFF894FFCF2E S9030000FC diff --git a/Leuchtklotz/Leuchtklotz/Leuchtklotz.c b/Leuchtklotz/Leuchtklotz/Leuchtklotz.c index 2a49925..a77e1ea 100644 --- a/Leuchtklotz/Leuchtklotz/Leuchtklotz.c +++ b/Leuchtklotz/Leuchtklotz/Leuchtklotz.c @@ -79,72 +79,65 @@ void fade(int led, int from, int to, int dur) { } } -void initleds() { +void initleds(void) { ledg(LED1 | LED3, CYAN); - _delay_ms(20); + _delay_ms(10); ledg(LED1 | LED3, BLACK); - _delay_ms(500); + _delay_ms(250); + ledg(LED1 | LED2 | LED3 | LED4, CYAN); + _delay_ms(5); + ledg(LED1 | LED2 | LED3 | LED4, BLACK); + _delay_ms(50); ledg(LED1 | LED2 | LED3 | LED4, CYAN); _delay_ms(10); ledg(LED1 | LED2 | LED3 | LED4, BLACK); - _delay_ms(100); + _delay_ms(50); ledg(LED1 | LED2 | LED3 | LED4, CYAN); - _delay_ms(20); + _delay_ms(15); ledg(LED1 | LED2 | LED3 | LED4, BLACK); - _delay_ms(100); - ledg(LED1 | LED2 | LED3 | LED4, CYAN); - _delay_ms(30); - ledg(LED1 | LED2 | LED3 | LED4, BLACK); - _delay_ms(1000); - fade(LED1 | LED2 | LED3 | LED4, CYAN, WHITE, 20); + _delay_ms(500); + fade(LED1 | LED2 | LED3 | LED4, CYAN, WHITE, 5); ledg(LED1 | LED2 | LED3 | LED4, BLACK); } volatile uint8_t rgb_r = 0; volatile uint8_t rgb_b = 0; volatile uint8_t rgb_g = 0; -void programColorFull() { - while(1) { +void programColorFull(void) { if(!(PINB & (1< +# to submit bug reports. +#AVRDUDE_VERBOSE = -v -v + +AVRDUDE_BASIC = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) +AVRDUDE_FLAGS = $(AVRDUDE_BASIC) $(AVRDUDE_NO_VERIFY) $(AVRDUDE_VERBOSE) $(AVRDUDE_ERASE_COUNTER) + + +CC = avr-gcc +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump +SIZE = avr-size +NM = avr-nm +AVRDUDE = avrdude +REMOVE = rm -f +MV = mv -f + +# Define all object files. +OBJ = $(SRC:.c=.o) $(ASRC:.S=.o) + +# Define all listing files. +LST = $(ASRC:.S=.lst) $(SRC:.c=.lst) + +# Combine all necessary flags and optional flags. +# Add target processor to flags. +ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) +ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) + + +# Default target. +all: build + +build: elf hex eep + +elf: $(TARGET).elf +hex: $(TARGET).hex +eep: $(TARGET).eep +lss: $(TARGET).lss +sym: $(TARGET).sym + + +# Program the device. +program: $(TARGET).hex $(TARGET).eep + $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) + + + + +# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB. +COFFCONVERT=$(OBJCOPY) --debugging \ +--change-section-address .data-0x800000 \ +--change-section-address .bss-0x800000 \ +--change-section-address .noinit-0x800000 \ +--change-section-address .eeprom-0x810000 + + +coff: $(TARGET).elf + $(COFFCONVERT) -O coff-avr $(TARGET).elf $(TARGET).cof + + +extcoff: $(TARGET).elf + $(COFFCONVERT) -O coff-ext-avr $(TARGET).elf $(TARGET).cof + + +.SUFFIXES: .elf .hex .eep .lss .sym + +.elf.hex: + $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ + +.elf.eep: + -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ + --change-section-lma .eeprom=0 -O $(FORMAT) $< $@ + +# Create extended listing file from ELF output file. +.elf.lss: + $(OBJDUMP) -h -S $< > $@ + +# Create a symbol table from ELF output file. +.elf.sym: + $(NM) -n $< > $@ + + + +# Link: create ELF output file from object files. +$(TARGET).elf: $(OBJ) + $(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS) + + +# Compile: create object files from C source files. +.c.o: + $(CC) -c $(ALL_CFLAGS) $< -o $@ + + +# Compile: create assembler files from C source files. +.c.s: + $(CC) -S $(ALL_CFLAGS) $< -o $@ + + +# Assemble: create object files from assembler source files. +.S.o: + $(CC) -c $(ALL_ASFLAGS) $< -o $@ + + + +# Target: clean project. +clean: + $(REMOVE) $(TARGET).hex $(TARGET).eep $(TARGET).cof $(TARGET).elf \ + $(TARGET).map $(TARGET).sym $(TARGET).lss \ + $(OBJ) $(LST) $(SRC:.c=.s) $(SRC:.c=.d) + +depend: + if grep '^# DO NOT DELETE' $(MAKEFILE) >/dev/null; \ + then \ + sed -e '/^# DO NOT DELETE/,$$d' $(MAKEFILE) > \ + $(MAKEFILE).$$$$ && \ + $(MV) $(MAKEFILE).$$$$ $(MAKEFILE); \ + fi + echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' \ + >> $(MAKEFILE); \ + $(CC) -M -mmcu=$(MCU) $(CDEFS) $(CINCS) $(SRC) $(ASRC) >> $(MAKEFILE) + +.PHONY: all build elf hex eep lss sym program coff extcoff clean depend + + + +