diff --git a/Button/Button.atsln b/Button/Button.atsln new file mode 100644 index 0000000..144d342 --- /dev/null +++ b/Button/Button.atsln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Atmel Studio Solution File, Format Version 11.00 +Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "Button", "Button\Button.cppproj", "{815F6A46-6ED2-4E1D-856D-959913573FF8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|AVR = Debug|AVR + Release|AVR = Release|AVR + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {815F6A46-6ED2-4E1D-856D-959913573FF8}.Debug|AVR.ActiveCfg = Debug|AVR + {815F6A46-6ED2-4E1D-856D-959913573FF8}.Debug|AVR.Build.0 = Debug|AVR + {815F6A46-6ED2-4E1D-856D-959913573FF8}.Release|AVR.ActiveCfg = Release|AVR + {815F6A46-6ED2-4E1D-856D-959913573FF8}.Release|AVR.Build.0 = Release|AVR + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Button/Button.atsuo b/Button/Button.atsuo new file mode 100644 index 0000000..0a65eab Binary files /dev/null and b/Button/Button.atsuo differ diff --git a/Button/Button/Button.cpp b/Button/Button/Button.cpp new file mode 100644 index 0000000..1395f0b --- /dev/null +++ b/Button/Button/Button.cpp @@ -0,0 +1,36 @@ +/* + * Button.cpp + * + * Created: 03.11.2013 16:13:38 + * Author: netz + */ + +#define F_CPU 16000000 + +#include +#include + +#include "Led.h" + +int main(void) +{ + Led l; + DDRC |= (1< + + + 2.0 + 6.1 + com.Atmel.AVRGCC8.CPP + {815f6a46-6ed2-4e1d-856d-959913573ff8} + ATmega32A + none + Executable + CPP + $(MSBuildProjectName) + .elf + $(MSBuildProjectDirectory)\$(Configuration) + Button + Button + Button + Native + true + false + exception_table + 0 + true + 0x20000000 + true + + 0 + + + + + + + + + + + + ISP + com.atmel.avrdbg.tool.ispmk2 + + com.atmel.avrdbg.tool.ispmk2 + AVRISP mkII + 0000000000000 + + 127.0.0.1 + 51031 + False + + + ISP + + 249000 + 1000000 + 150000 + false + false + 0 + 0 + 0 + 0 + + + + + com.atmel.avrdbg.tool.simulator + Simulator + + + + 127.0.0.1 + 51031 + False + + + + + + + True + True + True + True + True + True + + + NDEBUG + + + Optimize for size (-Os) + True + True + True + True + True + + + NDEBUG + + + Optimize for size (-Os) + True + True + True + + + libm + + + <segmentname>=<address>, for example .boot=0xff + + + + + + + True + True + True + True + True + True + + + DEBUG + + + Optimize (-O1) + True + True + Default (-g2) + True + True + True + + + DEBUG + + + Optimize (-O1) + True + True + Default (-g2) + True + + + libm + + + <segmentname>=<address>, for example .boot=0xff + Default (-Wa,-g) + + + + + + compile + + + compile + + + compile + + + + \ No newline at end of file diff --git a/Button/Button/Debug/Button.d b/Button/Button/Debug/Button.d new file mode 100644 index 0000000..0439964 --- /dev/null +++ b/Button/Button/Debug/Button.d @@ -0,0 +1,46 @@ +Button.d Button.o: .././Button.cpp \ + 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/include/avr/io.h \ + 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/include/avr/sfr_defs.h \ + 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/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + 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/include/stdint.h \ + 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/include/avr/iom32a.h \ + 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/include/avr/portpins.h \ + 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/include/avr/common.h \ + 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/include/avr/version.h \ + 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/include/avr/fuse.h \ + 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/include/avr/lock.h \ + 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/include/util/delay.h \ + 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/include/util/delay_basic.h \ + 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/include/math.h \ + .././Led.h + +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/include/avr/io.h: + +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/include/avr/sfr_defs.h: + +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/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +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/include/stdint.h: + +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/include/avr/iom32a.h: + +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/include/avr/portpins.h: + +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/include/avr/common.h: + +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/include/avr/version.h: + +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/include/avr/fuse.h: + +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/include/avr/lock.h: + +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/include/util/delay.h: + +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/include/util/delay_basic.h: + +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/include/math.h: + +.././Led.h: diff --git a/Button/Button/Debug/Button.eep b/Button/Button/Debug/Button.eep new file mode 100644 index 0000000..1996e8f --- /dev/null +++ b/Button/Button/Debug/Button.eep @@ -0,0 +1 @@ +:00000001FF diff --git a/Button/Button/Debug/Button.elf b/Button/Button/Debug/Button.elf new file mode 100644 index 0000000..48f1a73 Binary files /dev/null and b/Button/Button/Debug/Button.elf differ diff --git a/Button/Button/Debug/Button.hex b/Button/Button/Debug/Button.hex new file mode 100644 index 0000000..e5d994f --- /dev/null +++ b/Button/Button/Debug/Button.hex @@ -0,0 +1,33 @@ +:100000000C942A000C9434000C9434000C943400AA +:100010000C9434000C9434000C9434000C94340090 +:100020000C9434000C9434000C9434000C94340080 +:100030000C9434000C9434000C9434000C94340070 +:100040000C9434000C9434000C9434000C94340060 +:100050000C94340011241FBECFE5D8E0DEBFCDBF25 +:100060000E9436000C94F7000C940000CF93DF93AD +:100070001F92CDB7DEB7CE0101960E944A00A59A25 +:1000800065E0CE0101960E94B600FACF84B3876086 +:1000900084BB08950E944600089585B3887F85BB80 +:1000A00085B3962F9370892B6470682B65BB089578 +:1000B0002F923F924F925F926F927F928F929F9278 +:1000C000AF92BF92CF92DF92EF92FF920F931F9366 +:1000D000CF93DF935C01862E942E690100E010E03F +:1000E000212C312C422C532C2AC0C62DD72D682D03 +:1000F000C5010E944D002196CF3FD105C1F71016D2 +:10010000110654F4C42DD52D692DC5010E944D0052 +:100110002196C017D107C1F78FEFE81AF80AEC143F +:10012000FD0421F407C07101602E712E0F3F1105EF +:10013000E4F2E5CF0F5F1F4F0F3F110521F01C14B4 +:100140001D048CF3F7CFDF91CF911F910F91FF909A +:10015000EF90DF90CF90BF90AF909F908F907F9067 +:100160006F905F904F903F902F900895EC01162F65 +:100170002AE030E044E050E067E070E00E94580080 +:10018000212F30E046E050E064E070E0CE010E94B4 +:100190005800212F30E042E050E066E070E0CE01F0 +:1001A0000E945800212F30E043E050E062E070E010 +:1001B000CE010E945800212F30E041E050E063E082 +:1001C00070E0CE010E945800212F30E045E050E061 +:1001D00061E070E0CE010E945800212F30E044E041 +:1001E00050E065E070E0CE010E945800C9CFF8945D +:0201F000FFCF3F +:00000001FF diff --git a/Button/Button/Debug/Button.lss b/Button/Button/Debug/Button.lss new file mode 100644 index 0000000..5a747e6 --- /dev/null +++ b/Button/Button/Debug/Button.lss @@ -0,0 +1,382 @@ + +Button.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 000001f2 00000000 00000000 00000074 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .data 00000000 00800060 000001f2 00000266 2**0 + CONTENTS, ALLOC, LOAD, DATA + 2 .stab 000006cc 00000000 00000000 00000268 2**2 + CONTENTS, READONLY, DEBUGGING + 3 .stabstr 00000082 00000000 00000000 00000934 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .comment 0000002f 00000000 00000000 000009b6 2**0 + CONTENTS, READONLY + 5 .debug_aranges 00000068 00000000 00000000 000009e5 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_info 0000079b 00000000 00000000 00000a4d 2**0 + CONTENTS, READONLY, DEBUGGING + 7 .debug_abbrev 0000034c 00000000 00000000 000011e8 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_line 00000262 00000000 00000000 00001534 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_frame 00000104 00000000 00000000 00001798 2**2 + CONTENTS, READONLY, DEBUGGING + 10 .debug_str 00000173 00000000 00000000 0000189c 2**0 + CONTENTS, READONLY, DEBUGGING + 11 .debug_loc 000003db 00000000 00000000 00001a0f 2**0 + CONTENTS, READONLY, DEBUGGING + 12 .debug_ranges 00000090 00000000 00000000 00001dea 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00000000 <__vectors>: + 0: 0c 94 2a 00 jmp 0x54 ; 0x54 <__ctors_end> + 4: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 8: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + c: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 10: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 14: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 18: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 1c: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 20: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 24: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 28: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 2c: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 30: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 34: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 38: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 3c: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 40: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 44: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 48: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 4c: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 50: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + +00000054 <__ctors_end>: + 54: 11 24 eor r1, r1 + 56: 1f be out 0x3f, r1 ; 63 + 58: cf e5 ldi r28, 0x5F ; 95 + 5a: d8 e0 ldi r29, 0x08 ; 8 + 5c: de bf out 0x3e, r29 ; 62 + 5e: cd bf out 0x3d, r28 ; 61 + 60: 0e 94 36 00 call 0x6c ; 0x6c
+ 64: 0c 94 f7 00 jmp 0x1ee ; 0x1ee <_exit> + +00000068 <__bad_interrupt>: + 68: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> + +0000006c
: +#include + +#include "Led.h" + +int main(void) +{ + 6c: cf 93 push r28 + 6e: df 93 push r29 + 70: 1f 92 push r1 + 72: cd b7 in r28, 0x3d ; 61 + 74: de b7 in r29, 0x3e ; 62 + Led l; + 76: ce 01 movw r24, r28 + 78: 01 96 adiw r24, 0x01 ; 1 + 7a: 0e 94 4a 00 call 0x94 ; 0x94 <_ZN3LedC1Ev> + DDRC |= (1< + 8a: fa cf rjmp .-12 ; 0x80 + +0000008c <_ZN3Led4initEv>: + init(); +} + +void Led::init() { + //*Led::DDR |= (1<: + */ + +#include "Led.h" + +Led::Led() { + init(); + 94: 0e 94 46 00 call 0x8c ; 0x8c <_ZN3Led4initEv> + 98: 08 95 ret + +0000009a <_ZN3Led5colorEh>: + rgb |= (mask & (1<<0)) ? (1<<0) : (0<<0); + rgb |= (mask & (1<<1)) ? (1<<1) : (0<<1); + rgb |= (mask & (1<<2)) ? (1<<2) : (0<<2); + + //*Led::PORT &= ~((1<: + fade(BLUE, MAGENTA, time); + fade(MAGENTA, RED, time); + } +} + +void Led::fade(int from, int to, int dur) { + b0: 2f 92 push r2 + b2: 3f 92 push r3 + b4: 4f 92 push r4 + b6: 5f 92 push r5 + b8: 6f 92 push r6 + ba: 7f 92 push r7 + bc: 8f 92 push r8 + be: 9f 92 push r9 + c0: af 92 push r10 + c2: bf 92 push r11 + c4: cf 92 push r12 + c6: df 92 push r13 + c8: ef 92 push r14 + ca: ff 92 push r15 + cc: 0f 93 push r16 + ce: 1f 93 push r17 + d0: cf 93 push r28 + d2: df 93 push r29 + d4: 5c 01 movw r10, r24 + d6: 86 2e mov r8, r22 + d8: 94 2e mov r9, r20 + da: 69 01 movw r12, r18 + for (int i=0;i<0xFF;i++) { + dc: 00 e0 ldi r16, 0x00 ; 0 + de: 10 e0 ldi r17, 0x00 ; 0 + for(int k=0;k +} + +void Led::fade(int from, int to, int dur) { + for (int i=0;i<0xFF;i++) { + for(int k=0;k +} + +void Led::fade(int from, int to, int dur) { + for (int i=0;i<0xFF;i++) { + for(int k=0;k + color(from); + } + for (int j=0;j + 104: c4 2d mov r28, r4 + 106: d5 2d mov r29, r5 + color(to); + 108: 69 2d mov r22, r9 + 10a: c5 01 movw r24, r10 + 10c: 0e 94 4d 00 call 0x9a ; 0x9a <_ZN3Led5colorEh> + for (int i=0;i<0xFF;i++) { + for(int k=0;k + } +} + +void Led::fade(int from, int to, int dur) { + for (int i=0;i<0xFF;i++) { + for(int k=0;k + 124: 07 c0 rjmp .+14 ; 0x134 <_ZN3Led4fadeEiii+0x84> + 126: 71 01 movw r14, r2 + for (int j=i;j<0xFF;j++) { + 128: 60 2e mov r6, r16 + 12a: 71 2e mov r7, r17 + 12c: 0f 3f cpi r16, 0xFF ; 255 + 12e: 11 05 cpc r17, r1 + 130: e4 f2 brlt .-72 ; 0xea <_ZN3Led4fadeEiii+0x3a> + 132: e5 cf rjmp .-54 ; 0xfe <_ZN3Led4fadeEiii+0x4e> + fade(MAGENTA, RED, time); + } +} + +void Led::fade(int from, int to, int dur) { + for (int i=0;i<0xFF;i++) { + 134: 0f 5f subi r16, 0xFF ; 255 + 136: 1f 4f sbci r17, 0xFF ; 255 + 138: 0f 3f cpi r16, 0xFF ; 255 + 13a: 11 05 cpc r17, r1 + 13c: 21 f0 breq .+8 ; 0x146 <_ZN3Led4fadeEiii+0x96> + for(int k=0;k + 144: f7 cf rjmp .-18 ; 0x134 <_ZN3Led4fadeEiii+0x84> + for (int j=0;j: + //*Led::PORT |= (rgb< + while(1) { + fade(RED, YELLOW, time); + 180: 21 2f mov r18, r17 + 182: 30 e0 ldi r19, 0x00 ; 0 + 184: 46 e0 ldi r20, 0x06 ; 6 + 186: 50 e0 ldi r21, 0x00 ; 0 + 188: 64 e0 ldi r22, 0x04 ; 4 + 18a: 70 e0 ldi r23, 0x00 ; 0 + 18c: ce 01 movw r24, r28 + 18e: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> + fade(YELLOW, GREEN, time); + 192: 21 2f mov r18, r17 + 194: 30 e0 ldi r19, 0x00 ; 0 + 196: 42 e0 ldi r20, 0x02 ; 2 + 198: 50 e0 ldi r21, 0x00 ; 0 + 19a: 66 e0 ldi r22, 0x06 ; 6 + 19c: 70 e0 ldi r23, 0x00 ; 0 + 19e: ce 01 movw r24, r28 + 1a0: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> + fade(GREEN, CYAN, time); + 1a4: 21 2f mov r18, r17 + 1a6: 30 e0 ldi r19, 0x00 ; 0 + 1a8: 43 e0 ldi r20, 0x03 ; 3 + 1aa: 50 e0 ldi r21, 0x00 ; 0 + 1ac: 62 e0 ldi r22, 0x02 ; 2 + 1ae: 70 e0 ldi r23, 0x00 ; 0 + 1b0: ce 01 movw r24, r28 + 1b2: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> + fade(CYAN, BLUE, time); + 1b6: 21 2f mov r18, r17 + 1b8: 30 e0 ldi r19, 0x00 ; 0 + 1ba: 41 e0 ldi r20, 0x01 ; 1 + 1bc: 50 e0 ldi r21, 0x00 ; 0 + 1be: 63 e0 ldi r22, 0x03 ; 3 + 1c0: 70 e0 ldi r23, 0x00 ; 0 + 1c2: ce 01 movw r24, r28 + 1c4: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> + fade(BLUE, MAGENTA, time); + 1c8: 21 2f mov r18, r17 + 1ca: 30 e0 ldi r19, 0x00 ; 0 + 1cc: 45 e0 ldi r20, 0x05 ; 5 + 1ce: 50 e0 ldi r21, 0x00 ; 0 + 1d0: 61 e0 ldi r22, 0x01 ; 1 + 1d2: 70 e0 ldi r23, 0x00 ; 0 + 1d4: ce 01 movw r24, r28 + 1d6: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> + fade(MAGENTA, RED, time); + 1da: 21 2f mov r18, r17 + 1dc: 30 e0 ldi r19, 0x00 ; 0 + 1de: 44 e0 ldi r20, 0x04 ; 4 + 1e0: 50 e0 ldi r21, 0x00 ; 0 + 1e2: 65 e0 ldi r22, 0x05 ; 5 + 1e4: 70 e0 ldi r23, 0x00 ; 0 + 1e6: ce 01 movw r24, r28 + 1e8: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> + 1ec: c9 cf rjmp .-110 ; 0x180 <_ZN3Led7rainbowEh+0x14> + +000001ee <_exit>: + 1ee: f8 94 cli + +000001f0 <__stop_program>: + 1f0: ff cf rjmp .-2 ; 0x1f0 <__stop_program> diff --git a/Button/Button/Debug/Button.map b/Button/Button/Debug/Button.map new file mode 100644 index 0000000..0442deb --- /dev/null +++ b/Button/Button/Debug/Button.map @@ -0,0 +1,410 @@ +Archive member included because of file (symbol) + +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + 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/avr5/crtm32a.o (exit) + +Discarded input sections + + .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/../../../../avr/lib/avr5/crtm32a.o + .text 0x00000000 0x0 Button.o + .bss 0x00000000 0x0 Button.o + .text 0x00000000 0x0 Led.o + .bss 0x00000000 0x0 Led.o + .text._ZN3Led6uninitEv + 0x00000000 0x2 Led.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/avr5\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/avr5\libgcc.a(_exit.o) + .text.libgcc.mul + 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/avr5\libgcc.a(_exit.o) + .text.libgcc.div + 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/avr5\libgcc.a(_exit.o) + .text.libgcc 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/avr5\libgcc.a(_exit.o) + .text.libgcc.prologue + 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/avr5\libgcc.a(_exit.o) + .text.libgcc.builtins + 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/avr5\libgcc.a(_exit.o) + .text.libgcc.fmul + 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/avr5\libgcc.a(_exit.o) + +Memory Configuration + +Name Origin Length Attributes +text 0x00000000 0x00020000 xr +data 0x00800060 0x0000ffa0 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 + +LOAD 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/avr5/crtm32a.o +LOAD Button.o +LOAD Led.o +START GROUP +LOAD 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/avr5\libm.a +END GROUP +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a +LOAD 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/avr5\libm.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a +LOAD 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/avr5\libc.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a + +.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 0x1f2 + *(.vectors) + .vectors 0x00000000 0x54 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/avr5/crtm32a.o + 0x00000000 __vector_default + 0x00000000 __vectors + *(.vectors) + *(.progmem.gcc*) + *(.progmem*) + 0x00000054 . = ALIGN (0x2) + 0x00000054 __trampolines_start = . + *(.trampolines) + .trampolines 0x00000054 0x0 linker stubs + *(.trampolines*) + 0x00000054 __trampolines_end = . + *(.jumptables) + *(.jumptables*) + *(.lowtext) + *(.lowtext*) + 0x00000054 __ctors_start = . + *(.ctors) + 0x00000054 __ctors_end = . + 0x00000054 __dtors_start = . + *(.dtors) + 0x00000054 __dtors_end = . + SORT(*)(.ctors) + SORT(*)(.dtors) + *(.init0) + .init0 0x00000054 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/avr5/crtm32a.o + 0x00000054 __init + *(.init0) + *(.init1) + *(.init1) + *(.init2) + .init2 0x00000054 0xc 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/avr5/crtm32a.o + *(.init2) + *(.init3) + *(.init3) + *(.init4) + *(.init4) + *(.init5) + *(.init5) + *(.init6) + *(.init6) + *(.init7) + *(.init7) + *(.init8) + *(.init8) + *(.init9) + .init9 0x00000060 0x8 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/avr5/crtm32a.o + *(.init9) + *(.text) + .text 0x00000068 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/../../../../avr/lib/avr5/crtm32a.o + 0x00000068 __vector_1 + 0x00000068 __vector_12 + 0x00000068 __bad_interrupt + 0x00000068 __vector_6 + 0x00000068 __vector_3 + 0x00000068 __vector_11 + 0x00000068 __vector_13 + 0x00000068 __vector_17 + 0x00000068 __vector_19 + 0x00000068 __vector_7 + 0x00000068 __vector_5 + 0x00000068 __vector_4 + 0x00000068 __vector_9 + 0x00000068 __vector_2 + 0x00000068 __vector_15 + 0x00000068 __vector_8 + 0x00000068 __vector_14 + 0x00000068 __vector_10 + 0x00000068 __vector_16 + 0x00000068 __vector_18 + 0x00000068 __vector_20 + 0x0000006c . = ALIGN (0x2) + *(.text.*) + .text.main 0x0000006c 0x20 Button.o + 0x0000006c main + .text._ZN3Led4initEv + 0x0000008c 0x8 Led.o + 0x0000008c _ZN3Led4initEv + .text._ZN3LedC2Ev + 0x00000094 0x6 Led.o + 0x00000094 _ZN3LedC1Ev + 0x00000094 _ZN3LedC2Ev + .text._ZN3Led5colorEh + 0x0000009a 0x16 Led.o + 0x0000009a _ZN3Led5colorEh + .text._ZN3Led4fadeEiii + 0x000000b0 0xbc Led.o + 0x000000b0 _ZN3Led4fadeEiii + .text._ZN3Led7rainbowEh + 0x0000016c 0x82 Led.o + 0x0000016c _ZN3Led7rainbowEh + 0x000001ee . = ALIGN (0x2) + *(.fini9) + .fini9 0x000001ee 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/avr5\libgcc.a(_exit.o) + 0x000001ee _exit + 0x000001ee exit + *(.fini9) + *(.fini8) + *(.fini8) + *(.fini7) + *(.fini7) + *(.fini6) + *(.fini6) + *(.fini5) + *(.fini5) + *(.fini4) + *(.fini4) + *(.fini3) + *(.fini3) + *(.fini2) + *(.fini2) + *(.fini1) + *(.fini1) + *(.fini0) + .fini0 0x000001ee 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/avr5\libgcc.a(_exit.o) + *(.fini0) + 0x000001f2 _etext = . + +.data 0x00800060 0x0 load address 0x000001f2 + 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/avr5/crtm32a.o + .data 0x00800060 0x0 Button.o + .data 0x00800060 0x0 Led.o + .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/avr5\libgcc.a(_exit.o) + *(.data*) + *(.rodata) + *(.rodata*) + *(.gnu.linkonce.d*) + 0x00800060 . = ALIGN (0x2) + 0x00800060 _edata = . + 0x00800060 PROVIDE (__data_end, .) + +.bss 0x00800060 0x0 + 0x00800060 PROVIDE (__bss_start, .) + *(.bss) + *(.bss*) + *(COMMON) + 0x00800060 PROVIDE (__bss_end, .) + 0x000001f2 __data_load_start = LOADADDR (.data) + 0x000001f2 __data_load_end = (__data_load_start + SIZEOF (.data)) + +.noinit 0x00800060 0x0 + 0x00800060 PROVIDE (__noinit_start, .) + *(.noinit*) + 0x00800060 PROVIDE (__noinit_end, .) + 0x00800060 _end = . + 0x00800060 PROVIDE (__heap_start, .) + +.eeprom 0x00810000 0x0 + *(.eeprom*) + 0x00810000 __eeprom_end = . + +.fuse + *(.fuse) + *(.lfuse) + *(.hfuse) + *(.efuse) + +.lock + *(.lock*) + +.signature + *(.signature*) + +.user_signatures + *(.user_signatures*) + +.stab 0x00000000 0x6cc + *(.stab) + .stab 0x00000000 0x6cc 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/avr5/crtm32a.o + +.stabstr 0x00000000 0x82 + *(.stabstr) + .stabstr 0x00000000 0x82 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/avr5/crtm32a.o + +.stab.excl + *(.stab.excl) + +.stab.exclstr + *(.stab.exclstr) + +.stab.index + *(.stab.index) + +.stab.indexstr + *(.stab.indexstr) + +.comment 0x00000000 0x2f + *(.comment) + .comment 0x00000000 0x2f Button.o + 0x30 (size before relaxing) + .comment 0x00000000 0x30 Led.o + +.debug + *(.debug) + +.line + *(.line) + +.debug_srcinfo + *(.debug_srcinfo) + +.debug_sfnames + *(.debug_sfnames) + +.debug_aranges 0x00000000 0x68 + *(.debug_aranges) + .debug_aranges + 0x00000000 0x20 Button.o + .debug_aranges + 0x00000020 0x48 Led.o + +.debug_pubnames + *(.debug_pubnames) + +.debug_info 0x00000000 0x79b + *(.debug_info) + .debug_info 0x00000000 0x24c Button.o + .debug_info 0x0000024c 0x54f Led.o + *(.gnu.linkonce.wi.*) + +.debug_abbrev 0x00000000 0x34c + *(.debug_abbrev) + .debug_abbrev 0x00000000 0x14c Button.o + .debug_abbrev 0x0000014c 0x200 Led.o + +.debug_line 0x00000000 0x262 + *(.debug_line) + .debug_line 0x00000000 0xe3 Button.o + .debug_line 0x000000e3 0x17f Led.o + +.debug_frame 0x00000000 0x104 + *(.debug_frame) + .debug_frame 0x00000000 0x34 Button.o + .debug_frame 0x00000034 0xd0 Led.o + +.debug_str 0x00000000 0x173 + *(.debug_str) + .debug_str 0x00000000 0x146 Button.o + 0x17f (size before relaxing) + .debug_str 0x00000146 0x2d Led.o + 0x197 (size before relaxing) + +.debug_loc 0x00000000 0x3db + *(.debug_loc) + .debug_loc 0x00000000 0x48 Button.o + .debug_loc 0x00000048 0x393 Led.o + +.debug_macinfo + *(.debug_macinfo) + +.debug_pubtypes + *(.debug_pubtypes) + +.debug_ranges 0x00000000 0x90 + *(.debug_ranges) + .debug_ranges 0x00000000 0x10 Button.o + .debug_ranges 0x00000010 0x80 Led.o + +.debug_macro + *(.debug_macro) +OUTPUT(Button.elf elf32-avr) +LOAD linker stubs diff --git a/Button/Button/Debug/Button.srec b/Button/Button/Debug/Button.srec new file mode 100644 index 0000000..0b283fd --- /dev/null +++ b/Button/Button/Debug/Button.srec @@ -0,0 +1,34 @@ +S00E0000427574746F6E2E737265639A +S11300000C942A000C9434000C9434000C943400A6 +S11300100C9434000C9434000C9434000C9434008C +S11300200C9434000C9434000C9434000C9434007C +S11300300C9434000C9434000C9434000C9434006C +S11300400C9434000C9434000C9434000C9434005C +S11300500C94340011241FBECFE5D8E0DEBFCDBF21 +S11300600E9436000C94F7000C940000CF93DF93A9 +S11300701F92CDB7DEB7CE0101960E944A00A59A21 +S113008065E0CE0101960E94B600FACF84B3876082 +S113009084BB08950E944600089585B3887F85BB7C +S11300A085B3962F9370892B6470682B65BB089574 +S11300B02F923F924F925F926F927F928F929F9274 +S11300C0AF92BF92CF92DF92EF92FF920F931F9362 +S11300D0CF93DF935C01862E942E690100E010E03B +S11300E0212C312C422C532C2AC0C62DD72D682DFF +S11300F0C5010E944D002196CF3FD105C1F71016CE +S1130100110654F4C42DD52D692DC5010E944D004E +S11301102196C017D107C1F78FEFE81AF80AEC143B +S1130120FD0421F407C07101602E712E0F3F1105EB +S1130130E4F2E5CF0F5F1F4F0F3F110521F01C14B0 +S11301401D048CF3F7CFDF91CF911F910F91FF9096 +S1130150EF90DF90CF90BF90AF909F908F907F9063 +S11301606F905F904F903F902F900895EC01162F61 +S11301702AE030E044E050E067E070E00E9458007C +S1130180212F30E046E050E064E070E0CE010E94B0 +S11301905800212F30E042E050E066E070E0CE01EC +S11301A00E945800212F30E043E050E062E070E00C +S11301B0CE010E945800212F30E041E050E063E07E +S11301C070E0CE010E945800212F30E045E050E05D +S11301D061E070E0CE010E945800212F30E044E03D +S11301E050E065E070E0CE010E945800C9CFF89459 +S10501F0FFCF3B +S9030000FC diff --git a/Button/Button/Debug/Led.d b/Button/Button/Debug/Led.d new file mode 100644 index 0000000..3ceb4ca --- /dev/null +++ b/Button/Button/Debug/Led.d @@ -0,0 +1,36 @@ +Led.d Led.o: .././Led.cpp .././Led.h \ + 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/include/avr/io.h \ + 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/include/avr/sfr_defs.h \ + 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/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + 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/include/stdint.h \ + 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/include/avr/iom32a.h \ + 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/include/avr/portpins.h \ + 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/include/avr/common.h \ + 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/include/avr/version.h \ + 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/include/avr/fuse.h \ + 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/include/avr/lock.h + +.././Led.h: + +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/include/avr/io.h: + +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/include/avr/sfr_defs.h: + +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/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +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/include/stdint.h: + +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/include/avr/iom32a.h: + +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/include/avr/portpins.h: + +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/include/avr/common.h: + +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/include/avr/version.h: + +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/include/avr/fuse.h: + +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/include/avr/lock.h: diff --git a/Button/Button/Debug/Makefile b/Button/Button/Debug/Makefile new file mode 100644 index 0000000..76217dd --- /dev/null +++ b/Button/Button/Debug/Makefile @@ -0,0 +1,133 @@ +################################################################################ +# 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:= + +# Every subdirectory with source files must be described here +SUBDIRS := + + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Button.cpp \ +../Led.cpp + + +PREPROCESSING_SRCS += + + +ASM_SRCS += + + +OBJS += \ +Button.o \ +Led.o + + +OBJS_AS_ARGS += \ +Button.o \ +Led.o + + +C_DEPS += \ +Button.d \ +Led.d + + +C_DEPS_AS_ARGS += \ +Button.d \ +Led.d + + +OUTPUT_FILE_PATH +=Button.elf + +OUTPUT_FILE_PATH_AS_ARGS +=Button.elf + +ADDITIONAL_DEPENDENCIES:= + +OUTPUT_FILE_DEP:= ./makedep.mk + +LIB_DEP+= + +# AVR32/GNU C Compiler + + + + + +./%.o: .././%.cpp + @echo Building file: $< + @echo Invoking: AVR8/GNU C++ Compiler : + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -funsigned-char -funsigned-bitfields -DDEBUG -O1 -ffunction-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega32a -c -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) + @echo Building target: $@ + @echo Invoking: AVR8/GNU Linker : + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="Button.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega32a + @echo Finished building target: $@ + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "Button.elf" "Button.hex" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\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 "Button.elf" "Button.eep" || exit 0 + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "Button.elf" > "Button.lss" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature "Button.elf" "Button.srec" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-size.exe" "Button.elf" + + + + + + +# Other Targets +clean: + -$(RM) $(OBJS_AS_ARGS)$(C_DEPS_AS_ARGS) $(EXECUTABLES) + rm -rf "Button.elf" "Button.a" "Button.hex" "Button.lss" "Button.eep" "Button.map" "Button.srec" + \ No newline at end of file diff --git a/Button/Button/Debug/makedep.mk b/Button/Button/Debug/makedep.mk new file mode 100644 index 0000000..941943e --- /dev/null +++ b/Button/Button/Debug/makedep.mk @@ -0,0 +1,8 @@ +################################################################################ +# Automatically-generated file. Do not edit or delete the file +################################################################################ + +Button.cpp + +Led.cpp + diff --git a/Button/Button/Led.cpp b/Button/Button/Led.cpp new file mode 100644 index 0000000..a37dd87 --- /dev/null +++ b/Button/Button/Led.cpp @@ -0,0 +1,60 @@ +/* + * CPPFile1.cpp + * + * Created: 03.11.2013 17:24:58 + * Author: netz + */ + +#include "Led.h" + +Led::Led() { + init(); +} + +void Led::init() { + //*Led::DDR |= (1< + +#ifndef LED_H_ +#define LED_H_ + +#define LEDPORT PORTC +#define LEDDDR DDRC + +class Led { + public: + Led(); + //virtual ~Led(); + void color(uint8_t mask); + void rainbow(uint8_t time); + static const uint8_t BLACK = 0; + static const uint8_t BLUE = 1; + static const uint8_t GREEN = 2; + static const uint8_t CYAN = 3; + static const uint8_t RED = 4; + static const uint8_t MAGENTA = 5; + static const uint8_t YELLOW = 6; + static const uint8_t WHITE = 7; + private: + //static const uint8_t DDR = &DDRC; + //volatile uint8_t *PORT = &PORTC; + static const uint8_t PIN_R = PINC2; + static const uint8_t PIN_G = PINC1; + static const uint8_t PIN_B = PINC0; + static const uint8_t PIN_M = PINC0; + void fade(int from, int to, int dur); + void init(); + void uninit(); +}; + + + +#endif /* LED_H_ */ \ No newline at end of file diff --git a/Button/Button/led_o.c b/Button/Button/led_o.c new file mode 100644 index 0000000..50dba5f --- /dev/null +++ b/Button/Button/led_o.c @@ -0,0 +1,49 @@ +/* + * led.c + * + * Created: 06.10.2013 16:32:15 + * Author: netz + */ + +#include +#include "led.h" + +void led(int mask) { + int rgb = 0; + rgb |= (mask & (1<<0)) ? (1<<0) : (0<<0); + rgb |= (mask & (1<<1)) ? (1<<1) : (0<<1); + rgb |= (mask & (1<<2)) ? (1<<2) : (0<<2); + + PORTB &= ~((1<