20131103-181001

This commit is contained in:
BlubbFish 2013-11-03 17:09:52 +00:00
parent 88a58e586f
commit 001e0be085
21 changed files with 1488 additions and 0 deletions

20
Button/Button.atsln Normal file
View File

@ -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

BIN
Button/Button.atsuo Normal file

Binary file not shown.

36
Button/Button/Button.cpp Normal file
View File

@ -0,0 +1,36 @@
/*
* Button.cpp
*
* Created: 03.11.2013 16:13:38
* Author: netz
*/
#define F_CPU 16000000
#include <avr/io.h>
#include <util/delay.h>
#include "Led.h"
int main(void)
{
Led l;
DDRC |= (1<<PINC5);
while(1)
{
l.rainbow(5);
/*PORTC ^= (1<<PINC0);
_delay_ms(150);
PORTC ^= (1<<PINC0);
PORTC ^= (1<<PINC1);
_delay_ms(150);
PORTC ^= (1<<PINC1);
PORTC ^= (1<<PINC2);
_delay_ms(150);
PORTC ^= (1<<PINC2);*/
//PORTC ^= (1<<PINC5);
}
}

View File

@ -0,0 +1,168 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
<ProjectVersion>6.1</ProjectVersion>
<ToolchainName>com.Atmel.AVRGCC8.CPP</ToolchainName>
<ProjectGuid>{815f6a46-6ed2-4e1d-856d-959913573ff8}</ProjectGuid>
<avrdevice>ATmega32A</avrdevice>
<avrdeviceseries>none</avrdeviceseries>
<OutputType>Executable</OutputType>
<Language>CPP</Language>
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
<OutputFileExtension>.elf</OutputFileExtension>
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
<AssemblyName>Button</AssemblyName>
<Name>Button</Name>
<RootNamespace>Button</RootNamespace>
<ToolchainFlavour>Native</ToolchainFlavour>
<KeepTimersRunning>true</KeepTimersRunning>
<OverrideVtor>false</OverrideVtor>
<OverrideVtorValue>exception_table</OverrideVtorValue>
<eraseonlaunchrule>0</eraseonlaunchrule>
<ProgFlashFromRam>true</ProgFlashFromRam>
<RamSnippetAddress>0x20000000</RamSnippetAddress>
<CacheFlash>true</CacheFlash>
<UncachedRange />
<BootSegment>0</BootSegment>
<AsfFrameworkConfig>
<framework-data xmlns="">
<options />
<configurations />
<files />
<documentation help="" />
<dependencies>
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.7.2" />
</dependencies>
</framework-data>
</AsfFrameworkConfig>
<avrtoolinterface>ISP</avrtoolinterface>
<avrtool>com.atmel.avrdbg.tool.ispmk2</avrtool>
<com_atmel_avrdbg_tool_ispmk2>
<ToolType>com.atmel.avrdbg.tool.ispmk2</ToolType>
<ToolName>AVRISP mkII</ToolName>
<ToolNumber>0000000000000</ToolNumber>
<Channel>
<host>127.0.0.1</host>
<port>51031</port>
<ssl>False</ssl>
</Channel>
<ToolOptions>
<InterfaceName>ISP</InterfaceName>
<InterfaceProperties>
<JtagDbgClock>249000</JtagDbgClock>
<JtagProgClock>1000000</JtagProgClock>
<IspClock>150000</IspClock>
<JtagInChain>false</JtagInChain>
<JtagEnableExtResetOnStartSession>false</JtagEnableExtResetOnStartSession>
<JtagDevicesBefore>0</JtagDevicesBefore>
<JtagDevicesAfter>0</JtagDevicesAfter>
<JtagInstrBitsBefore>0</JtagInstrBitsBefore>
<JtagInstrBitsAfter>0</JtagInstrBitsAfter>
</InterfaceProperties>
</ToolOptions>
</com_atmel_avrdbg_tool_ispmk2>
<com_atmel_avrdbg_tool_simulator>
<ToolType xmlns="">com.atmel.avrdbg.tool.simulator</ToolType>
<ToolName xmlns="">Simulator</ToolName>
<ToolNumber xmlns="">
</ToolNumber>
<Channel xmlns="">
<host>127.0.0.1</host>
<port>51031</port>
<ssl>False</ssl>
</Channel>
</com_atmel_avrdbg_tool_simulator>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings>
<AvrGccCpp>
<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.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.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>
<avrgcccpp.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcccpp.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcccpp.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcccpp.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcccpp.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcccpp.compiler.symbols.DefSymbols>
<avrgcccpp.compiler.optimization.level>Optimize for size (-Os)</avrgcccpp.compiler.optimization.level>
<avrgcccpp.compiler.optimization.PackStructureMembers>True</avrgcccpp.compiler.optimization.PackStructureMembers>
<avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcccpp.compiler.warnings.AllWarnings>True</avrgcccpp.compiler.warnings.AllWarnings>
<avrgcccpp.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcccpp.linker.libraries.Libraries>
<avrgcccpp.linker.memorysettings.Comment>&lt;segmentname&gt;=&lt;address&gt;, for example .boot=0xff</avrgcccpp.linker.memorysettings.Comment>
</AvrGccCpp>
</ToolchainSettings>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<ToolchainSettings>
<AvrGccCpp>
<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.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.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>
<avrgcccpp.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcccpp.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcccpp.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcccpp.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcccpp.compiler.symbols.DefSymbols>
<ListValues>
<Value>DEBUG</Value>
</ListValues>
</avrgcccpp.compiler.symbols.DefSymbols>
<avrgcccpp.compiler.optimization.level>Optimize (-O1)</avrgcccpp.compiler.optimization.level>
<avrgcccpp.compiler.optimization.PackStructureMembers>True</avrgcccpp.compiler.optimization.PackStructureMembers>
<avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcccpp.compiler.optimization.DebugLevel>Default (-g2)</avrgcccpp.compiler.optimization.DebugLevel>
<avrgcccpp.compiler.warnings.AllWarnings>True</avrgcccpp.compiler.warnings.AllWarnings>
<avrgcccpp.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcccpp.linker.libraries.Libraries>
<avrgcccpp.linker.memorysettings.Comment>&lt;segmentname&gt;=&lt;address&gt;, for example .boot=0xff</avrgcccpp.linker.memorysettings.Comment>
<avrgcccpp.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcccpp.assembler.debugging.DebugLevel>
</AvrGccCpp>
</ToolchainSettings>
</PropertyGroup>
<ItemGroup>
<Compile Include="Button.cpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="Led.cpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="Led.h">
<SubType>compile</SubType>
</Compile>
</ItemGroup>
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
</Project>

View File

@ -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:

View File

@ -0,0 +1 @@
:00000001FF

Binary file not shown.

View File

@ -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

View File

@ -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 <main>
64: 0c 94 f7 00 jmp 0x1ee ; 0x1ee <_exit>
00000068 <__bad_interrupt>:
68: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
0000006c <main>:
#include <util/delay.h>
#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<<PINC5);
7e: a5 9a sbi 0x14, 5 ; 20
while(1)
{
l.rainbow(5);
80: 65 e0 ldi r22, 0x05 ; 5
82: ce 01 movw r24, r28
84: 01 96 adiw r24, 0x01 ; 1
86: 0e 94 b6 00 call 0x16c ; 0x16c <_ZN3Led7rainbowEh>
8a: fa cf rjmp .-12 ; 0x80 <main+0x14>
0000008c <_ZN3Led4initEv>:
init();
}
void Led::init() {
//*Led::DDR |= (1<<Led::PIN_R) | (1<<Led::PIN_G) | (1<<Led::PIN_B);
LEDDDR |= (1<<Led::PIN_R) | (1<<Led::PIN_G) | (1<<Led::PIN_B);
8c: 84 b3 in r24, 0x14 ; 20
8e: 87 60 ori r24, 0x07 ; 7
90: 84 bb out 0x14, r24 ; 20
92: 08 95 ret
00000094 <_ZN3LedC1Ev>:
*/
#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<<Led::PIN_R) | (1<<Led::PIN_G) | (1<<Led::PIN_B));
LEDPORT &= ~((1<<Led::PIN_R) | (1<<Led::PIN_G) | (1<<Led::PIN_B));
9a: 85 b3 in r24, 0x15 ; 21
9c: 88 7f andi r24, 0xF8 ; 248
9e: 85 bb out 0x15, r24 ; 21
//PORTB &= ~((1<<PINB5) | (1<<PINB6) | (1<<PINB7));
//*Led::PORT |= (rgb<<Led::PIN_M);
LEDPORT |= (rgb<<Led::PIN_M);
a0: 85 b3 in r24, 0x15 ; 21
}
void Led::color(uint8_t mask) {
int rgb = 0;
rgb |= (mask & (1<<0)) ? (1<<0) : (0<<0);
rgb |= (mask & (1<<1)) ? (1<<1) : (0<<1);
a2: 96 2f mov r25, r22
a4: 93 70 andi r25, 0x03 ; 3
rgb |= (mask & (1<<2)) ? (1<<2) : (0<<2);
a6: 89 2b or r24, r25
a8: 64 70 andi r22, 0x04 ; 4
//*Led::PORT &= ~((1<<Led::PIN_R) | (1<<Led::PIN_G) | (1<<Led::PIN_B));
LEDPORT &= ~((1<<Led::PIN_R) | (1<<Led::PIN_G) | (1<<Led::PIN_B));
//PORTB &= ~((1<<PINB5) | (1<<PINB6) | (1<<PINB7));
//*Led::PORT |= (rgb<<Led::PIN_M);
LEDPORT |= (rgb<<Led::PIN_M);
aa: 68 2b or r22, r24
ac: 65 bb out 0x15, r22 ; 21
ae: 08 95 ret
000000b0 <_ZN3Led4fadeEiii>:
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<dur;k++) {
e0: 21 2c mov r2, r1
e2: 31 2c mov r3, r1
for (int j=i;j<0xFF;j++) {
color(from);
}
for (int j=0;j<i;j++) {
e4: 42 2c mov r4, r2
e6: 53 2c mov r5, r3
e8: 2a c0 rjmp .+84 ; 0x13e <_ZN3Led4fadeEiii+0x8e>
}
void Led::fade(int from, int to, int dur) {
for (int i=0;i<0xFF;i++) {
for(int k=0;k<dur;k++) {
for (int j=i;j<0xFF;j++) {
ea: c6 2d mov r28, r6
ec: d7 2d mov r29, r7
color(from);
ee: 68 2d mov r22, r8
f0: c5 01 movw r24, r10
f2: 0e 94 4d 00 call 0x9a ; 0x9a <_ZN3Led5colorEh>
}
void Led::fade(int from, int to, int dur) {
for (int i=0;i<0xFF;i++) {
for(int k=0;k<dur;k++) {
for (int j=i;j<0xFF;j++) {
f6: 21 96 adiw r28, 0x01 ; 1
f8: cf 3f cpi r28, 0xFF ; 255
fa: d1 05 cpc r29, r1
fc: c1 f7 brne .-16 ; 0xee <_ZN3Led4fadeEiii+0x3e>
color(from);
}
for (int j=0;j<i;j++) {
fe: 10 16 cp r1, r16
100: 11 06 cpc r1, r17
102: 54 f4 brge .+20 ; 0x118 <_ZN3Led4fadeEiii+0x68>
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<dur;k++) {
for (int j=i;j<0xFF;j++) {
color(from);
}
for (int j=0;j<i;j++) {
110: 21 96 adiw r28, 0x01 ; 1
112: c0 17 cp r28, r16
114: d1 07 cpc r29, r17
116: c1 f7 brne .-16 ; 0x108 <_ZN3Led4fadeEiii+0x58>
}
}
void Led::fade(int from, int to, int dur) {
for (int i=0;i<0xFF;i++) {
for(int k=0;k<dur;k++) {
118: 8f ef ldi r24, 0xFF ; 255
11a: e8 1a sub r14, r24
11c: f8 0a sbc r15, r24
11e: ec 14 cp r14, r12
120: fd 04 cpc r15, r13
122: 21 f4 brne .+8 ; 0x12c <_ZN3Led4fadeEiii+0x7c>
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<dur;k++) {
13e: 1c 14 cp r1, r12
140: 1d 04 cpc r1, r13
142: 8c f3 brlt .-30 ; 0x126 <_ZN3Led4fadeEiii+0x76>
144: f7 cf rjmp .-18 ; 0x134 <_ZN3Led4fadeEiii+0x84>
for (int j=0;j<i;j++) {
color(to);
}
}
}
}
146: df 91 pop r29
148: cf 91 pop r28
14a: 1f 91 pop r17
14c: 0f 91 pop r16
14e: ff 90 pop r15
150: ef 90 pop r14
152: df 90 pop r13
154: cf 90 pop r12
156: bf 90 pop r11
158: af 90 pop r10
15a: 9f 90 pop r9
15c: 8f 90 pop r8
15e: 7f 90 pop r7
160: 6f 90 pop r6
162: 5f 90 pop r5
164: 4f 90 pop r4
166: 3f 90 pop r3
168: 2f 90 pop r2
16a: 08 95 ret
0000016c <_ZN3Led7rainbowEh>:
//*Led::PORT |= (rgb<<Led::PIN_M);
LEDPORT |= (rgb<<Led::PIN_M);
//PORTB |= (rgb<<PINB5);
}
void Led::rainbow(uint8_t time) {
16c: ec 01 movw r28, r24
16e: 16 2f mov r17, r22
fade(WHITE, RED, 10);
170: 2a e0 ldi r18, 0x0A ; 10
172: 30 e0 ldi r19, 0x00 ; 0
174: 44 e0 ldi r20, 0x04 ; 4
176: 50 e0 ldi r21, 0x00 ; 0
178: 67 e0 ldi r22, 0x07 ; 7
17a: 70 e0 ldi r23, 0x00 ; 0
17c: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii>
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>

View File

@ -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

View File

@ -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

36
Button/Button/Debug/Led.d Normal file
View File

@ -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:

View File

@ -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"

View File

@ -0,0 +1,8 @@
################################################################################
# Automatically-generated file. Do not edit or delete the file
################################################################################
Button.cpp
Led.cpp

60
Button/Button/Led.cpp Normal file
View File

@ -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<<Led::PIN_R) | (1<<Led::PIN_G) | (1<<Led::PIN_B);
LEDDDR |= (1<<Led::PIN_R) | (1<<Led::PIN_G) | (1<<Led::PIN_B);
}
void Led::uninit() {
//*DDR &= ~((1<<PIN_R) | (1<<PIN_G) | (1<<PIN_B));
}
void Led::color(uint8_t 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);
//*Led::PORT &= ~((1<<Led::PIN_R) | (1<<Led::PIN_G) | (1<<Led::PIN_B));
LEDPORT &= ~((1<<Led::PIN_R) | (1<<Led::PIN_G) | (1<<Led::PIN_B));
//PORTB &= ~((1<<PINB5) | (1<<PINB6) | (1<<PINB7));
//*Led::PORT |= (rgb<<Led::PIN_M);
LEDPORT |= (rgb<<Led::PIN_M);
//PORTB |= (rgb<<PINB5);
}
void Led::rainbow(uint8_t time) {
fade(WHITE, RED, 10);
while(1) {
fade(RED, YELLOW, time);
fade(YELLOW, GREEN, time);
fade(GREEN, CYAN, time);
fade(CYAN, BLUE, time);
fade(BLUE, MAGENTA, time);
fade(MAGENTA, RED, time);
}
}
void Led::fade(int from, int to, int dur) {
for (int i=0;i<0xFF;i++) {
for(int k=0;k<dur;k++) {
for (int j=i;j<0xFF;j++) {
color(from);
}
for (int j=0;j<i;j++) {
color(to);
}
}
}
}

44
Button/Button/Led.h Normal file
View File

@ -0,0 +1,44 @@
/*
* Led.h
*
* Created: 03.11.2013 17:11:58
* Author: BlubbFish
*/
#include <avr/io.h>
#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_ */

49
Button/Button/led_o.c Normal file
View File

@ -0,0 +1,49 @@
/*
* led.c
*
* Created: 06.10.2013 16:32:15
* Author: netz
*/
#include <avr/io.h>
#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<<PINB5) | (1<<PINB6) | (1<<PINB7));
PORTB |= (rgb<<PINB5);
}
void init_led()
{
DDRB |= (1<<PINB7) | (1<<PINB6) | (1<<PINB5);
}
void fade(int from, int to, int dur) {
for (int i=0;i<0xFF;i++) {
for(int k=0;k<dur;k++) {
for (int j=i;j<0xFF;j++) {
led(from);
}
for (int j=0;j<i;j++) {
led(to);
}
}
}
}
void led_rainbow(uint8_t t) {
fade(WHITE, RED, 10);
while(1) {
fade(RED, YELLOW, t);
fade(YELLOW, GREEN, t);
fade(GREEN, CYAN, t);
fade(CYAN, BLUE, t);
fade(BLUE, MAGENTA, t);
fade(MAGENTA, RED, t);
}
}

28
Button/Button/led_o.h Normal file
View File

@ -0,0 +1,28 @@
/*
* led.h
*
* Created: 06.10.2013 16:30:58
* Author: netz
*/
#ifndef LED_H_
#define LED_H_
#define BLACK 0
#define RED 4
#define GREEN 2
#define YELLOW 6
#define BLUE 1
#define MAGENTA 5
#define CYAN 3
#define WHITE 7
void init_led();
void led(int mask);
void fade(int from, int to, int dur);
void led_rainbow(uint8_t t);
#endif /* LED_H_ */

Binary file not shown.

Binary file not shown.

Binary file not shown.